summaryrefslogtreecommitdiff
path: root/drivers/net/bnxt/bnxt_rxr.c
diff options
context:
space:
mode:
authorAjit Khaparde <ajit.khaparde@broadcom.com>2018-05-22 11:13:47 -0700
committerFerruh Yigit <ferruh.yigit@intel.com>2018-05-23 00:35:01 +0200
commit65ee636872ebd13b85bb0bebeb3cade56f94e6f1 (patch)
treeb406b181251f7f002061457299ac6cf736d9a84d /drivers/net/bnxt/bnxt_rxr.c
parent7f799071fe75842e9e76cef98d019c1072cfb649 (diff)
downloaddpdk-next-eventdev-65ee636872ebd13b85bb0bebeb3cade56f94e6f1.zip
dpdk-next-eventdev-65ee636872ebd13b85bb0bebeb3cade56f94e6f1.tar.gz
dpdk-next-eventdev-65ee636872ebd13b85bb0bebeb3cade56f94e6f1.tar.xz
net/bnxt: fix Rx checksum flags
For frames where the hardware is not able to calculate checksum we are indicating such frames to be bad. And that is incorrect. Indicate PKT_RX_IP_CKSUM_UNKNOWN or PKT_RX_L4_CKSUM_UNKNOWN for such frames. Fixes: 7ec39d8c524b ("net/bnxt: update status of Rx IP/L4 CKSUM") Cc: stable@dpdk.org Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Diffstat (limited to 'drivers/net/bnxt/bnxt_rxr.c')
-rw-r--r--drivers/net/bnxt/bnxt_rxr.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index a8b5d66..9d88429 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -464,11 +464,15 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,
if (likely(RX_CMP_IP_CS_OK(rxcmp1)))
mbuf->ol_flags |= PKT_RX_IP_CKSUM_GOOD;
+ else if (likely(RX_CMP_IP_CS_UNKNOWN(rxcmp1)))
+ mbuf->ol_flags |= PKT_RX_IP_CKSUM_UNKNOWN;
else
mbuf->ol_flags |= PKT_RX_IP_CKSUM_BAD;
if (likely(RX_CMP_L4_CS_OK(rxcmp1)))
mbuf->ol_flags |= PKT_RX_L4_CKSUM_GOOD;
+ else if (likely(RX_CMP_L4_CS_UNKNOWN(rxcmp1)))
+ mbuf->ol_flags |= PKT_RX_L4_CKSUM_UNKNOWN;
else
mbuf->ol_flags |= PKT_RX_L4_CKSUM_BAD;