* [dpdk-stable] [PATCH v3 1/5] net/bnxt: fix L4 checksum indication in non-vector Rx
[not found] ` <20191104225026.97569-1-ajit.khaparde@broadcom.com>
@ 2019-11-04 22:50 ` Ajit Khaparde
0 siblings, 0 replies; only message in thread
From: Ajit Khaparde @ 2019-11-04 22:50 UTC (permalink / raw)
To: dev; +Cc: ferruh.yigit, Kalesh AP, stable, Somnath Kotur
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Update "mbuf->ol_flags" correctly for inner and ourter ip checksum
errors in case of tunnel and non-tunnel packets.
Fixes: 65ee636872eb ("net/bnxt: fix Rx checksum flags")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_rxr.c | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index ee1444c1d..c35bc1afd 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -512,15 +512,19 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,
flags2_f = flags2_0xf(rxcmp1);
/* IP Checksum */
- if (unlikely(((IS_IP_NONTUNNEL_PKT(flags2_f)) &&
- (RX_CMP_IP_CS_ERROR(rxcmp1))) ||
- (IS_IP_TUNNEL_PKT(flags2_f) &&
- (RX_CMP_IP_OUTER_CS_ERROR(rxcmp1))))) {
- mbuf->ol_flags |= PKT_RX_IP_CKSUM_BAD;
+ 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
+ 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
+ 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;
- } else {
- mbuf->ol_flags |= PKT_RX_IP_CKSUM_GOOD;
}
/* L4 Checksum */
--
2.21.0 (Apple Git-122)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-11-04 22:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20191104100240.28974-1-kalesh-anakkur.purayil@broadcom.com>
[not found] ` <20191104225026.97569-1-ajit.khaparde@broadcom.com>
2019-11-04 22:50 ` [dpdk-stable] [PATCH v3 1/5] net/bnxt: fix L4 checksum indication in non-vector Rx Ajit Khaparde
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).