Skip to contentSkip to conversation

net/dpaa2: set check sum good flags

PATCH Applied Tianli Lai 3 participants 4 messages May 8, 2023 – May 12, 2023 Network drivers

lore
Share & tools
lore

Tianli Lai

author
#0 lore raw

PATCH 1/1 net/dpaa2: set check sum good flags

set check sum good flags when dpaa2 hardware set check result.

---
 drivers/net/dpaa2/dpaa2_rxtx.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
drivers/net/dpaa2/dpaa2_rxtx.c +10 -2
index f60e78e1fd..85910bbd8f 100644
@@ -198,8 +198,12 @@ dpaa2_dev_rx_parse_slow(struct rte_mbuf *mbuf,
 
 	if (BIT_ISSET_AT_POS(annotation->word8, DPAA2_ETH_FAS_L3CE))
 		mbuf->ol_flags |= RTE_MBUF_F_RX_IP_CKSUM_BAD;
-	else if (BIT_ISSET_AT_POS(annotation->word8, DPAA2_ETH_FAS_L4CE))
+	else
+		mbuf->ol_flags |= RTE_MBUF_F_RX_IP_CKSUM_GOOD;
+	if (BIT_ISSET_AT_POS(annotation->word8, DPAA2_ETH_FAS_L4CE))
 		mbuf->ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_BAD;
+	else
+		mbuf->ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_GOOD;
 
 	if (BIT_ISSET_AT_POS(annotation->word4, L3_IP_1_FIRST_FRAGMENT |
 	    L3_IP_1_MORE_FRAGMENT |
@@ -241,8 +245,12 @@ dpaa2_dev_rx_parse(struct rte_mbuf *mbuf, void *hw_annot_addr)
 
 	if (BIT_ISSET_AT_POS(annotation->word8, DPAA2_ETH_FAS_L3CE))
 		mbuf->ol_flags |= RTE_MBUF_F_RX_IP_CKSUM_BAD;
-	else if (BIT_ISSET_AT_POS(annotation->word8, DPAA2_ETH_FAS_L4CE))
+	else
+		mbuf->ol_flags |= RTE_MBUF_F_RX_IP_CKSUM_GOOD;
+	if (BIT_ISSET_AT_POS(annotation->word8, DPAA2_ETH_FAS_L4CE))
 		mbuf->ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_BAD;
+	else
+		mbuf->ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_GOOD;
 
 	if (dpaa2_enable_ts[mbuf->port]) {
 		*dpaa2_timestamp_dynfield(mbuf) = annotation->word2;
Signature · 1 line
2.27.0
Acked-by on v1 1/1
#1 lore raw
Quoted 43 lines · Tianli Lai

Caution: This is an external email. Please take care when clicking links or opening attachments. When in doubt, report the message using the 'Report this email' button

set check sum good flags when dpaa2 hardware set check result.

---
  drivers/net/dpaa2/dpaa2_rxtx.c | 12 ++++++++++--
  1 file changed, 10 insertions(+), 2 deletions(-)
drivers/net/dpaa2/dpaa2_rxtx.c +10 -3
index f60e78e1fd..85910bbd8f 100644
@@ -198,8 +198,12 @@ dpaa2_dev_rx_parse_slow(struct rte_mbuf *mbuf,
 
         if (BIT_ISSET_AT_POS(annotation->word8, DPAA2_ETH_FAS_L3CE))
                 mbuf->ol_flags |= RTE_MBUF_F_RX_IP_CKSUM_BAD;
-       else if (BIT_ISSET_AT_POS(annotation->word8, DPAA2_ETH_FAS_L4CE))
+       else
+               mbuf->ol_flags |= RTE_MBUF_F_RX_IP_CKSUM_GOOD;
+       if (BIT_ISSET_AT_POS(annotation->word8, DPAA2_ETH_FAS_L4CE))
                 mbuf->ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_BAD;
+       else
+               mbuf->ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_GOOD;
 
         if (BIT_ISSET_AT_POS(annotation->word4, L3_IP_1_FIRST_FRAGMENT |
             L3_IP_1_MORE_FRAGMENT |
@@ -241,8 +245,12 @@ dpaa2_dev_rx_parse(struct rte_mbuf *mbuf, void *hw_annot_addr)
 
         if (BIT_ISSET_AT_POS(annotation->word8, DPAA2_ETH_FAS_L3CE))
                 mbuf->ol_flags |= RTE_MBUF_F_RX_IP_CKSUM_BAD;
-       else if (BIT_ISSET_AT_POS(annotation->word8, DPAA2_ETH_FAS_L4CE))
+       else
+               mbuf->ol_flags |= RTE_MBUF_F_RX_IP_CKSUM_GOOD;
+       if (BIT_ISSET_AT_POS(annotation->word8, DPAA2_ETH_FAS_L4CE))
                 mbuf->ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_BAD;
+       else
+               mbuf->ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_GOOD;
 
         if (dpaa2_enable_ts[mbuf->port]) {
                 *dpaa2_timestamp_dynfield(mbuf) = annotation->word2;
--
Quoted 2 lines

2.27.0

Signature · 3 lines
Thanks,
Sachin Saxena
(NXP)
Acked-by on v1 1/1
#2 lore raw
In reply to Tianli Lai
Quoted 43 lines · Tianli Lai

Caution: This is an external email. Please take care when clicking links or opening attachments. When in doubt, report the message using the 'Report this email' button

set check sum good flags when dpaa2 hardware set check result.

---
  drivers/net/dpaa2/dpaa2_rxtx.c | 12 ++++++++++--
  1 file changed, 10 insertions(+), 2 deletions(-)
drivers/net/dpaa2/dpaa2_rxtx.c +10 -3
index f60e78e1fd..85910bbd8f 100644
@@ -198,8 +198,12 @@ dpaa2_dev_rx_parse_slow(struct rte_mbuf *mbuf,
 
         if (BIT_ISSET_AT_POS(annotation->word8, DPAA2_ETH_FAS_L3CE))
                 mbuf->ol_flags |= RTE_MBUF_F_RX_IP_CKSUM_BAD;
-       else if (BIT_ISSET_AT_POS(annotation->word8, DPAA2_ETH_FAS_L4CE))
+       else
+               mbuf->ol_flags |= RTE_MBUF_F_RX_IP_CKSUM_GOOD;
+       if (BIT_ISSET_AT_POS(annotation->word8, DPAA2_ETH_FAS_L4CE))
                 mbuf->ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_BAD;
+       else
+               mbuf->ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_GOOD;
 
         if (BIT_ISSET_AT_POS(annotation->word4, L3_IP_1_FIRST_FRAGMENT |
             L3_IP_1_MORE_FRAGMENT |
@@ -241,8 +245,12 @@ dpaa2_dev_rx_parse(struct rte_mbuf *mbuf, void *hw_annot_addr)
 
         if (BIT_ISSET_AT_POS(annotation->word8, DPAA2_ETH_FAS_L3CE))
                 mbuf->ol_flags |= RTE_MBUF_F_RX_IP_CKSUM_BAD;
-       else if (BIT_ISSET_AT_POS(annotation->word8, DPAA2_ETH_FAS_L4CE))
+       else
+               mbuf->ol_flags |= RTE_MBUF_F_RX_IP_CKSUM_GOOD;
+       if (BIT_ISSET_AT_POS(annotation->word8, DPAA2_ETH_FAS_L4CE))
                 mbuf->ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_BAD;
+       else
+               mbuf->ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_GOOD;
 
         if (dpaa2_enable_ts[mbuf->port]) {
                 *dpaa2_timestamp_dynfield(mbuf) = annotation->word2;
--
Quoted 2 lines

2.27.0

Signature · 3 lines
Thanks,
Sachin Saxena
(NXP)
Applied
#3 lore raw
Quoted 6 lines · Sachin Saxena (OSS)
Quoted 5 lines · Tianli Lai

Caution: This is an external email. Please take care when clicking links or opening attachments. When in doubt, report the message using the 'Report this email' button

Quoted 6 lines
Quoted 3 lines

set check sum good flags when dpaa2 hardware set check result.

Fixes d2ef05d5c13e ("net/dpaa2: optimize Rx/Tx path")
Fixes 94d31549c380 ("net/dpaa2: support Rx checksum offload in slow

parsing")
Cc: [email protected]

Applied to dpdk-next-net/main, thanks.