Skip to contentSkip to conversation

net/iavf: fix outer checksum flags

PATCH Applied Zhichao Zeng 3 participants 3 messages Sep 20, 2022 – Sep 25, 2022 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/iavf: fix outer checksum flags

When receiving tunneled packets, the testpmd output log shows 'ol_flags' value always as 'RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN', but expected value should be 'RX_OUTER_L4_CKSUM_GOOD' or 'RX_OUTER_L4_CKSUM_BAD'.

Adding 'RX_OUTER_L4_CKSUM_GOOD' and 'RX_OUTER_L4_CKSUM_BAD' to 'flags' for normal path, 'l3_l4_flags_shuf' for AVX2 and AVX512 vector path and 'cksum_flags' for SSE vector path to ensure that the 'ol_flags' can match correct flags.

Fixes b8b4c54ef9b0 ("net/iavf: support flexible Rx descriptor in normal path")
Fixes 1162f5a0ef31 ("net/iavf: support flexible Rx descriptor in SSE path")
Fixes 5b6e8859081d ("net/iavf: support flexible Rx descriptor in AVX path")
Fixes 9c9aa0040344 ("net/iavf: add offload path for Rx AVX512 flex descriptor")
---
 drivers/net/iavf/iavf_rxtx.c            |   9 +-
 drivers/net/iavf/iavf_rxtx_vec_avx2.c   | 118 +++++++++++++++------
 drivers/net/iavf/iavf_rxtx_vec_avx512.c | 133 ++++++++++++++++++------
 drivers/net/iavf/iavf_rxtx_vec_sse.c    |  77 ++++++++++----
 4 files changed, 252 insertions(+), 85 deletions(-)
drivers/net/iavf/iavf_rxtx.c +8 -1
index 3deabe1d7e..e1681024a6 100644
@@ -1277,7 +1277,9 @@ iavf_flex_rxd_error_to_pkt_flags(uint16_t stat_err0)
 		return 0;
 
 	if (likely(!(stat_err0 & IAVF_RX_FLEX_ERR0_BITS))) {
-		flags |= (RTE_MBUF_F_RX_IP_CKSUM_GOOD | RTE_MBUF_F_RX_L4_CKSUM_GOOD);
+		flags |= (RTE_MBUF_F_RX_IP_CKSUM_GOOD |
+			RTE_MBUF_F_RX_L4_CKSUM_GOOD |
+			RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD);
 		return flags;
 	}
 
@@ -1294,6 +1296,11 @@ iavf_flex_rxd_error_to_pkt_flags(uint16_t stat_err0)
 	if (unlikely(stat_err0 & (1 << IAVF_RX_FLEX_DESC_STATUS0_XSUM_EIPE_S)))
 		flags |= RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD;
 
+	if (unlikely(stat_err0 & (1 << IAVF_RX_FLEX_DESC_STATUS0_XSUM_EUDPE_S)))
+		flags |= RTE_MBUF_F_RX_OUTER_L4_CKSUM_BAD;
+	else
+		flags |= RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD;
+
 	return flags;
 }
 
drivers/net/iavf/iavf_rxtx_vec_avx2.c +86 -32

135 lines not on this page · raw message

drivers/net/iavf/iavf_rxtx_vec_avx512.c +101 -32

152 lines not on this page · raw message

drivers/net/iavf/iavf_rxtx_vec_sse.c +57 -20

112 lines not on this page · raw message

Signature · 1 line
2.25.1
Tested-by on v1 1/1
#1 lore raw
Quoted 24 lines

-----Original Message-----
From: Zhichao Zeng <[email protected]>
Sent: Tuesday, September 20, 2022 4:37 PM
To: [email protected]
Cc: [email protected]; Yang, Qiming <[email protected]>; Zhou, YidingX <[email protected]>; Zeng, ZhichaoX <[email protected]>; Wu, Jingjing <[email protected]>; Xing, Beilei <[email protected]>; Richardson, Bruce <[email protected]>; Konstantin Ananyev <[email protected]>; Zhang, Qi Z <[email protected]>; Rong, Leyi <[email protected]>; Lu, Wenzhuo <[email protected]>
Subject: [PATCH] net/iavf: fix outer checksum flags

When receiving tunneled packets, the testpmd output log shows 'ol_flags' value always as 'RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN', but expected value should be 'RX_OUTER_L4_CKSUM_GOOD' or 'RX_OUTER_L4_CKSUM_BAD'.

