X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fplugins%2Fdpdk%2Fipsec%2Fipsec.c;h=682bcaf21c85c9ec9ce74c8b20fe9d1ab175deef;hb=1e3aa5e213c23588981ee17d1413a0441a40527a;hp=2415422ae2dc6b6f2d448e35d904fc00c85d5630;hpb=ef20f0eff7f0e6ed75f316eb7080aa655de077ff;p=vpp.git diff --git a/src/plugins/dpdk/ipsec/ipsec.c b/src/plugins/dpdk/ipsec/ipsec.c index 2415422ae2d..682bcaf21c8 100644 --- a/src/plugins/dpdk/ipsec/ipsec.c +++ b/src/plugins/dpdk/ipsec/ipsec.c @@ -252,13 +252,13 @@ crypto_set_aead_xform (struct rte_crypto_sym_xform *xform, xform->type = RTE_CRYPTO_SYM_XFORM_AEAD; xform->aead.algo = c->alg; - xform->aead.key.data = sa->crypto_key; + xform->aead.key.data = sa->crypto_key.data; xform->aead.key.length = c->key_len; xform->aead.iv.offset = crypto_op_get_priv_offset () + offsetof (dpdk_op_priv_t, cb); xform->aead.iv.length = 12; xform->aead.digest_length = c->trunc_size; - xform->aead.aad_length = sa->use_esn ? 12 : 8; + xform->aead.aad_length = ipsec_sa_is_set_USE_ESN (sa) ? 12 : 8; xform->next = NULL; if (is_outbound) @@ -280,7 +280,7 @@ crypto_set_cipher_xform (struct rte_crypto_sym_xform *xform, xform->type = RTE_CRYPTO_SYM_XFORM_CIPHER; xform->cipher.algo = c->alg; - xform->cipher.key.data = sa->crypto_key; + xform->cipher.key.data = sa->crypto_key.data; xform->cipher.key.length = c->key_len; xform->cipher.iv.offset = crypto_op_get_priv_offset () + offsetof (dpdk_op_priv_t, cb); @@ -306,7 +306,7 @@ crypto_set_auth_xform (struct rte_crypto_sym_xform *xform, xform->type = RTE_CRYPTO_SYM_XFORM_AUTH; xform->auth.algo = a->alg; - xform->auth.key.data = sa->integ_key; + xform->auth.key.data = sa->integ_key.data; xform->auth.key.length = a->key_len; xform->auth.digest_length = a->trunc_size; xform->next = NULL; @@ -511,7 +511,8 @@ add_del_sa_session (u32 sa_index, u8 is_add) case IPSEC_CRYPTO_ALG_AES_GCM_128: case IPSEC_CRYPTO_ALG_AES_GCM_192: case IPSEC_CRYPTO_ALG_AES_GCM_256: - clib_memcpy (&sa->salt, &sa->crypto_key[sa->crypto_key_len - 4], 4); + clib_memcpy (&sa->salt, + &sa->crypto_key.data[sa->crypto_key.len - 4], 4); break; default: seed = (u32) clib_cpu_time_now ();