Skip to contentSkip to conversation

examples/ipsec-secgw: fix Tx checksum offload flag

PATCH In review Radu Nicolau 2 participants 2 messages Sep 30, 2022 – Oct 18, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 examples/ipsec-secgw: fix Tx checksum offload flag

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

Fixes 4edcee19fc20 ("examples/ipsec-secgw: use Tx checksum offload conditionally")
---
 examples/ipsec-secgw/ipsec-secgw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
examples/ipsec-secgw/ipsec-secgw.c +1 -1
index 8a25b83535..75ba359e69 100644
@@ -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++) {
Signature · 1 line
2.25.1
Acked-by on v1 1/1
#1 lore raw
Quoted 23 lines · Radu Nicolau

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

Fixes 4edcee19fc20 ("examples/ipsec-secgw: use Tx checksum offload conditionally")
---
  examples/ipsec-secgw/ipsec-secgw.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
examples/ipsec-secgw/ipsec-secgw.c +1 -1
index 8a25b83535..75ba359e69 100644
@@ -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++) {
Signature · 2 lines
Regards,
Vladimir