summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorKalesh AP <kalesh-anakkur.purayil@broadcom.com>2019-11-15 10:20:28 +0530
committerFerruh Yigit <ferruh.yigit@intel.com>2019-11-20 17:36:05 +0100
commit1bcec6ee08b4a2b7276da86323eb40da002ab421 (patch)
tree21867878ce2bc7a3a98ad97d87ebf53ee641ed58 /drivers
parent7988d0322954da29ff13f528f7c92ddc58f0bc5a (diff)
downloaddpdk-1bcec6ee08b4a2b7276da86323eb40da002ab421.zip
dpdk-1bcec6ee08b4a2b7276da86323eb40da002ab421.tar.gz
dpdk-1bcec6ee08b4a2b7276da86323eb40da002ab421.tar.xz
net/bnxt: fix IP checksum error indication
Update "mbuf->ol_flags" correctly for 'Checksum Unknown' errors for both tunneled and non-tunneled IP packets. Fixes: b875339622a3 ("net/bnxt: fix L4 checksum indication in non-vector Rx") Cc: stable@dpdk.org Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/bnxt/bnxt_rxr.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index c35bc1a..3b713c2 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -515,16 +515,18 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,
if (likely(IS_IP_NONTUNNEL_PKT(flags2_f))) {
if (unlikely(RX_CMP_IP_CS_ERROR(rxcmp1)))
mbuf->ol_flags |= PKT_RX_IP_CKSUM_BAD;
+ else if (unlikely(RX_CMP_IP_CS_UNKNOWN(rxcmp1)))
+ mbuf->ol_flags |= PKT_RX_IP_CKSUM_UNKNOWN;
else
mbuf->ol_flags |= PKT_RX_IP_CKSUM_GOOD;
} else if (IS_IP_TUNNEL_PKT(flags2_f)) {
if (unlikely(RX_CMP_IP_OUTER_CS_ERROR(rxcmp1) ||
RX_CMP_IP_CS_ERROR(rxcmp1)))
mbuf->ol_flags |= PKT_RX_IP_CKSUM_BAD;
+ else if (unlikely(RX_CMP_IP_CS_UNKNOWN(rxcmp1)))
+ mbuf->ol_flags |= PKT_RX_IP_CKSUM_UNKNOWN;
else
mbuf->ol_flags |= PKT_RX_IP_CKSUM_GOOD;
- } else if (unlikely(RX_CMP_IP_CS_UNKNOWN(rxcmp1))) {
- mbuf->ol_flags |= PKT_RX_IP_CKSUM_UNKNOWN;
}
/* L4 Checksum */