xref: /dpdk/drivers/crypto/dpaa_sec/dpaa_sec.h (revision e77506397fc8005c5129e22e9e2d15d5876790fd)
1d81734caSHemant Agrawal /* SPDX-License-Identifier: BSD-3-Clause
2c3e85bdcSAkhil Goyal  *
3123098cdSGagandeep Singh  *   Copyright 2016-2024 NXP
4c3e85bdcSAkhil Goyal  *
5c3e85bdcSAkhil Goyal  */
6c3e85bdcSAkhil Goyal 
7c3e85bdcSAkhil Goyal #ifndef _DPAA_SEC_H_
8c3e85bdcSAkhil Goyal #define _DPAA_SEC_H_
9c3e85bdcSAkhil Goyal 
1069cb2eebSAshish Jain #define CRYPTODEV_NAME_DPAA_SEC_PMD	crypto_dpaa_sec
1169cb2eebSAshish Jain /**< NXP DPAA - SEC PMD device name */
1269cb2eebSAshish Jain 
138a3167dbSGagandeep Singh #define SEC_BASE_ADDR		0x1700000
148a3167dbSGagandeep Singh #define MAP_SIZE		0x100000
158a3167dbSGagandeep Singh #define BLOCK_OFFSET		0x10000
168a3167dbSGagandeep Singh #define CMD_REG			0x4
178a3167dbSGagandeep Singh #define QICTL_DQEN		0x01
188a3167dbSGagandeep Singh #define QI_BLOCK_NUMBER		7
194e694fe5SAkhil Goyal #define MAX_DPAA_CORES		4
20c3e85bdcSAkhil Goyal #define NUM_POOL_CHANNELS	4
219a984458SAkhil Goyal #define DPAA_SEC_BURST		7
22c3e85bdcSAkhil Goyal #define DPAA_SEC_ALG_UNSUPPORT	(-1)
23c3e85bdcSAkhil Goyal #define TDES_CBC_IV_LEN		8
24c3e85bdcSAkhil Goyal #define AES_CBC_IV_LEN		16
25c3e85bdcSAkhil Goyal #define AES_CTR_IV_LEN		16
26c3e85bdcSAkhil Goyal #define AES_GCM_IV_LEN		12
27c3e85bdcSAkhil Goyal 
289d5f73c2SGagandeep Singh extern uint8_t dpaa_cryptodev_driver_id;
299d5f73c2SGagandeep Singh 
305ab35d2eSAkhil Goyal #define DPAA_IPv6_DEFAULT_VTC_FLOW	0x60000000
315ab35d2eSAkhil Goyal 
32c3e85bdcSAkhil Goyal /* Minimum job descriptor consists of a oneword job descriptor HEADER and
33c3e85bdcSAkhil Goyal  * a pointer to the shared descriptor.
34c3e85bdcSAkhil Goyal  */
35c3e85bdcSAkhil Goyal #define MIN_JOB_DESC_SIZE	(CAAM_CMD_SZ + CAAM_PTR_SZ)
36c3e85bdcSAkhil Goyal /* CTX_POOL_NUM_BUFS is set as per the ipsec-secgw application */
37c3e85bdcSAkhil Goyal #define CTX_POOL_NUM_BUFS	32000
38c3e85bdcSAkhil Goyal #define CTX_POOL_BUF_SIZE	sizeof(struct dpaa_sec_op_ctx)
39c3e85bdcSAkhil Goyal #define CTX_POOL_CACHE_SIZE	512
404e694fe5SAkhil Goyal #define RTE_DPAA_SEC_PMD_MAX_NB_SESSIONS 1024
41c3e85bdcSAkhil Goyal 
42c3e85bdcSAkhil Goyal #define DIR_ENC                 1
43c3e85bdcSAkhil Goyal #define DIR_DEC                 0
44c3e85bdcSAkhil Goyal 
45c3e85bdcSAkhil Goyal enum dpaa_sec_op_type {
46c3e85bdcSAkhil Goyal 	DPAA_SEC_NONE,  /*!< No Cipher operations*/
47c3e85bdcSAkhil Goyal 	DPAA_SEC_CIPHER,/*!< CIPHER operations */
48c3e85bdcSAkhil Goyal 	DPAA_SEC_AUTH,  /*!< Authentication Operations */
498524b44eSHemant Agrawal 	DPAA_SEC_AEAD,  /*!< AEAD (AES-GCM/CCM) type operations */
508524b44eSHemant Agrawal 	DPAA_SEC_CIPHER_HASH,  /*!< Authenticated Encryption with
518524b44eSHemant Agrawal 				* associated data
528524b44eSHemant Agrawal 				*/
538524b44eSHemant Agrawal 	DPAA_SEC_HASH_CIPHER,  /*!< Encryption with Authenticated
548524b44eSHemant Agrawal 				* associated data
558524b44eSHemant Agrawal 				*/
56c3e85bdcSAkhil Goyal 	DPAA_SEC_IPSEC, /*!< IPSEC protocol operations*/
57c3e85bdcSAkhil Goyal 	DPAA_SEC_PDCP,  /*!< PDCP protocol operations*/
58c3e85bdcSAkhil Goyal 	DPAA_SEC_PKC,   /*!< Public Key Cryptographic Operations */
59c3e85bdcSAkhil Goyal 	DPAA_SEC_MAX
60c3e85bdcSAkhil Goyal };
61c3e85bdcSAkhil Goyal 
62c3e85bdcSAkhil Goyal #define DPAA_SEC_MAX_DESC_SIZE  64
63c3e85bdcSAkhil Goyal /* code or cmd block to caam */
64c3e85bdcSAkhil Goyal struct sec_cdb {
65*e7750639SAndre Muezerie 	struct __rte_packed_begin {
66*e7750639SAndre Muezerie 		union __rte_packed_begin {
67c3e85bdcSAkhil Goyal 			uint32_t word;
68c3e85bdcSAkhil Goyal 			struct {
69c3e85bdcSAkhil Goyal #if RTE_BYTE_ORDER == RTE_BIG_ENDIAN
70c3e85bdcSAkhil Goyal 				uint16_t rsvd63_48;
71c3e85bdcSAkhil Goyal 				unsigned int rsvd47_39:9;
72c3e85bdcSAkhil Goyal 				unsigned int idlen:7;
73c3e85bdcSAkhil Goyal #else
74c3e85bdcSAkhil Goyal 				unsigned int idlen:7;
75c3e85bdcSAkhil Goyal 				unsigned int rsvd47_39:9;
76c3e85bdcSAkhil Goyal 				uint16_t rsvd63_48;
77c3e85bdcSAkhil Goyal #endif
78c3e85bdcSAkhil Goyal 			} field;
79*e7750639SAndre Muezerie 		} __rte_packed_end hi;
80c3e85bdcSAkhil Goyal 
81*e7750639SAndre Muezerie 		union __rte_packed_begin {
82c3e85bdcSAkhil Goyal 			uint32_t word;
83c3e85bdcSAkhil Goyal 			struct {
84c3e85bdcSAkhil Goyal #if RTE_BYTE_ORDER == RTE_BIG_ENDIAN
85c3e85bdcSAkhil Goyal 				unsigned int rsvd31_30:2;
86c3e85bdcSAkhil Goyal 				unsigned int fsgt:1;
87c3e85bdcSAkhil Goyal 				unsigned int lng:1;
88c3e85bdcSAkhil Goyal 				unsigned int offset:2;
89c3e85bdcSAkhil Goyal 				unsigned int abs:1;
90c3e85bdcSAkhil Goyal 				unsigned int add_buf:1;
91c3e85bdcSAkhil Goyal 				uint8_t pool_id;
92c3e85bdcSAkhil Goyal 				uint16_t pool_buffer_size;
93c3e85bdcSAkhil Goyal #else
94c3e85bdcSAkhil Goyal 				uint16_t pool_buffer_size;
95c3e85bdcSAkhil Goyal 				uint8_t pool_id;
96c3e85bdcSAkhil Goyal 				unsigned int add_buf:1;
97c3e85bdcSAkhil Goyal 				unsigned int abs:1;
98c3e85bdcSAkhil Goyal 				unsigned int offset:2;
99c3e85bdcSAkhil Goyal 				unsigned int lng:1;
100c3e85bdcSAkhil Goyal 				unsigned int fsgt:1;
101c3e85bdcSAkhil Goyal 				unsigned int rsvd31_30:2;
102c3e85bdcSAkhil Goyal #endif
103c3e85bdcSAkhil Goyal 			} field;
104*e7750639SAndre Muezerie 		} __rte_packed_end lo;
105*e7750639SAndre Muezerie 	} __rte_packed_end sh_hdr;
106c3e85bdcSAkhil Goyal 
107c3e85bdcSAkhil Goyal 	uint32_t sh_desc[DPAA_SEC_MAX_DESC_SIZE];
108c3e85bdcSAkhil Goyal };
10976c129ceSMaxime Coquelin 
110a1173d55SHemant Agrawal /*!
111a1173d55SHemant Agrawal  * The structure is to be filled by user as a part of
112a1173d55SHemant Agrawal  * dpaa_sec_proto_ctxt for PDCP Protocol
113a1173d55SHemant Agrawal  */
114a1173d55SHemant Agrawal struct sec_pdcp_ctxt {
115a1173d55SHemant Agrawal 	enum rte_security_pdcp_domain domain; /*!< Data/Control mode*/
116a1173d55SHemant Agrawal 	int8_t bearer;	/*!< PDCP bearer ID */
117a1173d55SHemant Agrawal 	int8_t pkt_dir;/*!< PDCP Frame Direction 0:UL 1:DL*/
118a1173d55SHemant Agrawal 	int8_t hfn_ovd;/*!< Overwrite HFN per packet*/
1196a0c9d36SAkhil Goyal 	uint8_t sn_size;	/*!< Sequence number size, 5/7/12/15/18 */
1205a4954bcSAkhil Goyal 	uint8_t sdap_enabled;	/*!< SDAP header is enabled */
1215a4954bcSAkhil Goyal 	uint16_t hfn_ovd_offset;/*!< offset from rte_crypto_op at which
1226a0c9d36SAkhil Goyal 				 * per packet hfn is stored
1236a0c9d36SAkhil Goyal 				 */
124a1173d55SHemant Agrawal 	uint32_t hfn;	/*!< Hyper Frame Number */
125a1173d55SHemant Agrawal 	uint32_t hfn_threshold;	/*!< HFN Threashold for key renegotiation */
126a1173d55SHemant Agrawal };
1279d5f73c2SGagandeep Singh 
1289d5f73c2SGagandeep Singh typedef int (*dpaa_sec_build_fd_t)(
1299d5f73c2SGagandeep Singh 	void *qp, uint8_t *drv_ctx, struct rte_crypto_vec *data_vec,
1309d5f73c2SGagandeep Singh 	uint16_t n_data_vecs, union rte_crypto_sym_ofs ofs,
1319d5f73c2SGagandeep Singh 	struct rte_crypto_va_iova_ptr *iv,
1329d5f73c2SGagandeep Singh 	struct rte_crypto_va_iova_ptr *digest,
1339d5f73c2SGagandeep Singh 	struct rte_crypto_va_iova_ptr *aad_or_auth_iv,
1349d5f73c2SGagandeep Singh 	void *user_data);
1359d5f73c2SGagandeep Singh 
1369d5f73c2SGagandeep Singh typedef struct dpaa_sec_job* (*dpaa_sec_build_raw_dp_fd_t)(uint8_t *drv_ctx,
1379d5f73c2SGagandeep Singh 			struct rte_crypto_sgl *sgl,
1389d5f73c2SGagandeep Singh 			struct rte_crypto_sgl *dest_sgl,
1399d5f73c2SGagandeep Singh 			struct rte_crypto_va_iova_ptr *iv,
1409d5f73c2SGagandeep Singh 			struct rte_crypto_va_iova_ptr *digest,
1419d5f73c2SGagandeep Singh 			struct rte_crypto_va_iova_ptr *auth_iv,
1429d5f73c2SGagandeep Singh 			union rte_crypto_sym_ofs ofs,
14378156d38SGagandeep Singh 			void *userdata,
14478156d38SGagandeep Singh 			struct qm_fd *fd);
1459d5f73c2SGagandeep Singh 
14632d8bc55SBarry Cao struct dpaa_ipv4_udp {
14732d8bc55SBarry Cao 	struct ip ip4_hdr;
14832d8bc55SBarry Cao 	struct rte_udp_hdr udp_hdr;
14932d8bc55SBarry Cao };
15032d8bc55SBarry Cao 
15132d8bc55SBarry Cao struct dpaa_ipv6_udp {
15232d8bc55SBarry Cao 	struct rte_ipv6_hdr ip6_hdr;
15332d8bc55SBarry Cao 	struct rte_udp_hdr udp_hdr;
15432d8bc55SBarry Cao };
15532d8bc55SBarry Cao 
156e79416d1SHemant Agrawal typedef struct dpaa_sec_session_entry {
15761f07418SGagandeep Singh 	struct sec_cdb cdb;	/**< cmd block associated with qp */
15861f07418SGagandeep Singh 	struct dpaa_sec_qp *qp[MAX_DPAA_CORES];
15961f07418SGagandeep Singh 	struct qman_fq *inq[MAX_DPAA_CORES];
160e79416d1SHemant Agrawal 	uint8_t dir;         /*!< Operation Direction */
1618524b44eSHemant Agrawal 	uint8_t ctxt;	/*!< Session Context Type */
162e79416d1SHemant Agrawal 	enum rte_crypto_cipher_algorithm cipher_alg; /*!< Cipher Algorithm*/
163e79416d1SHemant Agrawal 	enum rte_crypto_auth_algorithm auth_alg; /*!< Authentication Algorithm*/
1641f14d500SAkhil Goyal 	enum rte_crypto_aead_algorithm aead_alg; /*!< AEAD Algorithm*/
1651f14d500SAkhil Goyal 	enum rte_security_session_protocol proto_alg; /*!< Security Algorithm*/
1669d5f73c2SGagandeep Singh 	dpaa_sec_build_fd_t build_fd;
1679d5f73c2SGagandeep Singh 	dpaa_sec_build_raw_dp_fd_t build_raw_dp_fd;
168e79416d1SHemant Agrawal 	union {
169e79416d1SHemant Agrawal 		struct {
170e79416d1SHemant Agrawal 			uint8_t *data;	/**< pointer to key data */
171e79416d1SHemant Agrawal 			size_t length;	/**< key length in bytes */
1728524b44eSHemant Agrawal 			uint32_t alg;
1738524b44eSHemant Agrawal 			uint32_t algmode;
174e79416d1SHemant Agrawal 		} aead_key;
175e79416d1SHemant Agrawal 		struct {
176e79416d1SHemant Agrawal 			struct {
177e79416d1SHemant Agrawal 				uint8_t *data;	/**< pointer to key data */
178e79416d1SHemant Agrawal 				size_t length;	/**< key length in bytes */
1798524b44eSHemant Agrawal 				uint32_t alg;
1808524b44eSHemant Agrawal 				uint32_t algmode;
181e79416d1SHemant Agrawal 			} cipher_key;
182e79416d1SHemant Agrawal 			struct {
183e79416d1SHemant Agrawal 				uint8_t *data;	/**< pointer to key data */
184e79416d1SHemant Agrawal 				size_t length;	/**< key length in bytes */
1858524b44eSHemant Agrawal 				uint32_t alg;
1868524b44eSHemant Agrawal 				uint32_t algmode;
187e79416d1SHemant Agrawal 			} auth_key;
188e79416d1SHemant Agrawal 		};
189e79416d1SHemant Agrawal 	};
190a1173d55SHemant Agrawal 	union {
191a1173d55SHemant Agrawal 		struct {
192e79416d1SHemant Agrawal 			struct {
193e79416d1SHemant Agrawal 				uint16_t length;
194e79416d1SHemant Agrawal 				uint16_t offset;
195e79416d1SHemant Agrawal 			} iv;	/**< Initialisation vector parameters */
196a1173d55SHemant Agrawal 			uint16_t auth_only_len;
197a1173d55SHemant Agrawal 					/*!< Length of data for Auth only */
198e79416d1SHemant Agrawal 			uint32_t digest_length;
199a1173d55SHemant Agrawal 			struct ipsec_decap_pdb decap_pdb;
2001f14d500SAkhil Goyal 			struct ipsec_encap_pdb encap_pdb;
2015ab35d2eSAkhil Goyal 			union {
2021f14d500SAkhil Goyal 				struct ip ip4_hdr;
2035ab35d2eSAkhil Goyal 				struct rte_ipv6_hdr ip6_hdr;
20432d8bc55SBarry Cao 				struct dpaa_ipv4_udp udp4;
20532d8bc55SBarry Cao 				struct dpaa_ipv6_udp udp6;
2065ab35d2eSAkhil Goyal 			};
2078524b44eSHemant Agrawal 			uint8_t auth_cipher_text;
2088524b44eSHemant Agrawal 				/**< Authenticate/cipher ordering */
209a1173d55SHemant Agrawal 		};
210a1173d55SHemant Agrawal 		struct sec_pdcp_ctxt pdcp;
211a1173d55SHemant Agrawal 	};
212e79416d1SHemant Agrawal } dpaa_sec_session;
213e79416d1SHemant Agrawal 
214c3e85bdcSAkhil Goyal struct dpaa_sec_qp {
215c3e85bdcSAkhil Goyal 	struct dpaa_sec_dev_private *internals;
2162ffb940eSAkhil Goyal 	struct rte_mempool *ctx_pool; /* mempool for dpaa_sec_op_ctx */
217c3e85bdcSAkhil Goyal 	struct qman_fq outq;
218c3e85bdcSAkhil Goyal 	int rx_pkts;
219c3e85bdcSAkhil Goyal 	int rx_errs;
220c3e85bdcSAkhil Goyal 	int tx_pkts;
221c3e85bdcSAkhil Goyal 	int tx_errs;
222c3e85bdcSAkhil Goyal };
223c3e85bdcSAkhil Goyal 
224551a42a9SHemant Agrawal #define RTE_DPAA_MAX_NB_SEC_QPS 2
2254e694fe5SAkhil Goyal #define RTE_DPAA_MAX_RX_QUEUE (MAX_DPAA_CORES * RTE_DPAA_SEC_PMD_MAX_NB_SESSIONS)
2269a984458SAkhil Goyal #define DPAA_MAX_DEQUEUE_NUM_FRAMES 63
227e79416d1SHemant Agrawal 
228c3e85bdcSAkhil Goyal /* internal sec queue interface */
229c3e85bdcSAkhil Goyal struct dpaa_sec_dev_private {
230c3e85bdcSAkhil Goyal 	void *sec_hw;
231e79416d1SHemant Agrawal 	struct dpaa_sec_qp qps[RTE_DPAA_MAX_NB_SEC_QPS]; /* i/o queue for sec */
232e79416d1SHemant Agrawal 	struct qman_fq inq[RTE_DPAA_MAX_RX_QUEUE];
233e79416d1SHemant Agrawal 	unsigned char inq_attach[RTE_DPAA_MAX_RX_QUEUE];
234c3e85bdcSAkhil Goyal 	unsigned int max_nb_queue_pairs;
235c3e85bdcSAkhil Goyal 	unsigned int max_nb_sessions;
2363b617ee7SAkhil Goyal 	rte_spinlock_t lock;
237c3e85bdcSAkhil Goyal };
238c3e85bdcSAkhil Goyal 
239c3e85bdcSAkhil Goyal #define MAX_SG_ENTRIES		16
240f7a5752eSHemant Agrawal #define MAX_JOB_SG_ENTRIES	36
241f7a5752eSHemant Agrawal 
242c3e85bdcSAkhil Goyal struct dpaa_sec_job {
243c3e85bdcSAkhil Goyal 	/* sg[0] output, sg[1] input, others are possible sub frames */
244f7a5752eSHemant Agrawal 	struct qm_sg_entry sg[MAX_JOB_SG_ENTRIES];
245c3e85bdcSAkhil Goyal };
246c3e85bdcSAkhil Goyal 
247841147efSGagandeep Singh #define DPAA_MAX_NB_MAX_DIGEST	64
248c3e85bdcSAkhil Goyal struct dpaa_sec_op_ctx {
249c3e85bdcSAkhil Goyal 	struct dpaa_sec_job job;
2509d5f73c2SGagandeep Singh 	union {
251c3e85bdcSAkhil Goyal 		struct rte_crypto_op *op;
2529d5f73c2SGagandeep Singh 		void *userdata;
2539d5f73c2SGagandeep Singh 	};
254c3e85bdcSAkhil Goyal 	struct rte_mempool *ctx_pool; /* mempool pointer for dpaa_sec_op_ctx */
255c3e85bdcSAkhil Goyal 	uint32_t fd_status;
256fcf67029SHemant Agrawal 	int64_t vtop_offset;
257c3e85bdcSAkhil Goyal 	uint8_t digest[DPAA_MAX_NB_MAX_DIGEST];
258c3e85bdcSAkhil Goyal };
259c3e85bdcSAkhil Goyal 
260c3e85bdcSAkhil Goyal static const struct rte_cryptodev_capabilities dpaa_sec_capabilities[] = {
261f73d6928SHemant Agrawal 	{	/* NULL (AUTH) */
262f73d6928SHemant Agrawal 		.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
263f73d6928SHemant Agrawal 		{.sym = {
264f73d6928SHemant Agrawal 			.xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,
265f73d6928SHemant Agrawal 			{.auth = {
266f73d6928SHemant Agrawal 				.algo = RTE_CRYPTO_AUTH_NULL,
267f73d6928SHemant Agrawal 				.block_size = 1,
268f73d6928SHemant Agrawal 				.key_size = {
269f73d6928SHemant Agrawal 					.min = 0,
270f73d6928SHemant Agrawal 					.max = 0,
271f73d6928SHemant Agrawal 					.increment = 0
272f73d6928SHemant Agrawal 				},
273f73d6928SHemant Agrawal 				.digest_size = {
274f73d6928SHemant Agrawal 					.min = 0,
275f73d6928SHemant Agrawal 					.max = 0,
276f73d6928SHemant Agrawal 					.increment = 0
277f73d6928SHemant Agrawal 				},
278f73d6928SHemant Agrawal 				.iv_size = { 0 }
279f73d6928SHemant Agrawal 			}, },
280f73d6928SHemant Agrawal 		}, },
281f73d6928SHemant Agrawal 	},
2824c42352cSGagandeep Singh 	{       /* MD5 */
2834c42352cSGagandeep Singh 		.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
2844c42352cSGagandeep Singh 		{.sym = {
2854c42352cSGagandeep Singh 			.xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,
2864c42352cSGagandeep Singh 			{.auth = {
2874c42352cSGagandeep Singh 				.algo = RTE_CRYPTO_AUTH_MD5,
2884c42352cSGagandeep Singh 				.block_size = 64,
2894c42352cSGagandeep Singh 				.key_size = {
2904c42352cSGagandeep Singh 					.min = 0,
2914c42352cSGagandeep Singh 					.max = 0,
2924c42352cSGagandeep Singh 					.increment = 0
2934c42352cSGagandeep Singh 				},
2944c42352cSGagandeep Singh 				.digest_size = {
2954c42352cSGagandeep Singh 					.min = 16,
2964c42352cSGagandeep Singh 					.max = 16,
2974c42352cSGagandeep Singh 					.increment = 0
2984c42352cSGagandeep Singh 				},
2994c42352cSGagandeep Singh 				.iv_size = { 0 }
3004c42352cSGagandeep Singh 			}, }
3014c42352cSGagandeep Singh 		}, }
3024c42352cSGagandeep Singh 	},
303c3e85bdcSAkhil Goyal 	{	/* MD5 HMAC */
304c3e85bdcSAkhil Goyal 		.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
305c3e85bdcSAkhil Goyal 		{.sym = {
306c3e85bdcSAkhil Goyal 			.xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,
307c3e85bdcSAkhil Goyal 			{.auth = {
308c3e85bdcSAkhil Goyal 				.algo = RTE_CRYPTO_AUTH_MD5_HMAC,
309c3e85bdcSAkhil Goyal 				.block_size = 64,
310c3e85bdcSAkhil Goyal 				.key_size = {
311c3e85bdcSAkhil Goyal 					.min = 1,
312c3e85bdcSAkhil Goyal 					.max = 64,
313c3e85bdcSAkhil Goyal 					.increment = 1
314c3e85bdcSAkhil Goyal 				},
315c3e85bdcSAkhil Goyal 				.digest_size = {
3166c9c2e46SHemant Agrawal 					.min = 1,
317c3e85bdcSAkhil Goyal 					.max = 16,
3186c9c2e46SHemant Agrawal 					.increment = 1
319c3e85bdcSAkhil Goyal 				},
3206c9c2e46SHemant Agrawal 				.iv_size = { 0 }
321c3e85bdcSAkhil Goyal 			}, }
322c3e85bdcSAkhil Goyal 		}, }
323c3e85bdcSAkhil Goyal 	},
3244c42352cSGagandeep Singh 	{	/* SHA1 */
3254c42352cSGagandeep Singh 		.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
3264c42352cSGagandeep Singh 		{.sym = {
3274c42352cSGagandeep Singh 			.xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,
3284c42352cSGagandeep Singh 			{.auth = {
3294c42352cSGagandeep Singh 				.algo = RTE_CRYPTO_AUTH_SHA1,
3304c42352cSGagandeep Singh 				.block_size = 64,
3314c42352cSGagandeep Singh 				.key_size = {
3324c42352cSGagandeep Singh 					.min = 0,
3334c42352cSGagandeep Singh 					.max = 0,
3344c42352cSGagandeep Singh 					.increment = 0
3354c42352cSGagandeep Singh 				},
3364c42352cSGagandeep Singh 				.digest_size = {
3374c42352cSGagandeep Singh 					.min = 20,
3384c42352cSGagandeep Singh 					.max = 20,
3394c42352cSGagandeep Singh 					.increment = 0
3404c42352cSGagandeep Singh 				},
3414c42352cSGagandeep Singh 				.iv_size = { 0 }
3424c42352cSGagandeep Singh 			}, }
3434c42352cSGagandeep Singh 		}, }
3444c42352cSGagandeep Singh 	},
345c3e85bdcSAkhil Goyal 	{	/* SHA1 HMAC */
346c3e85bdcSAkhil Goyal 		.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
347c3e85bdcSAkhil Goyal 		{.sym = {
348c3e85bdcSAkhil Goyal 			.xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,
349c3e85bdcSAkhil Goyal 			{.auth = {
350c3e85bdcSAkhil Goyal 				.algo = RTE_CRYPTO_AUTH_SHA1_HMAC,
351c3e85bdcSAkhil Goyal 				.block_size = 64,
352c3e85bdcSAkhil Goyal 				.key_size = {
353c3e85bdcSAkhil Goyal 					.min = 1,
354c3e85bdcSAkhil Goyal 					.max = 64,
355c3e85bdcSAkhil Goyal 					.increment = 1
356c3e85bdcSAkhil Goyal 				},
357c3e85bdcSAkhil Goyal 				.digest_size = {
3586c9c2e46SHemant Agrawal 					.min = 1,
359c3e85bdcSAkhil Goyal 					.max = 20,
3606c9c2e46SHemant Agrawal 					.increment = 1
361c3e85bdcSAkhil Goyal 				},
3626c9c2e46SHemant Agrawal 				.iv_size = { 0 }
363c3e85bdcSAkhil Goyal 			}, }
364c3e85bdcSAkhil Goyal 		}, }
365c3e85bdcSAkhil Goyal 	},
3664c42352cSGagandeep Singh 	{	/* SHA224 */
3674c42352cSGagandeep Singh 		.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
3684c42352cSGagandeep Singh 		{.sym = {
3694c42352cSGagandeep Singh 			.xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,
3704c42352cSGagandeep Singh 			{.auth = {
3714c42352cSGagandeep Singh 				.algo = RTE_CRYPTO_AUTH_SHA224,
3724c42352cSGagandeep Singh 				.block_size = 64,
3734c42352cSGagandeep Singh 					.key_size = {
3744c42352cSGagandeep Singh 					.min = 0,
3754c42352cSGagandeep Singh 					.max = 0,
3764c42352cSGagandeep Singh 					.increment = 0
3774c42352cSGagandeep Singh 				},
3784c42352cSGagandeep Singh 				.digest_size = {
3794c42352cSGagandeep Singh 					.min = 28,
3804c42352cSGagandeep Singh 					.max = 28,
3814c42352cSGagandeep Singh 					.increment = 0
3824c42352cSGagandeep Singh 				},
3834c42352cSGagandeep Singh 				.iv_size = { 0 }
3844c42352cSGagandeep Singh 			}, }
3854c42352cSGagandeep Singh 		}, }
3864c42352cSGagandeep Singh 	},
387c3e85bdcSAkhil Goyal 	{	/* SHA224 HMAC */
388c3e85bdcSAkhil Goyal 		.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
389c3e85bdcSAkhil Goyal 		{.sym = {
390c3e85bdcSAkhil Goyal 			.xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,
391c3e85bdcSAkhil Goyal 			{.auth = {
392c3e85bdcSAkhil Goyal 				.algo = RTE_CRYPTO_AUTH_SHA224_HMAC,
393c3e85bdcSAkhil Goyal 				.block_size = 64,
394c3e85bdcSAkhil Goyal 				.key_size = {
395c3e85bdcSAkhil Goyal 					.min = 1,
396c3e85bdcSAkhil Goyal 					.max = 64,
397c3e85bdcSAkhil Goyal 					.increment = 1
398c3e85bdcSAkhil Goyal 				},
399c3e85bdcSAkhil Goyal 				.digest_size = {
4006c9c2e46SHemant Agrawal 					.min = 1,
401c3e85bdcSAkhil Goyal 					.max = 28,
4026c9c2e46SHemant Agrawal 					.increment = 1
403c3e85bdcSAkhil Goyal 				},
4046c9c2e46SHemant Agrawal 				.iv_size = { 0 }
405c3e85bdcSAkhil Goyal 			}, }
406c3e85bdcSAkhil Goyal 		}, }
407c3e85bdcSAkhil Goyal 	},
4084c42352cSGagandeep Singh 	{	/* SHA256 */
4094c42352cSGagandeep Singh 		.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
4104c42352cSGagandeep Singh 		{.sym = {
4114c42352cSGagandeep Singh 			.xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,
4124c42352cSGagandeep Singh 			{.auth = {
4134c42352cSGagandeep Singh 				.algo = RTE_CRYPTO_AUTH_SHA256,
4144c42352cSGagandeep Singh 				.block_size = 64,
4154c42352cSGagandeep Singh 				.key_size = {
4164c42352cSGagandeep Singh 					.min = 0,
4174c42352cSGagandeep Singh 					.max = 0,
4184c42352cSGagandeep Singh 					.increment = 0
4194c42352cSGagandeep Singh 				},
4204c42352cSGagandeep Singh 				.digest_size = {
4214c42352cSGagandeep Singh 					.min = 32,
4224c42352cSGagandeep Singh 					.max = 32,
4234c42352cSGagandeep Singh 					.increment = 0
4244c42352cSGagandeep Singh 				},
4254c42352cSGagandeep Singh 				.iv_size = { 0 }
4264c42352cSGagandeep Singh 			}, }
4274c42352cSGagandeep Singh 		}, }
4284c42352cSGagandeep Singh 	},
429c3e85bdcSAkhil Goyal 	{	/* SHA256 HMAC */
430c3e85bdcSAkhil Goyal 		.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
431c3e85bdcSAkhil Goyal 		{.sym = {
432c3e85bdcSAkhil Goyal 			.xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,
433c3e85bdcSAkhil Goyal 			{.auth = {
434c3e85bdcSAkhil Goyal 				.algo = RTE_CRYPTO_AUTH_SHA256_HMAC,
435c3e85bdcSAkhil Goyal 				.block_size = 64,
436c3e85bdcSAkhil Goyal 				.key_size = {
437c3e85bdcSAkhil Goyal 					.min = 1,
438c3e85bdcSAkhil Goyal 					.max = 64,
439c3e85bdcSAkhil Goyal 					.increment = 1
440c3e85bdcSAkhil Goyal 				},
441c3e85bdcSAkhil Goyal 				.digest_size = {
4426c9c2e46SHemant Agrawal 					.min = 1,
443c3e85bdcSAkhil Goyal 					.max = 32,
4446c9c2e46SHemant Agrawal 					.increment = 1
445c3e85bdcSAkhil Goyal 				},
4466c9c2e46SHemant Agrawal 				.iv_size = { 0 }
447c3e85bdcSAkhil Goyal 			}, }
448c3e85bdcSAkhil Goyal 		}, }
449c3e85bdcSAkhil Goyal 	},
4504c42352cSGagandeep Singh 	{	/* SHA384 */
4514c42352cSGagandeep Singh 		.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
4524c42352cSGagandeep Singh 		{.sym = {
4534c42352cSGagandeep Singh 			.xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,
4544c42352cSGagandeep Singh 			{.auth = {
4554c42352cSGagandeep Singh 				.algo = RTE_CRYPTO_AUTH_SHA384,
4564c42352cSGagandeep Singh 				.block_size = 64,
4574c42352cSGagandeep Singh 				.key_size = {
4584c42352cSGagandeep Singh 					.min = 0,
4594c42352cSGagandeep Singh 					.max = 0,
4604c42352cSGagandeep Singh 					.increment = 0
4614c42352cSGagandeep Singh 				},
4624c42352cSGagandeep Singh 				.digest_size = {
4634c42352cSGagandeep Singh 					.min = 48,
4644c42352cSGagandeep Singh 					.max = 48,
4654c42352cSGagandeep Singh 					.increment = 0
4664c42352cSGagandeep Singh 					},
4674c42352cSGagandeep Singh 				.iv_size = { 0 }
4684c42352cSGagandeep Singh 			}, }
4694c42352cSGagandeep Singh 		}, }
4704c42352cSGagandeep Singh 	},
471c3e85bdcSAkhil Goyal 	{	/* SHA384 HMAC */
472c3e85bdcSAkhil Goyal 		.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
473c3e85bdcSAkhil Goyal 		{.sym = {
474c3e85bdcSAkhil Goyal 			.xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,
475c3e85bdcSAkhil Goyal 			{.auth = {
476c3e85bdcSAkhil Goyal 				.algo = RTE_CRYPTO_AUTH_SHA384_HMAC,
477c3e85bdcSAkhil Goyal 				.block_size = 128,
478c3e85bdcSAkhil Goyal 				.key_size = {
479c3e85bdcSAkhil Goyal 					.min = 1,
480c3e85bdcSAkhil Goyal 					.max = 128,
481c3e85bdcSAkhil Goyal 					.increment = 1
482c3e85bdcSAkhil Goyal 				},
483c3e85bdcSAkhil Goyal 				.digest_size = {
4846c9c2e46SHemant Agrawal 					.min = 1,
485c3e85bdcSAkhil Goyal 					.max = 48,
4866c9c2e46SHemant Agrawal 					.increment = 1
487c3e85bdcSAkhil Goyal 				},
4886c9c2e46SHemant Agrawal 				.iv_size = { 0 }
489c3e85bdcSAkhil Goyal 			}, }
490c3e85bdcSAkhil Goyal 		}, }
491c3e85bdcSAkhil Goyal 	},
4924c42352cSGagandeep Singh 	{	/* SHA512 */
4934c42352cSGagandeep Singh 		.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
4944c42352cSGagandeep Singh 		{.sym = {
4954c42352cSGagandeep Singh 			.xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,
4964c42352cSGagandeep Singh 			{.auth = {
4974c42352cSGagandeep Singh 				.algo = RTE_CRYPTO_AUTH_SHA512,
4984c42352cSGagandeep Singh 				.block_size = 128,
4994c42352cSGagandeep Singh 				.key_size = {
5004c42352cSGagandeep Singh 					.min = 0,
5014c42352cSGagandeep Singh 					.max = 0,
5024c42352cSGagandeep Singh 					.increment = 0
5034c42352cSGagandeep Singh 				},
5044c42352cSGagandeep Singh 				.digest_size = {
5054c42352cSGagandeep Singh 					.min = 64,
5064c42352cSGagandeep Singh 					.max = 64,
5074c42352cSGagandeep Singh 					.increment = 0
5084c42352cSGagandeep Singh 				},
5094c42352cSGagandeep Singh 				.iv_size = { 0 }
5104c42352cSGagandeep Singh 			}, }
5114c42352cSGagandeep Singh 		}, }
5124c42352cSGagandeep Singh 	},
513c3e85bdcSAkhil Goyal 	{	/* SHA512 HMAC */
514c3e85bdcSAkhil Goyal 		.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
515c3e85bdcSAkhil Goyal 		{.sym = {
516c3e85bdcSAkhil Goyal 			.xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,
517c3e85bdcSAkhil Goyal 			{.auth = {
518c3e85bdcSAkhil Goyal 				.algo = RTE_CRYPTO_AUTH_SHA512_HMAC,
519c3e85bdcSAkhil Goyal 				.block_size = 128,
520c3e85bdcSAkhil Goyal 				.key_size = {
521c3e85bdcSAkhil Goyal 					.min = 1,
522c3e85bdcSAkhil Goyal 					.max = 128,
523c3e85bdcSAkhil Goyal 					.increment = 1
524c3e85bdcSAkhil Goyal 				},
525c3e85bdcSAkhil Goyal 				.digest_size = {
5266c9c2e46SHemant Agrawal 					.min = 1,
527c3e85bdcSAkhil Goyal 					.max = 64,
5286c9c2e46SHemant Agrawal 					.increment = 1
529c3e85bdcSAkhil Goyal 				},
5306c9c2e46SHemant Agrawal 				.iv_size = { 0 }
531c3e85bdcSAkhil Goyal 			}, }
532c3e85bdcSAkhil Goyal 		}, }
533c3e85bdcSAkhil Goyal 	},
534c3e85bdcSAkhil Goyal 	{	/* AES GCM */
535c3e85bdcSAkhil Goyal 		.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
536c3e85bdcSAkhil Goyal 		{.sym = {
537c3e85bdcSAkhil Goyal 			.xform_type = RTE_CRYPTO_SYM_XFORM_AEAD,
538c25a37d7SHemant Agrawal 			{.aead = {
539c3e85bdcSAkhil Goyal 				.algo = RTE_CRYPTO_AEAD_AES_GCM,
540c3e85bdcSAkhil Goyal 				.block_size = 16,
541c3e85bdcSAkhil Goyal 				.key_size = {
542c3e85bdcSAkhil Goyal 					.min = 16,
543c3e85bdcSAkhil Goyal 					.max = 32,
544c3e85bdcSAkhil Goyal 					.increment = 8
545c3e85bdcSAkhil Goyal 				},
546c3e85bdcSAkhil Goyal 				.digest_size = {
547c3e85bdcSAkhil Goyal 					.min = 8,
548c3e85bdcSAkhil Goyal 					.max = 16,
549c3e85bdcSAkhil Goyal 					.increment = 4
550c3e85bdcSAkhil Goyal 				},
551c3e85bdcSAkhil Goyal 				.aad_size = {
552c3e85bdcSAkhil Goyal 					.min = 0,
553c3e85bdcSAkhil Goyal 					.max = 240,
554c3e85bdcSAkhil Goyal 					.increment = 1
555c3e85bdcSAkhil Goyal 				},
556c3e85bdcSAkhil Goyal 				.iv_size = {
557c3e85bdcSAkhil Goyal 					.min = 12,
558c3e85bdcSAkhil Goyal 					.max = 12,
559c3e85bdcSAkhil Goyal 					.increment = 0
560c3e85bdcSAkhil Goyal 				},
561c3e85bdcSAkhil Goyal 			}, }
562c3e85bdcSAkhil Goyal 		}, }
563c3e85bdcSAkhil Goyal 	},
564f73d6928SHemant Agrawal 	{	/* NULL (CIPHER) */
565f73d6928SHemant Agrawal 		.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
566f73d6928SHemant Agrawal 		{.sym = {
567f73d6928SHemant Agrawal 			.xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER,
568f73d6928SHemant Agrawal 			{.cipher = {
569f73d6928SHemant Agrawal 				.algo = RTE_CRYPTO_CIPHER_NULL,
570f73d6928SHemant Agrawal 				.block_size = 1,
571f73d6928SHemant Agrawal 				.key_size = {
572f73d6928SHemant Agrawal 					.min = 0,
573f73d6928SHemant Agrawal 					.max = 0,
574f73d6928SHemant Agrawal 					.increment = 0
575f73d6928SHemant Agrawal 				},
576f73d6928SHemant Agrawal 				.iv_size = {
577f73d6928SHemant Agrawal 					.min = 0,
578f73d6928SHemant Agrawal 					.max = 0,
579f73d6928SHemant Agrawal 					.increment = 0
580f73d6928SHemant Agrawal 				}
581f73d6928SHemant Agrawal 			}, },
582f73d6928SHemant Agrawal 		}, }
583f73d6928SHemant Agrawal 	},
584c3e85bdcSAkhil Goyal 	{	/* AES CBC */
585c3e85bdcSAkhil Goyal 		.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
586c3e85bdcSAkhil Goyal 		{.sym = {
587c3e85bdcSAkhil Goyal 			.xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER,
588c3e85bdcSAkhil Goyal 			{.cipher = {
589c3e85bdcSAkhil Goyal 				.algo = RTE_CRYPTO_CIPHER_AES_CBC,
590c3e85bdcSAkhil Goyal 				.block_size = 16,
591c3e85bdcSAkhil Goyal 				.key_size = {
592c3e85bdcSAkhil Goyal 					.min = 16,
593c3e85bdcSAkhil Goyal 					.max = 32,
594c3e85bdcSAkhil Goyal 					.increment = 8
595c3e85bdcSAkhil Goyal 				},
596c3e85bdcSAkhil Goyal 				.iv_size = {
597c3e85bdcSAkhil Goyal 					.min = 16,
598c3e85bdcSAkhil Goyal 					.max = 16,
599c3e85bdcSAkhil Goyal 					.increment = 0
600c3e85bdcSAkhil Goyal 				}
601c3e85bdcSAkhil Goyal 			}, }
602c3e85bdcSAkhil Goyal 		}, }
603c3e85bdcSAkhil Goyal 	},
604c3e85bdcSAkhil Goyal 	{	/* AES CTR */
605c3e85bdcSAkhil Goyal 		.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
606c3e85bdcSAkhil Goyal 		{.sym = {
607c3e85bdcSAkhil Goyal 			.xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER,
608c3e85bdcSAkhil Goyal 			{.cipher = {
609c3e85bdcSAkhil Goyal 				.algo = RTE_CRYPTO_CIPHER_AES_CTR,
610c3e85bdcSAkhil Goyal 				.block_size = 16,
611c3e85bdcSAkhil Goyal 				.key_size = {
612c3e85bdcSAkhil Goyal 					.min = 16,
613c3e85bdcSAkhil Goyal 					.max = 32,
614c3e85bdcSAkhil Goyal 					.increment = 8
615c3e85bdcSAkhil Goyal 				},
616c3e85bdcSAkhil Goyal 				.iv_size = {
617c3e85bdcSAkhil Goyal 					.min = 16,
618c3e85bdcSAkhil Goyal 					.max = 16,
619c3e85bdcSAkhil Goyal 					.increment = 0
620a1173d55SHemant Agrawal 				},
621c3e85bdcSAkhil Goyal 			}, }
622c3e85bdcSAkhil Goyal 		}, }
623c3e85bdcSAkhil Goyal 	},
6243e4fbc6cSGagandeep Singh 	{       /* DES CBC */
6253e4fbc6cSGagandeep Singh 		.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
6263e4fbc6cSGagandeep Singh 		{.sym = {
6273e4fbc6cSGagandeep Singh 			.xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER,
6283e4fbc6cSGagandeep Singh 			{.cipher = {
6293e4fbc6cSGagandeep Singh 				.algo = RTE_CRYPTO_CIPHER_DES_CBC,
6303e4fbc6cSGagandeep Singh 				.block_size = 8,
6313e4fbc6cSGagandeep Singh 				.key_size = {
6323e4fbc6cSGagandeep Singh 					.min = 8,
6333e4fbc6cSGagandeep Singh 					.max = 8,
6343e4fbc6cSGagandeep Singh 					.increment = 0
6353e4fbc6cSGagandeep Singh 				},
6363e4fbc6cSGagandeep Singh 				.iv_size = {
6373e4fbc6cSGagandeep Singh 					.min = 8,
6383e4fbc6cSGagandeep Singh 					.max = 8,
6393e4fbc6cSGagandeep Singh 					.increment = 0
6403e4fbc6cSGagandeep Singh 				}
6413e4fbc6cSGagandeep Singh 			}, }
6423e4fbc6cSGagandeep Singh 		}, }
6433e4fbc6cSGagandeep Singh 	},
644c3e85bdcSAkhil Goyal 	{	/* 3DES CBC */
645c3e85bdcSAkhil Goyal 		.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
646c3e85bdcSAkhil Goyal 		{.sym = {
647c3e85bdcSAkhil Goyal 			.xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER,
648c3e85bdcSAkhil Goyal 			{.cipher = {
649c3e85bdcSAkhil Goyal 				.algo = RTE_CRYPTO_CIPHER_3DES_CBC,
650c3e85bdcSAkhil Goyal 				.block_size = 8,
651c3e85bdcSAkhil Goyal 				.key_size = {
652c3e85bdcSAkhil Goyal 					.min = 16,
653c3e85bdcSAkhil Goyal 					.max = 24,
654c3e85bdcSAkhil Goyal 					.increment = 8
655c3e85bdcSAkhil Goyal 				},
656c3e85bdcSAkhil Goyal 				.iv_size = {
657c3e85bdcSAkhil Goyal 					.min = 8,
658c3e85bdcSAkhil Goyal 					.max = 8,
659c3e85bdcSAkhil Goyal 					.increment = 0
660c3e85bdcSAkhil Goyal 				}
661c3e85bdcSAkhil Goyal 			}, }
662c3e85bdcSAkhil Goyal 		}, }
663c3e85bdcSAkhil Goyal 	},
664c5788a10SHemant Agrawal 	{	/* SNOW 3G (UIA2) */
665c5788a10SHemant Agrawal 		.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
666c5788a10SHemant Agrawal 		{.sym = {
667c5788a10SHemant Agrawal 			.xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,
668c5788a10SHemant Agrawal 			{.auth = {
669c5788a10SHemant Agrawal 				.algo = RTE_CRYPTO_AUTH_SNOW3G_UIA2,
670c5788a10SHemant Agrawal 				.block_size = 16,
671c5788a10SHemant Agrawal 				.key_size = {
672c5788a10SHemant Agrawal 					.min = 16,
673c5788a10SHemant Agrawal 					.max = 16,
674c5788a10SHemant Agrawal 					.increment = 0
675c5788a10SHemant Agrawal 				},
676c5788a10SHemant Agrawal 				.digest_size = {
677c5788a10SHemant Agrawal 					.min = 4,
678c5788a10SHemant Agrawal 					.max = 4,
679c5788a10SHemant Agrawal 					.increment = 0
680c5788a10SHemant Agrawal 				},
681c5788a10SHemant Agrawal 				.iv_size = {
682c5788a10SHemant Agrawal 					.min = 16,
683c5788a10SHemant Agrawal 					.max = 16,
684c5788a10SHemant Agrawal 					.increment = 0
685c5788a10SHemant Agrawal 				}
686c5788a10SHemant Agrawal 			}, }
687c5788a10SHemant Agrawal 		}, }
688c5788a10SHemant Agrawal 	},
689c5788a10SHemant Agrawal 	{	/* SNOW 3G (UEA2) */
690c5788a10SHemant Agrawal 		.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
691c5788a10SHemant Agrawal 		{.sym = {
692c5788a10SHemant Agrawal 			.xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER,
693c5788a10SHemant Agrawal 			{.cipher = {
694c5788a10SHemant Agrawal 				.algo = RTE_CRYPTO_CIPHER_SNOW3G_UEA2,
695c5788a10SHemant Agrawal 				.block_size = 16,
696c5788a10SHemant Agrawal 				.key_size = {
697c5788a10SHemant Agrawal 					.min = 16,
698c5788a10SHemant Agrawal 					.max = 16,
699c5788a10SHemant Agrawal 					.increment = 0
700c5788a10SHemant Agrawal 				},
701c5788a10SHemant Agrawal 				.iv_size = {
702c5788a10SHemant Agrawal 					.min = 16,
703c5788a10SHemant Agrawal 					.max = 16,
704c5788a10SHemant Agrawal 					.increment = 0
705c5788a10SHemant Agrawal 				}
706c5788a10SHemant Agrawal 			}, }
707c5788a10SHemant Agrawal 		}, }
708c5788a10SHemant Agrawal 	},
709c5788a10SHemant Agrawal 	{	/* ZUC (EEA3) */
710c5788a10SHemant Agrawal 		.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
711c5788a10SHemant Agrawal 		{.sym = {
712c5788a10SHemant Agrawal 			.xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER,
713c5788a10SHemant Agrawal 			{.cipher = {
714c5788a10SHemant Agrawal 				.algo = RTE_CRYPTO_CIPHER_ZUC_EEA3,
715c5788a10SHemant Agrawal 				.block_size = 16,
716c5788a10SHemant Agrawal 				.key_size = {
717c5788a10SHemant Agrawal 					.min = 16,
718c5788a10SHemant Agrawal 					.max = 16,
719c5788a10SHemant Agrawal 					.increment = 0
720c5788a10SHemant Agrawal 				},
721c5788a10SHemant Agrawal 				.iv_size = {
722c5788a10SHemant Agrawal 					.min = 16,
723c5788a10SHemant Agrawal 					.max = 16,
724c5788a10SHemant Agrawal 					.increment = 0
725c5788a10SHemant Agrawal 				}
726c5788a10SHemant Agrawal 			}, }
727c5788a10SHemant Agrawal 		}, }
728c5788a10SHemant Agrawal 	},
729c5788a10SHemant Agrawal 	{	/* ZUC (EIA3) */
730c5788a10SHemant Agrawal 		.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
731c5788a10SHemant Agrawal 		{.sym = {
732c5788a10SHemant Agrawal 			.xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,
733c5788a10SHemant Agrawal 			{.auth = {
734c5788a10SHemant Agrawal 				.algo = RTE_CRYPTO_AUTH_ZUC_EIA3,
735c5788a10SHemant Agrawal 				.block_size = 16,
736c5788a10SHemant Agrawal 				.key_size = {
737c5788a10SHemant Agrawal 					.min = 16,
738c5788a10SHemant Agrawal 					.max = 16,
739c5788a10SHemant Agrawal 					.increment = 0
740c5788a10SHemant Agrawal 				},
741c5788a10SHemant Agrawal 				.digest_size = {
742c5788a10SHemant Agrawal 					.min = 4,
743c5788a10SHemant Agrawal 					.max = 4,
744c5788a10SHemant Agrawal 					.increment = 0
745c5788a10SHemant Agrawal 				},
746c5788a10SHemant Agrawal 				.iv_size = {
747c5788a10SHemant Agrawal 					.min = 16,
748c5788a10SHemant Agrawal 					.max = 16,
749c5788a10SHemant Agrawal 					.increment = 0
750c5788a10SHemant Agrawal 				}
751c5788a10SHemant Agrawal 			}, }
752c5788a10SHemant Agrawal 		}, }
753c5788a10SHemant Agrawal 	},
7542ed12d9bSGagandeep Singh 	{       /* AES CMAC */
7552ed12d9bSGagandeep Singh 		.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
7562ed12d9bSGagandeep Singh 		{.sym = {
7572ed12d9bSGagandeep Singh 			.xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,
7582ed12d9bSGagandeep Singh 			{.auth = {
7592ed12d9bSGagandeep Singh 				.algo = RTE_CRYPTO_AUTH_AES_CMAC,
7602ed12d9bSGagandeep Singh 				.block_size = 16,
7612ed12d9bSGagandeep Singh 				.key_size = {
7622ed12d9bSGagandeep Singh 					.min = 1,
7632ed12d9bSGagandeep Singh 					.max = 16,
7642ed12d9bSGagandeep Singh 					.increment = 1
7652ed12d9bSGagandeep Singh 				},
7662ed12d9bSGagandeep Singh 				.digest_size = {
7672ed12d9bSGagandeep Singh 					.min = 12,
7682ed12d9bSGagandeep Singh 					.max = 16,
7692ed12d9bSGagandeep Singh 					.increment = 4
7702ed12d9bSGagandeep Singh 				},
7712ed12d9bSGagandeep Singh 				.iv_size = { 0 }
7722ed12d9bSGagandeep Singh 			}, }
7732ed12d9bSGagandeep Singh 		}, }
7742ed12d9bSGagandeep Singh 	},
7752ed12d9bSGagandeep Singh 	{       /* AES XCBC HMAC */
7762ed12d9bSGagandeep Singh 		.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
7772ed12d9bSGagandeep Singh 		{.sym = {
7782ed12d9bSGagandeep Singh 			.xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,
7792ed12d9bSGagandeep Singh 			{.auth = {
7802ed12d9bSGagandeep Singh 				.algo = RTE_CRYPTO_AUTH_AES_XCBC_MAC,
7812ed12d9bSGagandeep Singh 				.block_size = 16,
7822ed12d9bSGagandeep Singh 				.key_size = {
7832ed12d9bSGagandeep Singh 					.min = 1,
7842ed12d9bSGagandeep Singh 					.max = 16,
7852ed12d9bSGagandeep Singh 					.increment = 1
7862ed12d9bSGagandeep Singh 				},
7872ed12d9bSGagandeep Singh 				.digest_size = {
7882ed12d9bSGagandeep Singh 					.min = 12,
7892ed12d9bSGagandeep Singh 					.max = 16,
7902ed12d9bSGagandeep Singh 					.increment = 4
7912ed12d9bSGagandeep Singh 				},
7922ed12d9bSGagandeep Singh 				.aad_size = { 0 },
7932ed12d9bSGagandeep Singh 				.iv_size = { 0 }
7942ed12d9bSGagandeep Singh 			}, }
7952ed12d9bSGagandeep Singh 		}, }
7962ed12d9bSGagandeep Singh 	},
79701e378c4SHemant Agrawal 	{	/* NULL (AUTH) */
79801e378c4SHemant Agrawal 		.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
79901e378c4SHemant Agrawal 		{.sym = {
80001e378c4SHemant Agrawal 			.xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,
80101e378c4SHemant Agrawal 			{.auth = {
80201e378c4SHemant Agrawal 				.algo = RTE_CRYPTO_AUTH_NULL,
80301e378c4SHemant Agrawal 				.block_size = 1,
80401e378c4SHemant Agrawal 				.key_size = {
80501e378c4SHemant Agrawal 					.min = 0,
80601e378c4SHemant Agrawal 					.max = 0,
80701e378c4SHemant Agrawal 					.increment = 0
80801e378c4SHemant Agrawal 				},
80901e378c4SHemant Agrawal 				.digest_size = {
81001e378c4SHemant Agrawal 					.min = 0,
81101e378c4SHemant Agrawal 					.max = 0,
81201e378c4SHemant Agrawal 					.increment = 0
81301e378c4SHemant Agrawal 				},
81401e378c4SHemant Agrawal 			}, },
81501e378c4SHemant Agrawal 		}, },
81601e378c4SHemant Agrawal 	},
81701e378c4SHemant Agrawal 	{	/* NULL (CIPHER) */
81801e378c4SHemant Agrawal 		.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
81901e378c4SHemant Agrawal 		{.sym = {
82001e378c4SHemant Agrawal 			.xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER,
82101e378c4SHemant Agrawal 			{.cipher = {
82201e378c4SHemant Agrawal 				.algo = RTE_CRYPTO_CIPHER_NULL,
82301e378c4SHemant Agrawal 				.block_size = 1,
82401e378c4SHemant Agrawal 				.key_size = {
82501e378c4SHemant Agrawal 					.min = 0,
82601e378c4SHemant Agrawal 					.max = 0,
82701e378c4SHemant Agrawal 					.increment = 0
82801e378c4SHemant Agrawal 				},
82901e378c4SHemant Agrawal 				.iv_size = {
83001e378c4SHemant Agrawal 					.min = 0,
83101e378c4SHemant Agrawal 					.max = 0,
83201e378c4SHemant Agrawal 					.increment = 0
83301e378c4SHemant Agrawal 				}
83401e378c4SHemant Agrawal 			}, },
83501e378c4SHemant Agrawal 		}, }
83601e378c4SHemant Agrawal 	},
837c3e85bdcSAkhil Goyal 	RTE_CRYPTODEV_END_OF_CAPABILITIES_LIST()
838c3e85bdcSAkhil Goyal };
839c3e85bdcSAkhil Goyal 
840a1173d55SHemant Agrawal static const struct rte_cryptodev_capabilities dpaa_pdcp_capabilities[] = {
841a1173d55SHemant Agrawal 	{	/* SNOW 3G (UIA2) */
842a1173d55SHemant Agrawal 		.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
843a1173d55SHemant Agrawal 		{.sym = {
844a1173d55SHemant Agrawal 			.xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,
845a1173d55SHemant Agrawal 			{.auth = {
846a1173d55SHemant Agrawal 				.algo = RTE_CRYPTO_AUTH_SNOW3G_UIA2,
847a1173d55SHemant Agrawal 				.block_size = 16,
848a1173d55SHemant Agrawal 				.key_size = {
849a1173d55SHemant Agrawal 					.min = 16,
850a1173d55SHemant Agrawal 					.max = 16,
851a1173d55SHemant Agrawal 					.increment = 0
852a1173d55SHemant Agrawal 				},
853a1173d55SHemant Agrawal 				.digest_size = {
854a1173d55SHemant Agrawal 					.min = 4,
855a1173d55SHemant Agrawal 					.max = 4,
856a1173d55SHemant Agrawal 					.increment = 0
857a1173d55SHemant Agrawal 				},
858a1173d55SHemant Agrawal 				.iv_size = {
859a1173d55SHemant Agrawal 					.min = 16,
860a1173d55SHemant Agrawal 					.max = 16,
861a1173d55SHemant Agrawal 					.increment = 0
862a1173d55SHemant Agrawal 				}
863a1173d55SHemant Agrawal 			}, }
864a1173d55SHemant Agrawal 		}, }
865a1173d55SHemant Agrawal 	},
866a1173d55SHemant Agrawal 	{	/* SNOW 3G (UEA2) */
867a1173d55SHemant Agrawal 		.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
868a1173d55SHemant Agrawal 		{.sym = {
869a1173d55SHemant Agrawal 			.xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER,
870a1173d55SHemant Agrawal 			{.cipher = {
871a1173d55SHemant Agrawal 				.algo = RTE_CRYPTO_CIPHER_SNOW3G_UEA2,
872a1173d55SHemant Agrawal 				.block_size = 16,
873a1173d55SHemant Agrawal 				.key_size = {
874a1173d55SHemant Agrawal 					.min = 16,
875a1173d55SHemant Agrawal 					.max = 16,
876a1173d55SHemant Agrawal 					.increment = 0
877a1173d55SHemant Agrawal 				},
878a1173d55SHemant Agrawal 				.iv_size = {
879a1173d55SHemant Agrawal 					.min = 16,
880a1173d55SHemant Agrawal 					.max = 16,
881a1173d55SHemant Agrawal 					.increment = 0
882a1173d55SHemant Agrawal 				}
883a1173d55SHemant Agrawal 			}, }
884a1173d55SHemant Agrawal 		}, }
885a1173d55SHemant Agrawal 	},
886a1173d55SHemant Agrawal 	{	/* AES CTR */
887a1173d55SHemant Agrawal 		.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
888a1173d55SHemant Agrawal 		{.sym = {
889a1173d55SHemant Agrawal 			.xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER,
890a1173d55SHemant Agrawal 			{.cipher = {
891a1173d55SHemant Agrawal 				.algo = RTE_CRYPTO_CIPHER_AES_CTR,
892a1173d55SHemant Agrawal 				.block_size = 16,
893a1173d55SHemant Agrawal 				.key_size = {
894a1173d55SHemant Agrawal 					.min = 16,
895a1173d55SHemant Agrawal 					.max = 32,
896a1173d55SHemant Agrawal 					.increment = 8
897a1173d55SHemant Agrawal 				},
898a1173d55SHemant Agrawal 				.iv_size = {
899a1173d55SHemant Agrawal 					.min = 16,
900a1173d55SHemant Agrawal 					.max = 16,
901a1173d55SHemant Agrawal 					.increment = 0
902a1173d55SHemant Agrawal 				}
903a1173d55SHemant Agrawal 			}, }
904a1173d55SHemant Agrawal 		}, }
905a1173d55SHemant Agrawal 	},
906a1173d55SHemant Agrawal 	{	/* NULL (AUTH) */
907a1173d55SHemant Agrawal 		.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
908a1173d55SHemant Agrawal 		{.sym = {
909a1173d55SHemant Agrawal 			.xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,
910a1173d55SHemant Agrawal 			{.auth = {
911a1173d55SHemant Agrawal 				.algo = RTE_CRYPTO_AUTH_NULL,
912a1173d55SHemant Agrawal 				.block_size = 1,
913a1173d55SHemant Agrawal 				.key_size = {
914a1173d55SHemant Agrawal 					.min = 0,
915a1173d55SHemant Agrawal 					.max = 0,
916a1173d55SHemant Agrawal 					.increment = 0
917a1173d55SHemant Agrawal 				},
918a1173d55SHemant Agrawal 				.digest_size = {
919a1173d55SHemant Agrawal 					.min = 0,
920a1173d55SHemant Agrawal 					.max = 0,
921a1173d55SHemant Agrawal 					.increment = 0
922a1173d55SHemant Agrawal 				},
923a1173d55SHemant Agrawal 				.iv_size = { 0 }
924a1173d55SHemant Agrawal 			}, },
925a1173d55SHemant Agrawal 		}, },
926a1173d55SHemant Agrawal 	},
927a1173d55SHemant Agrawal 	{	/* NULL (CIPHER) */
928a1173d55SHemant Agrawal 		.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
929a1173d55SHemant Agrawal 		{.sym = {
930a1173d55SHemant Agrawal 			.xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER,
931a1173d55SHemant Agrawal 			{.cipher = {
932a1173d55SHemant Agrawal 				.algo = RTE_CRYPTO_CIPHER_NULL,
933a1173d55SHemant Agrawal 				.block_size = 1,
934a1173d55SHemant Agrawal 				.key_size = {
935a1173d55SHemant Agrawal 					.min = 0,
936a1173d55SHemant Agrawal 					.max = 0,
937a1173d55SHemant Agrawal 					.increment = 0
938a1173d55SHemant Agrawal 				},
939a1173d55SHemant Agrawal 				.iv_size = {
940a1173d55SHemant Agrawal 					.min = 0,
941a1173d55SHemant Agrawal 					.max = 0,
942a1173d55SHemant Agrawal 					.increment = 0
943a1173d55SHemant Agrawal 				}
944a1173d55SHemant Agrawal 			}, },
945a1173d55SHemant Agrawal 		}, }
946a1173d55SHemant Agrawal 	},
947a1173d55SHemant Agrawal 	{	/* ZUC (EEA3) */
948a1173d55SHemant Agrawal 		.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
949a1173d55SHemant Agrawal 		{.sym = {
950a1173d55SHemant Agrawal 			.xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER,
951a1173d55SHemant Agrawal 			{.cipher = {
952a1173d55SHemant Agrawal 				.algo = RTE_CRYPTO_CIPHER_ZUC_EEA3,
953a1173d55SHemant Agrawal 				.block_size = 16,
954a1173d55SHemant Agrawal 				.key_size = {
955a1173d55SHemant Agrawal 					.min = 16,
956a1173d55SHemant Agrawal 					.max = 16,
957a1173d55SHemant Agrawal 					.increment = 0
958a1173d55SHemant Agrawal 				},
959a1173d55SHemant Agrawal 				.iv_size = {
960a1173d55SHemant Agrawal 					.min = 16,
961a1173d55SHemant Agrawal 					.max = 16,
962a1173d55SHemant Agrawal 					.increment = 0
963a1173d55SHemant Agrawal 				}
964a1173d55SHemant Agrawal 			}, }
965a1173d55SHemant Agrawal 		}, }
966a1173d55SHemant Agrawal 	},
967a1173d55SHemant Agrawal 	{	/* ZUC (EIA3) */
968a1173d55SHemant Agrawal 		.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
969a1173d55SHemant Agrawal 		{.sym = {
970a1173d55SHemant Agrawal 			.xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,
971a1173d55SHemant Agrawal 			{.auth = {
972a1173d55SHemant Agrawal 				.algo = RTE_CRYPTO_AUTH_ZUC_EIA3,
973a1173d55SHemant Agrawal 				.block_size = 16,
974a1173d55SHemant Agrawal 				.key_size = {
975a1173d55SHemant Agrawal 					.min = 16,
976a1173d55SHemant Agrawal 					.max = 16,
977a1173d55SHemant Agrawal 					.increment = 0
978a1173d55SHemant Agrawal 				},
979a1173d55SHemant Agrawal 				.digest_size = {
980a1173d55SHemant Agrawal 					.min = 4,
981a1173d55SHemant Agrawal 					.max = 4,
982a1173d55SHemant Agrawal 					.increment = 0
983a1173d55SHemant Agrawal 				},
984a1173d55SHemant Agrawal 				.iv_size = {
985a1173d55SHemant Agrawal 					.min = 16,
986a1173d55SHemant Agrawal 					.max = 16,
987a1173d55SHemant Agrawal 					.increment = 0
988a1173d55SHemant Agrawal 				}
989a1173d55SHemant Agrawal 			}, }
990a1173d55SHemant Agrawal 		}, }
991a1173d55SHemant Agrawal 	},
992a1173d55SHemant Agrawal 
993a1173d55SHemant Agrawal 	RTE_CRYPTODEV_END_OF_CAPABILITIES_LIST()
994a1173d55SHemant Agrawal };
995a1173d55SHemant Agrawal 
9961f14d500SAkhil Goyal static const struct rte_security_capability dpaa_sec_security_cap[] = {
9971f14d500SAkhil Goyal 	{ /* IPsec Lookaside Protocol offload ESP Transport Egress */
9981f14d500SAkhil Goyal 		.action = RTE_SECURITY_ACTION_TYPE_LOOKASIDE_PROTOCOL,
9991f14d500SAkhil Goyal 		.protocol = RTE_SECURITY_PROTOCOL_IPSEC,
10001f14d500SAkhil Goyal 		.ipsec = {
10011f14d500SAkhil Goyal 			.proto = RTE_SECURITY_IPSEC_SA_PROTO_ESP,
10021f14d500SAkhil Goyal 			.mode = RTE_SECURITY_IPSEC_SA_MODE_TUNNEL,
10031f14d500SAkhil Goyal 			.direction = RTE_SECURITY_IPSEC_SA_DIR_EGRESS,
1004123098cdSGagandeep Singh 			.options = {
1005c253236aSHemant Agrawal 				.copy_df = 1,
1006c253236aSHemant Agrawal 				.copy_dscp = 1,
1007c253236aSHemant Agrawal 				.dec_ttl = 1,
1008c253236aSHemant Agrawal 				.ecn = 1,
1009123098cdSGagandeep Singh 				.esn = 1,
101032d8bc55SBarry Cao 				.udp_encap = 1,
1011123098cdSGagandeep Singh 			},
1012a37ce227SHemant Agrawal 			.replay_win_sz_max = 128
10131f14d500SAkhil Goyal 		},
10141f14d500SAkhil Goyal 		.crypto_capabilities = dpaa_sec_capabilities
10151f14d500SAkhil Goyal 	},
10161f14d500SAkhil Goyal 	{ /* IPsec Lookaside Protocol offload ESP Tunnel Ingress */
10171f14d500SAkhil Goyal 		.action = RTE_SECURITY_ACTION_TYPE_LOOKASIDE_PROTOCOL,
10181f14d500SAkhil Goyal 		.protocol = RTE_SECURITY_PROTOCOL_IPSEC,
10191f14d500SAkhil Goyal 		.ipsec = {
10201f14d500SAkhil Goyal 			.proto = RTE_SECURITY_IPSEC_SA_PROTO_ESP,
10211f14d500SAkhil Goyal 			.mode = RTE_SECURITY_IPSEC_SA_MODE_TUNNEL,
10221f14d500SAkhil Goyal 			.direction = RTE_SECURITY_IPSEC_SA_DIR_INGRESS,
1023123098cdSGagandeep Singh 			.options = {
1024c253236aSHemant Agrawal 				.copy_df = 1,
1025c253236aSHemant Agrawal 				.copy_dscp = 1,
1026c253236aSHemant Agrawal 				.dec_ttl = 1,
1027c253236aSHemant Agrawal 				.ecn = 1,
1028123098cdSGagandeep Singh 				.esn = 1,
102932d8bc55SBarry Cao 				.udp_encap = 1,
1030123098cdSGagandeep Singh 			},
1031a37ce227SHemant Agrawal 			.replay_win_sz_max = 128
10321f14d500SAkhil Goyal 		},
10331f14d500SAkhil Goyal 		.crypto_capabilities = dpaa_sec_capabilities
10341f14d500SAkhil Goyal 	},
1035a1173d55SHemant Agrawal 	{ /* PDCP Lookaside Protocol offload Data */
1036a1173d55SHemant Agrawal 		.action = RTE_SECURITY_ACTION_TYPE_LOOKASIDE_PROTOCOL,
1037a1173d55SHemant Agrawal 		.protocol = RTE_SECURITY_PROTOCOL_PDCP,
1038a1173d55SHemant Agrawal 		.pdcp = {
1039a1173d55SHemant Agrawal 			.domain = RTE_SECURITY_PDCP_MODE_DATA,
104091413a88SHemant Agrawal 			.capa_flags = 0
1041a1173d55SHemant Agrawal 		},
1042a1173d55SHemant Agrawal 		.crypto_capabilities = dpaa_pdcp_capabilities
1043a1173d55SHemant Agrawal 	},
1044a1173d55SHemant Agrawal 	{ /* PDCP Lookaside Protocol offload Control */
1045a1173d55SHemant Agrawal 		.action = RTE_SECURITY_ACTION_TYPE_LOOKASIDE_PROTOCOL,
1046a1173d55SHemant Agrawal 		.protocol = RTE_SECURITY_PROTOCOL_PDCP,
1047a1173d55SHemant Agrawal 		.pdcp = {
1048a1173d55SHemant Agrawal 			.domain = RTE_SECURITY_PDCP_MODE_CONTROL,
104991413a88SHemant Agrawal 			.capa_flags = 0
1050a1173d55SHemant Agrawal 		},
1051a1173d55SHemant Agrawal 		.crypto_capabilities = dpaa_pdcp_capabilities
1052a1173d55SHemant Agrawal 	},
105393e2661eSGagandeep Singh 	{ /* PDCP Lookaside Protocol offload Short MAC */
105493e2661eSGagandeep Singh 		.action = RTE_SECURITY_ACTION_TYPE_LOOKASIDE_PROTOCOL,
105593e2661eSGagandeep Singh 		.protocol = RTE_SECURITY_PROTOCOL_PDCP,
105693e2661eSGagandeep Singh 		.pdcp = {
105793e2661eSGagandeep Singh 			.domain = RTE_SECURITY_PDCP_MODE_SHORT_MAC,
105893e2661eSGagandeep Singh 			.capa_flags = 0
105993e2661eSGagandeep Singh 		},
106093e2661eSGagandeep Singh 		.crypto_capabilities = dpaa_pdcp_capabilities
106193e2661eSGagandeep Singh 	},
10621f14d500SAkhil Goyal 	{
10631f14d500SAkhil Goyal 		.action = RTE_SECURITY_ACTION_TYPE_NONE
10641f14d500SAkhil Goyal 	}
10651f14d500SAkhil Goyal };
10661f14d500SAkhil Goyal 
10671f14d500SAkhil Goyal /**
10681f14d500SAkhil Goyal  * Checksum
10691f14d500SAkhil Goyal  *
10701f14d500SAkhil Goyal  * @param buffer calculate chksum for buffer
10711f14d500SAkhil Goyal  * @param len    buffer length
10721f14d500SAkhil Goyal  *
10731f14d500SAkhil Goyal  * @return checksum value in host cpu order
10741f14d500SAkhil Goyal  */
10751f14d500SAkhil Goyal static inline uint16_t
10761f14d500SAkhil Goyal calc_chksum(void *buffer, int len)
10771f14d500SAkhil Goyal {
10781f14d500SAkhil Goyal 	uint16_t *buf = (uint16_t *)buffer;
10791f14d500SAkhil Goyal 	uint32_t sum = 0;
10801f14d500SAkhil Goyal 	uint16_t result;
10811f14d500SAkhil Goyal 
10821f14d500SAkhil Goyal 	for (sum = 0; len > 1; len -= 2)
10831f14d500SAkhil Goyal 		sum += *buf++;
10841f14d500SAkhil Goyal 
10851f14d500SAkhil Goyal 	if (len == 1)
10861f14d500SAkhil Goyal 		sum += *(unsigned char *)buf;
10871f14d500SAkhil Goyal 
10881f14d500SAkhil Goyal 	sum = (sum >> 16) + (sum & 0xFFFF);
10891f14d500SAkhil Goyal 	sum += (sum >> 16);
10901f14d500SAkhil Goyal 	result = ~sum;
10911f14d500SAkhil Goyal 
10921f14d500SAkhil Goyal 	return  result;
10931f14d500SAkhil Goyal }
10941f14d500SAkhil Goyal 
10959d5f73c2SGagandeep Singh int
10969d5f73c2SGagandeep Singh dpaa_sec_configure_raw_dp_ctx(struct rte_cryptodev *dev, uint16_t qp_id,
10979d5f73c2SGagandeep Singh 	struct rte_crypto_raw_dp_ctx *raw_dp_ctx,
10989d5f73c2SGagandeep Singh 	enum rte_crypto_op_sess_type sess_type,
10999d5f73c2SGagandeep Singh 	union rte_cryptodev_session_ctx session_ctx, uint8_t is_update);
11009d5f73c2SGagandeep Singh 
11019d5f73c2SGagandeep Singh int
11029d5f73c2SGagandeep Singh dpaa_sec_get_dp_ctx_size(struct rte_cryptodev *dev);
11039d5f73c2SGagandeep Singh 
11049d5f73c2SGagandeep Singh int
11059d5f73c2SGagandeep Singh dpaa_sec_attach_sess_q(struct dpaa_sec_qp *qp, dpaa_sec_session *sess);
11069d5f73c2SGagandeep Singh 
1107c3e85bdcSAkhil Goyal #endif /* _DPAA_SEC_H_ */
1108