From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7FE04A04C8; Fri, 15 Nov 2019 05:58:47 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7FCA72C08; Fri, 15 Nov 2019 05:58:46 +0100 (CET) Received: from relay.smtp.broadcom.com (unknown [192.19.232.149]) by dpdk.org (Postfix) with ESMTP id D8A8591 for ; Fri, 15 Nov 2019 05:58:44 +0100 (CET) Received: from dhcp-10-123-153-55.dhcp.broadcom.net (bgccx-dev-host-lnx35.bec.broadcom.net [10.123.153.55]) by relay.smtp.broadcom.com (Postfix) with ESMTP id 4B2861BE50D; Thu, 14 Nov 2019 20:58:41 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.10.3 relay.smtp.broadcom.com 4B2861BE50D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1573793922; bh=FBoLsjkiP7UM9XViE7hsPngBz7t+Bk+ODtm0Anuvq9g=; h=From:To:Cc:Subject:Date:From; b=Nqh/GC3o+XGbx0aOQtmbKBMZNWlyK+ry6u+RvfQ9h3/AB/BVminNXscfPxmAg+8Lx nsglpURRmmbLbR0rUN1FW8iwBrgNitAtGNDUTjtJXgM+mcTbcUUlA9ZpnA05U7Tsoz jOn5RzJ8wI5yX3kKHOEr/Onxn8RUl+MkEU7ioODo= From: Somnath Kotur To: dev@dpdk.org Cc: ferruh.yigit@intel.com Date: Fri, 15 Nov 2019 10:20:28 +0530 Message-Id: <20191115045028.11319-1-somnath.kotur@broadcom.com> X-Mailer: git-send-email 2.10.1.613.g2cc2e70 Subject: [dpdk-dev] [PATCH] net/bnxt: fix IP checksum error indication in non-vector mode rx X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Kalesh AP 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") Signed-off-by: Kalesh AP Reviewed-by: Somnath Kotur --- drivers/net/bnxt/bnxt_rxr.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c index c35bc1afd..3b713c242 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 */ -- 2.23.0.rc1