Adding 'RX_OUTER_L4_CKSUM_GOOD' and 'RX_OUTER_L4_CKSUM_BAD' to 'flags' for normal path, 'l3_l4_flags_shuf' for AVX2 and AVX512 vector path and 'cksum_flags' for SSE vector path to ensure that the 'ol_flags' can match correct flags.

Fixes b8b4c54ef9b0 ("net/iavf: support flexible Rx descriptor in normal
Quoted 8 lines

path")

Fixes 1162f5a0ef31 ("net/iavf: support flexible Rx descriptor in SSE path")
Fixes 5b6e8859081d ("net/iavf: support flexible Rx descriptor in AVX path")
Fixes 9c9aa0040344 ("net/iavf: add offload path for Rx AVX512 flex

descriptor")
Cc: [email protected]

Tested and passed.

Quoted 7 lines
---
 drivers/net/iavf/iavf_rxtx.c            |   9 +-
 drivers/net/iavf/iavf_rxtx_vec_avx2.c   | 118 +++++++++++++++------
 drivers/net/iavf/iavf_rxtx_vec_avx512.c | 133 ++++++++++++++++++------
 drivers/net/iavf/iavf_rxtx_vec_sse.c    |  77 ++++++++++----
 4 files changed, 252 insertions(+), 85 deletions(-)
Acked-by Applied
#2 lore raw
Quoted 51 lines

-----Original Message-----
From: Xu, Ke1 <[email protected]>
Sent: Thursday, September 22, 2022 9:55 AM
To: Zeng, ZhichaoX <[email protected]>; [email protected]
Cc: [email protected]; Yang, Qiming <[email protected]>; Zhou, YidingX <[email protected]>; Zeng, ZhichaoX <[email protected]>; Wu, Jingjing <[email protected]>; Xing, Beilei <[email protected]>; Richardson, Bruce <[email protected]>; Konstantin Ananyev <[email protected]>; Zhang, Qi Z <[email protected]>; Rong, Leyi <[email protected]>; Lu, Wenzhuo <[email protected]>
Subject: RE: [PATCH] net/iavf: fix outer checksum flags

Quoted 13 lines

-----Original Message-----
From: Zhichao Zeng <[email protected]>
Sent: Tuesday, September 20, 2022 4:37 PM
To: [email protected]
Cc: [email protected]; Yang, Qiming <[email protected]>; Zhou, YidingX <[email protected]>; Zeng, ZhichaoX <[email protected]>; Wu, Jingjing <[email protected]>; Xing, Beilei <[email protected]>; Richardson, Bruce <[email protected]>; Konstantin Ananyev <[email protected]>; Zhang, Qi Z <[email protected]>; Rong, Leyi <[email protected]>; Lu, Wenzhuo <[email protected]>
Subject: [PATCH] net/iavf: fix outer checksum flags

Quoted 2 lines

When receiving tunneled packets, the testpmd output log shows 'ol_flags' value always as 'RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN', but

expected

Quoted 1 line

value should be 'RX_OUTER_L4_CKSUM_GOOD' or

'RX_OUTER_L4_CKSUM_BAD'.

Quoted 2 lines

Adding 'RX_OUTER_L4_CKSUM_GOOD' and 'RX_OUTER_L4_CKSUM_BAD' to

'flags'

Quoted 15 lines

for normal path, 'l3_l4_flags_shuf' for AVX2 and AVX512 vector path and 'cksum_flags' for SSE vector path to ensure that the 'ol_flags' can match correct flags.

Fixes b8b4c54ef9b0 ("net/iavf: support flexible Rx descriptor in

normal
path")

Fixes 1162f5a0ef31 ("net/iavf: support flexible Rx descriptor in SSE

path")

Fixes 5b6e8859081d ("net/iavf: support flexible Rx descriptor in AVX

path")

Fixes 9c9aa0040344 ("net/iavf: add offload path for Rx AVX512 flex

descriptor")
Cc: [email protected]

Quoted 4 lines
Quoted 1 line

Tested and passed.

Applied to dpdk-next-net-intel.

Thanks
Qi

Quoted 8 lines
Quoted 8 lines
---
 drivers/net/iavf/iavf_rxtx.c            |   9 +-
 drivers/net/iavf/iavf_rxtx_vec_avx2.c   | 118 +++++++++++++++------
 drivers/net/iavf/iavf_rxtx_vec_avx512.c | 133 ++++++++++++++++++------
 drivers/net/iavf/iavf_rxtx_vec_sse.c    |  77 ++++++++++----
 4 files changed, 252 insertions(+), 85 deletions(-)