Skip to contentSkip to conversation

net/e1000: fix checksum valid flags error

PATCH Superseded Wei Zhao 3 participants 7 messages May 2, 2017 – Jun 1, 2017 Network drivers

lore
Share & tools
lore

Wei Zhao

author
#0 lore raw

PATCH 1/1 net/e1000: fix checksum valid flags error

This problem is caused by a missing set of E1000_RXCSUM_CRCOFL in eth_igb_rx_init(), it should be set to enable SCTP packet L4 checksum.If it is not set, the printf message in cksum fwd about L4 SCTP cksum flag is error.

Fixes d15fcf76c8b7 ("net/e1000: move to drivers/net/")
---
 drivers/net/e1000/igb_rxtx.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/net/e1000/igb_rxtx.c +4 -3
index b3b601b..6c2749b 100644
@@ -2402,10 +2402,11 @@ eth_igb_rx_init(struct rte_eth_dev *dev)
 
 	/* Enable both L3/L4 rx checksum offload */
 	if (dev->data->dev_conf.rxmode.hw_ip_checksum)
-		rxcsum |= (E1000_RXCSUM_IPOFL  | E1000_RXCSUM_TUOFL);
+		rxcsum |= (E1000_RXCSUM_IPOFL | E1000_RXCSUM_TUOFL |
+				E1000_RXCSUM_CRCOFL);
 	else
