net/e1000: fix checksum valid flags error
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.
--- drivers/net/e1000/igb_rxtx.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/net/e1000/igb_rxtx.c +4 -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 | +E1000_RXCSUM_CRCOFL );/* Setup the Receive Control Register. */ if (dev->data->dev_conf.rxmode.hw_strip_crc) {
Signature · 1 line
2.9.3
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 errorThis problem is caused by a missing set of
E1000_RXCSUM_CRCOFLineth_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
Signed-off-by Wei Zhao <[email protected]>--- 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
-0b3b601b..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
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 errorHi 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 errorThis problem is caused by a missing set of
E1000_RXCSUM_CRCOFLineth_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
Signed-off-by Wei Zhao <[email protected]>--- drivers/net/e1000/igb_rxtx.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)(quoted diff) +0
-0
b/drivers/net/e1000/igb_rxtx.cindex b3b601b..6c2749b 100644drivers/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_TUOFLQuoted 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
PATCH v2 1/1 net/e1000: fix checksum valid flags error
In reply to Wei ZhaoThis 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.
---
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
@@ -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
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.
---
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
@@ -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
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 errorThis problem is caused by a missing set of
E1000_RXCSUM_CRCOFLineth_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 alwaysPKT_RX_L4_CKSUM_GOOD.
Quoted 3 lines
Fixes af75078fece3 ("first public release")Signed-off-by Wei Zhao <[email protected]>
Ferruh Yigit
AppliedQuoted 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 errorThis problem is caused by a missing set of
E1000_RXCSUM_CRCOFLineth_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 alwaysPKT_RX_L4_CKSUM_GOOD.
Quoted 4 lines
Quoted 3 lines
Fixes af75078fece3 ("first public release")Signed-off-by Wei Zhao <[email protected]>Acked-by Wenzhuo Lu <[email protected]>
Applied to dpdk-next-net/master, thanks.