From 760110abd68d84014b48bb84945276016d3e7616 Mon Sep 17 00:00:00 2001 From: Wei Zhao Date: Wed, 31 May 2017 11:03:12 +0800 Subject: [PATCH] net/igb: fix checksum valid flags To enable L4 checksum offload for SCTP packets, E1000_RXCSUM_CRCOFL should be set. Otherwise, for SCTP packets even L4 checksum not calculated, it will return PKT_RX_L4_CKSUM_GOOD. Fixes: af75078fece3 ("first public release") Signed-off-by: Wei Zhao Acked-by: Wenzhuo Lu --- drivers/net/e1000/igb_rxtx.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/e1000/igb_rxtx.c b/drivers/net/e1000/igb_rxtx.c index b3b601b79a..1c80a2a1be 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. */ -- 2.20.1