struct sec_cdb *cdb = &ses->cdb;
struct alginfo *p_authdata = NULL;
int32_t shared_desc_len = 0;
- int err;
#if RTE_BYTE_ORDER == RTE_BIG_ENDIAN
int swap = false;
#else
cipherdata.algtype = ses->cipher_key.alg;
cipherdata.algmode = ses->cipher_key.algmode;
- cdb->sh_desc[0] = cipherdata.keylen;
- cdb->sh_desc[1] = 0;
- cdb->sh_desc[2] = 0;
-
if (ses->auth_alg) {
authdata.key = (size_t)ses->auth_key.data;
authdata.keylen = ses->auth_key.length;
authdata.algmode = ses->auth_key.algmode;
p_authdata = &authdata;
-
- cdb->sh_desc[1] = authdata.keylen;
}
- err = rta_inline_query(IPSEC_AUTH_VAR_AES_DEC_BASE_DESC_LEN,
- MIN_JOB_DESC_SIZE,
- (unsigned int *)cdb->sh_desc,
- &cdb->sh_desc[2], 2);
- if (err < 0) {
- DPAA_SEC_ERR("Crypto: Incorrect key lengths");
- return err;
- }
-
- if (!(cdb->sh_desc[2] & 1) && cipherdata.keylen) {
+ if (rta_inline_pdcp_query(authdata.algtype,
+ cipherdata.algtype,
+ ses->pdcp.sn_size,
+ ses->pdcp.hfn_ovd)) {
cipherdata.key =
- (size_t)rte_dpaa_mem_vtop((void *)(size_t)cipherdata.key);
+ (size_t)rte_dpaa_mem_vtop((void *)
+ (size_t)cipherdata.key);
cipherdata.key_type = RTA_DATA_PTR;
}
- if (!(cdb->sh_desc[2] & (1 << 1)) && authdata.keylen) {
- authdata.key =
- (size_t)rte_dpaa_mem_vtop((void *)(size_t)authdata.key);
- authdata.key_type = RTA_DATA_PTR;
- }
-
- cdb->sh_desc[0] = 0;
- cdb->sh_desc[1] = 0;
- cdb->sh_desc[2] = 0;
if (ses->pdcp.domain == RTE_SECURITY_PDCP_MODE_CONTROL) {
if (ses->dir == DIR_ENC)