-		rxcsum &= ~(E1000_RXCSUM_IPOFL | E1000_RXCSUM_TUOFL);
-	E1000_WRITE_REG(hw, E1000_RXCSUM, rxcsum);
+		rxcsum &= ~(E1000_RXCSUM_IPOFL | E1000_RXCSUM_TUOFL |
+				E1000_RXCSUM_CRCOFL);
 
 	/* Setup the Receive Control Register. */
 	if (dev->data->dev_conf.rxmode.hw_strip_crc) {
Signature · 1 line
2.9.3
#1 lore raw

Hi Wei,

Quoted 11 lines

-----Original Message-----
From: Zhao1, Wei
Sent: Tuesday, May 2, 2017 10:46 AM
To: [email protected]
Cc: Lu, Wenzhuo; Zhao1, Wei
Subject: [PATCH] net/e1000: fix checksum valid flags error

This problem is caused by a missing set of E1000_RXCSUM_CRCOFL in eth_igb_rx_init(), it should be set to enable SCTP packet
L4 checksum.If it is not set, the printf message in cksum fwd about L4 SCTP cksum flag is error.

It's not quite clear what's the issue. Would you like to add more details? Thanks.

Quoted 2 lines
Fixes d15fcf76c8b7 ("net/e1000: move to drivers/net/")

Seems it's not the right patch. Suppose this patch only moves the files.

Quoted 28 lines
---
 drivers/net/e1000/igb_rxtx.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/net/e1000/igb_rxtx.c index renamed from drivers/net/e1000/igb_rxtx.c +0 -0

b3b601b..6c2749b 100644

drivers/net/e1000/igb_rxtx.c +3 -3
@@ -2402,10 +2402,11 @@ eth_igb_rx_init(struct rte_eth_dev *dev)
 
 	/* Enable both L3/L4 rx checksum offload */
 	if (dev->data->dev_conf.rxmode.hw_ip_checksum)
-		rxcsum |= (E1000_RXCSUM_IPOFL  | E1000_RXCSUM_TUOFL);
+		rxcsum |= (E1000_RXCSUM_IPOFL | E1000_RXCSUM_TUOFL |
+				E1000_RXCSUM_CRCOFL);
 	else
-		rxcsum &= ~(E1000_RXCSUM_IPOFL | E1000_RXCSUM_TUOFL);
-	E1000_WRITE_REG(hw, E1000_RXCSUM, rxcsum);
+		rxcsum &= ~(E1000_RXCSUM_IPOFL | E1000_RXCSUM_TUOFL

|

drivers/net/e1000/igb_rxtx.c +1 -1
+				E1000_RXCSUM_CRCOFL);
 
 	/* Setup the Receive Control Register. */
 	if (dev->data->dev_conf.rxmode.hw_strip_crc) {
--

2.9.3

author
#2 lore raw

Hi, wenzhuo

Quoted 19 lines

-----Original Message-----
From: Lu, Wenzhuo
Sent: Tuesday, May 2, 2017 4:14 PM
To: Zhao1, Wei <[email protected]>; [email protected]
Subject: RE: [PATCH] net/e1000: fix checksum valid flags error

Hi Wei,

Quoted 11 lines

-----Original Message-----
From: Zhao1, Wei
Sent: Tuesday, May 2, 2017 10:46 AM
To: [email protected]
Cc: Lu, Wenzhuo; Zhao1, Wei
Subject: [PATCH] net/e1000: fix checksum valid flags error

This problem is caused by a missing set of E1000_RXCSUM_CRCOFL in eth_igb_rx_init(), it should be set to enable SCTP packet L4 checksum.If it is not set, the printf message in cksum fwd about L4 SCTP cksum flag is error.

Quoted 6 lines

It's not quite clear what's the issue. Would you like to add more details? Thanks.

Quoted 2 lines
Fixes d15fcf76c8b7 ("net/e1000: move to drivers/net/")

Seems it's not the right patch. Suppose this patch only moves the files.

I will fix it in v2.

Quoted 33 lines
Quoted 12 lines
---
 drivers/net/e1000/igb_rxtx.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
(quoted diff) +0 -0

b/drivers/net/e1000/igb_rxtx.c index b3b601b..6c2749b 100644

drivers/net/e1000/igb_rxtx.c eth_igb_rx_init(struct rte_eth_dev *dev) · line 2405

Quoted 4 lines
drivers/net/e1000/igb_rxtx.c +0 -1
@@ -2402,10 +2402,11 @@ eth_igb_rx_init(struct rte_eth_dev *dev)
 
 	/* Enable both L3/L4 rx checksum offload */
 	if (dev->data->dev_conf.rxmode.hw_ip_checksum)
-		rxcsum |= (E1000_RXCSUM_IPOFL  |

E1000_RXCSUM_TUOFL);

drivers/net/e1000/igb_rxtx.c eth_igb_rx_init(struct rte_eth_dev *dev) · line 2405

Quoted 1 line
drivers/net/e1000/igb_rxtx.c +1 -0
+		rxcsum |= (E1000_RXCSUM_IPOFL | E1000_RXCSUM_TUOFL

|

drivers/net/e1000/igb_rxtx.c eth_igb_rx_init(struct rte_eth_dev *dev)

Quoted 3 lines
drivers/net/e1000/igb_rxtx.c +1 -1
+				E1000_RXCSUM_CRCOFL);
 	else
-		rxcsum &= ~(E1000_RXCSUM_IPOFL |

E1000_RXCSUM_TUOFL);

drivers/net/e1000/igb_rxtx.c eth_igb_rx_init(struct rte_eth_dev *dev) · line 2408

Quoted 2 lines
drivers/net/e1000/igb_rxtx.c +1 -1
-	E1000_WRITE_REG(hw, E1000_RXCSUM, rxcsum);
+		rxcsum &= ~(E1000_RXCSUM_IPOFL |

E1000_RXCSUM_TUOFL

Quoted 7 lines

|

drivers/net/e1000/igb_rxtx.c +1 -1
+				E1000_RXCSUM_CRCOFL);
 
 	/* Setup the Receive Control Register. */
 	if (dev->data->dev_conf.rxmode.hw_strip_crc) {
--

2.9.3

author
#3 lore raw

PATCH v2 1/1 net/e1000: fix checksum valid flags error

In reply to Wei Zhao

This problem is caused by a missing set of E1000_RXCSUM_CRCOFL in eth_igb_rx_init(), it should be set to enable SCTP packet L4 checksum.If it is not set, the printf message in cksum fwd about L4 SCTP cksum flag is error.

Fixes af75078fece3 ("first public release")

---
Changes in v2:

fix patch log error in fixes information.

---
 drivers/net/e1000/igb_rxtx.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/net/e1000/igb_rxtx.c +4 -3
index b3b601b..6c2749b 100644
@@ -2402,10 +2402,11 @@ eth_igb_rx_init(struct rte_eth_dev *dev)
 
 	/* Enable both L3/L4 rx checksum offload */
 	if (dev->data->dev_conf.rxmode.hw_ip_checksum)
-		rxcsum |= (E1000_RXCSUM_IPOFL  | E1000_RXCSUM_TUOFL);
+		rxcsum |= (E1000_RXCSUM_IPOFL | E1000_RXCSUM_TUOFL |
+				E1000_RXCSUM_CRCOFL);
 	else
-		rxcsum &= ~(E1000_RXCSUM_IPOFL | E1000_RXCSUM_TUOFL);
-	E1000_WRITE_REG(hw, E1000_RXCSUM, rxcsum);
+		rxcsum &= ~(E1000_RXCSUM_IPOFL | E1000_RXCSUM_TUOFL |
+				E1000_RXCSUM_CRCOFL);
 
 	/* Setup the Receive Control Register. */
 	if (dev->data->dev_conf.rxmode.hw_strip_crc) {
Signature · 1 line
2.9.3
author
#4 lore raw

PATCH v3 1/1 net/e1000: fix checksum valid flags error

This problem is caused by a missing set of E1000_RXCSUM_CRCOFL in eth_igb_rx_init(), it should be set to enable SCTP packet L4 checksum.If it is not set, the printf message in cksum fwd about L4 SCTP cksum flag is error.for example, even if the sctp packet is not do L4 checksum, the print message is always PKT_RX_L4_CKSUM_GOOD.

Fixes af75078fece3 ("first public release")

---
Changes in v2:

add more log for details.

Changes in v3:

fix a typo error.

---
 drivers/net/e1000/igb_rxtx.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/net/e1000/igb_rxtx.c +4 -2
index b3b601b..1c80a2a 100644
@@ -2402,9 +2402,11 @@ eth_igb_rx_init(struct rte_eth_dev *dev)
 
 	/* Enable both L3/L4 rx checksum offload */
 	if (dev->data->dev_conf.rxmode.hw_ip_checksum)
-		rxcsum |= (E1000_RXCSUM_IPOFL  | E1000_RXCSUM_TUOFL);
+		rxcsum |= (E1000_RXCSUM_IPOFL | E1000_RXCSUM_TUOFL |
+				E1000_RXCSUM_CRCOFL);
 	else
-		rxcsum &= ~(E1000_RXCSUM_IPOFL | E1000_RXCSUM_TUOFL);
+		rxcsum &= ~(E1000_RXCSUM_IPOFL | E1000_RXCSUM_TUOFL |
+				E1000_RXCSUM_CRCOFL);
 	E1000_WRITE_REG(hw, E1000_RXCSUM, rxcsum);
 
 	/* Setup the Receive Control Register. */
Signature · 1 line
2.7.4
Acked-by on v3 1/1
#5 lore raw

Hi,

Quoted 13 lines

-----Original Message-----
From: Zhao1, Wei
Sent: Wednesday, May 31, 2017 11:03 AM
To: [email protected]
Cc: Lu, Wenzhuo; Zhao1, Wei
Subject: [PATCH v3] net/e1000: fix checksum valid flags error

This problem is caused by a missing set of E1000_RXCSUM_CRCOFL in eth_igb_rx_init(), it should be set to enable SCTP packet
L4 checksum.If it is not set, the printf message in cksum fwd about L4 SCTP cksum flag is error.for example, even if the sctp packet is not do L4 checksum, the print message is always PKT_RX_L4_CKSUM_GOOD.

Quoted 3 lines
Fixes af75078fece3 ("first public release")
Applied
#6 lore raw
Quoted 16 lines · Wenzhuo

Hi,

Quoted 13 lines

-----Original Message-----
From: Zhao1, Wei
Sent: Wednesday, May 31, 2017 11:03 AM
To: [email protected]
Cc: Lu, Wenzhuo; Zhao1, Wei
Subject: [PATCH v3] net/e1000: fix checksum valid flags error

This problem is caused by a missing set of E1000_RXCSUM_CRCOFL in eth_igb_rx_init(), it should be set to enable SCTP packet
L4 checksum.If it is not set, the printf message in cksum fwd about L4 SCTP cksum flag is error.for example, even if the sctp packet is not do L4 checksum, the print message is always PKT_RX_L4_CKSUM_GOOD.

Quoted 4 lines
Quoted 3 lines
Fixes af75078fece3 ("first public release")

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