net/bnxt: update status of Rx IP/L4 CKSUM
[dpdk.git] / drivers / net / bnxt / bnxt_rxr.c
index bf9f78a..28105b0 100644 (file)
@@ -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 */