DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] examples/ipsec-secgw: fix Tx checksum offload flag
@ 2022-06-22  9:28 Radu Nicolau
  2022-06-22  9:46 ` Zhang, Roy Fan
  2022-06-29 16:46 ` [PATCH v2] " Radu Nicolau
  0 siblings, 2 replies; 7+ messages in thread
From: Radu Nicolau @ 2022-06-22  9:28 UTC (permalink / raw)
  To: Radu Nicolau, Akhil Goyal; +Cc: dev, ndabilpuram

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(-)

diff --git a/examples/ipsec-secgw/sa.c b/examples/ipsec-secgw/sa.c
index 0b27f11fc0..9b35dfdbef 100644
--- a/examples/ipsec-secgw/sa.c
+++ b/examples/ipsec-secgw/sa.c
@@ -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:
-- 
2.25.1


^ permalink raw reply	[flat|nested] 7+ messages in thread
* [PATCH] examples/ipsec-secgw: fix Tx checksum offload flag
@ 2022-09-30 12:40 Radu Nicolau
  2022-10-18 15:39 ` Medvedkin, Vladimir
  0 siblings, 1 reply; 7+ messages in thread
From: Radu Nicolau @ 2022-09-30 12:40 UTC (permalink / raw)
  To: Radu Nicolau, Akhil Goyal; +Cc: dev, ndabilpuram

Fix a typo in computing port mask for Tx checksum offload capability.

Fixes: 4edcee19fc20 ("examples/ipsec-secgw: use Tx checksum offload conditionally")
Cc: ndabilpuram@marvell.com

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
---
 examples/ipsec-secgw/ipsec-secgw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index 8a25b83535..75ba359e69 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -3042,7 +3042,7 @@ main(int32_t argc, char **argv)
 		port_init(portid, req_rx_offloads[portid],
 				req_tx_offloads[portid]);
 		if ((req_tx_offloads[portid] & RTE_ETH_TX_OFFLOAD_IPV4_CKSUM))
-			ipv4_cksum_port_mask = 1U << portid;
+			ipv4_cksum_port_mask |= 1U << portid;
 	}
 
 	for (lcore_id = 0; lcore_id < RTE_MAX_LCORE; lcore_id++) {
-- 
2.25.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-10-18 15:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-22  9:28 [PATCH] examples/ipsec-secgw: fix Tx checksum offload flag Radu Nicolau
2022-06-22  9:46 ` Zhang, Roy Fan
2022-06-28  8:36   ` Akhil Goyal
2022-06-29 16:46 ` [PATCH v2] " Radu Nicolau
2022-06-30  5:01   ` [EXT] " Akhil Goyal
2022-09-30 12:40 [PATCH] " Radu Nicolau
2022-10-18 15:39 ` Medvedkin, Vladimir

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).