[7/8] crypto/cnxk: support UDP encap with lookaside IPsec
Checks
Commit Message
Adding support for UDP encapsulation in lookaside IPsec.
Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
---
doc/guides/cryptodevs/cnxk.rst | 1 +
doc/guides/rel_notes/release_21_11.rst | 1 +
drivers/crypto/cnxk/cnxk_cryptodev_capabilities.c | 11 ++++++++++-
3 files changed, 12 insertions(+), 1 deletion(-)
@@ -231,6 +231,7 @@ Features supported
* ESP
* Tunnel mode
* Transport mode
+* UDP Encapsulation
* AES-128/192/256-GCM
* AES-128/192/256-CBC-SHA1-HMAC
@@ -24,6 +24,7 @@ DPDK Release 21.11
* Added AES-CBC-SHA1-HMAC in lookaside protocol (IPsec).
* Added transport mode in lookaside protocol (IPsec).
+ * Added UDP encapsulation in lookaside protocol (IPsec).
New Features
@@ -907,6 +907,12 @@ sec_crypto_caps_populate(struct rte_cryptodev_capabilities cnxk_caps[],
sec_caps_add(cnxk_caps, &cur_pos, caps_end, RTE_DIM(caps_end));
}
+static void
+cnxk_sec_caps_update(struct rte_security_capability *sec_cap)
+{
+ sec_cap->ipsec.options.udp_encap = 1;
+}
+
void
cnxk_cpt_caps_populate(struct cnxk_cpt_vf *vf)
{
@@ -918,8 +924,11 @@ cnxk_cpt_caps_populate(struct cnxk_cpt_vf *vf)
PLT_STATIC_ASSERT(RTE_DIM(sec_caps_templ) <= RTE_DIM(vf->sec_caps));
memcpy(vf->sec_caps, sec_caps_templ, sizeof(sec_caps_templ));
- for (i = 0; i < RTE_DIM(sec_caps_templ) - 1; i++)
+ for (i = 0; i < RTE_DIM(sec_caps_templ) - 1; i++) {
vf->sec_caps[i].crypto_capabilities = vf->sec_crypto_caps;
+
+ cnxk_sec_caps_update(&vf->sec_caps[i]);
+ }
}
const struct rte_security_capability *