summaryrefslogtreecommitdiff
path: root/drivers/net/bnxt/bnxt_rxr.c
diff options
context:
space:
mode:
authorAjit Khaparde <ajit.khaparde@broadcom.com>2017-09-28 16:43:31 -0500
committerFerruh Yigit <ferruh.yigit@intel.com>2017-10-06 02:49:49 +0200
commit7ec39d8c524b87017745df03c961c1ef341c7cbb (patch)
treee0271d3815f4f509a00106f8d320f501a4931a93 /drivers/net/bnxt/bnxt_rxr.c
parentd644aa046a925acb2e7de22a12acf0ffaa4530e4 (diff)
downloaddpdk-next-eventdev-7ec39d8c524b87017745df03c961c1ef341c7cbb.zip
dpdk-next-eventdev-7ec39d8c524b87017745df03c961c1ef341c7cbb.tar.gz
dpdk-next-eventdev-7ec39d8c524b87017745df03c961c1ef341c7cbb.tar.xz
net/bnxt: update status of Rx IP/L4 CKSUM
update ol_flags with the appropriate status of IP/L4 cksum in Rx path. Fixes: 2eb53b134aae ("net/bnxt: add initial Rx code") 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.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index bf9f78a..28105b0 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -418,6 +418,17 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,
mbuf->ol_flags |= PKT_RX_VLAN_PKT;
}
+ if (likely(RX_CMP_IP_CS_OK(rxcmp1)))
+ mbuf->ol_flags |= PKT_RX_IP_CKSUM_GOOD;
+ else
+ mbuf->ol_flags |= PKT_RX_IP_CKSUM_NONE;
+
+ if (likely(RX_CMP_L4_CS_OK(rxcmp1)))
+ mbuf->ol_flags |= PKT_RX_L4_CKSUM_GOOD;
+ else
+ mbuf->ol_flags |= PKT_RX_L4_CKSUM_NONE;
+
+
#ifdef BNXT_DEBUG
if (rxcmp1->errors_v2 & RX_CMP_L2_ERRORS) {
/* Re-install the mbuf back to the rx ring */