examples/ipsec-secgw: fix Tx checksum offload flag
Checks
Commit Message
For the inline crypto path set the Tx checksum offload flag
only if the device supports it.
Fixes: d24471e5786b ("examples/ipsec-secgw: disable Tx checksum for inline")
Cc: ndabilpuram@marvell.com
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
---
examples/ipsec-secgw/sa.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
Comments
> -----Original Message-----
> From: Radu Nicolau <radu.nicolau@intel.com>
> Sent: Wednesday, June 22, 2022 10:28 AM
> To: Nicolau, Radu <radu.nicolau@intel.com>; Akhil Goyal <gakhil@marvell.com>
> Cc: dev@dpdk.org; ndabilpuram@marvell.com
> Subject: [PATCH] examples/ipsec-secgw: fix Tx checksum offload flag
>
> For the inline crypto path set the Tx checksum offload flag
> only if the device supports it.
>
> Fixes: d24471e5786b ("examples/ipsec-secgw: disable Tx checksum for inline")
> Cc: ndabilpuram@marvell.com
>
> Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
> ---
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
> > For the inline crypto path set the Tx checksum offload flag
> > only if the device supports it.
> >
> > Fixes: d24471e5786b ("examples/ipsec-secgw: disable Tx checksum for inline")
> > Cc: ndabilpuram@marvell.com
> >
> > Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
> > ---
> Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
Applied to dpdk-next-crypto
Thanks.
@@ -1841,7 +1841,10 @@ sa_check_offloads(uint16_t port_id, uint64_t *rx_offloads,
if (rule->mss)
*tx_offloads |=
RTE_ETH_TX_OFFLOAD_TCP_TSO;
- *tx_offloads |= RTE_ETH_TX_OFFLOAD_IPV4_CKSUM;
+ if (dev_info.tx_offload_capa &
+ RTE_ETH_TX_OFFLOAD_IPV4_CKSUM)
+ *tx_offloads |=
+ RTE_ETH_TX_OFFLOAD_IPV4_CKSUM;
}
break;
default: