[dpdk-dev,v3] net/e1000: fix checksum valid flags error

Message ID 1496199792-7021-1-git-send-email-wei.zhao1@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Zhao1, Wei May 31, 2017, 3:03 a.m. UTC
  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")

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>

---
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(-)
  

Comments

Wenzhuo Lu May 31, 2017, 3:35 a.m. UTC | #1
Hi,


> -----Original Message-----
> From: Zhao1, Wei
> Sent: Wednesday, May 31, 2017 11:03 AM
> To: dev@dpdk.org
> 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.
> 
> Fixes: af75078fece3 ("first public release")
> 
> Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
  
Ferruh Yigit June 1, 2017, 11:08 a.m. UTC | #2
On 5/31/2017 4:35 AM, Lu, Wenzhuo wrote:
> Hi,
> 
> 
>> -----Original Message-----
>> From: Zhao1, Wei
>> Sent: Wednesday, May 31, 2017 11:03 AM
>> To: dev@dpdk.org
>> 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.
>>
>> Fixes: af75078fece3 ("first public release")
>>
>> Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
> Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>

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

Patch

diff --git a/drivers/net/e1000/igb_rxtx.c b/drivers/net/e1000/igb_rxtx.c
index b3b601b..1c80a2a 100644
--- a/drivers/net/e1000/igb_rxtx.c
+++ b/drivers/net/e1000/igb_rxtx.c
@@ -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. */