[dpdk-dev] [PATCH 1/2] net/ixgbe: fix lack of ip type for crypto session
Ananyev, Konstantin
konstantin.ananyev at intel.com
Thu Jun 6 12:43:13 CEST 2019
> -----Original Message-----
> From: Drost, MariuszX
> Sent: Tuesday, June 4, 2019 11:07 AM
> To: Nicolau, Radu <radu.nicolau at intel.com>; akhil.goyal at nxp.com; Lu, Wenzhuo <wenzhuo.lu at intel.com>; Ananyev, Konstantin
> <konstantin.ananyev at intel.com>
> Cc: dev at dpdk.org; Drost, MariuszX <mariuszx.drost at intel.com>
> Subject: [PATCH 1/2] net/ixgbe: fix lack of ip type for crypto session
>
> When ixgbe_crypto_add_sa() is called, it checks whether the ip type is
> IPv6 or IPv4 to write correct addresses to the registers. Type itself
> is never specified, and act as IPv4, which is the default value.
> It causes lack of support for IPv6.
>
> To fix that, ip type needs to be stored in device private data, based on
> crypto session ip type field, before the checking is done.
>
> Fixes: ec17993a145a ("examples/ipsec-secgw: support security offload")
> Fixes: 9a0752f498d2 ("net/ixgbe: enable inline IPsec")
>
> Signed-off-by: Mariusz Drost <mariuszx.drost at intel.com>
> ---
> drivers/net/ixgbe/ixgbe_ipsec.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ixgbe/ixgbe_ipsec.c b/drivers/net/ixgbe/ixgbe_ipsec.c
> index 5a416885f..1eea70716 100644
> --- a/drivers/net/ixgbe/ixgbe_ipsec.c
> +++ b/drivers/net/ixgbe/ixgbe_ipsec.c
> @@ -154,8 +154,12 @@ ixgbe_crypto_add_sa(struct ixgbe_crypto_session *ic_session)
> if (ic_session->op == IXGBE_OP_AUTHENTICATED_DECRYPTION)
> priv->rx_sa_tbl[sa_index].mode |=
> (IPSRXMOD_PROTO | IPSRXMOD_DECRYPT);
> - if (ic_session->dst_ip.type == IPv6)
> + if (ic_session->dst_ip.type == IPv6) {
> priv->rx_sa_tbl[sa_index].mode |= IPSRXMOD_IPV6;
> + priv->rx_ip_tbl[ip_index].ip.type = IPv6;
> + } else if (ic_session->dst_ip.type == IPv4)
> + priv->rx_ip_tbl[ip_index].ip.type = IPv4;
> +
> priv->rx_sa_tbl[sa_index].used = 1;
>
> /* write IP table entry*/
> --
Acked-by: Konstantin Ananyev <konstantin.ananyev at intel.com>
Tested-by: Konstantin Ananyev <konstantin.ananyev at intel.com>
> 2.17.1
More information about the dev
mailing list