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 705F1A046B for ; Tue, 23 Jul 2019 03:03:05 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 57F1D1BFA6; Tue, 23 Jul 2019 03:03:05 +0200 (CEST) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 5B6C41BF82 for ; Tue, 23 Jul 2019 03:03:04 +0200 (CEST) Received: from Internal Mail-Server by MTLPINE2 (envelope-from yskoh@mellanox.com) with ESMTPS (AES256-SHA encrypted); 23 Jul 2019 04:03:01 +0300 Received: from scfae-sc-2.mti.labs.mlnx (scfae-sc-2.mti.labs.mlnx [10.101.0.96]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id x6N11Hfh026580; Tue, 23 Jul 2019 04:03:00 +0300 From: Yongseok Koh To: Stephen Hemminger Cc: Ajit Khaparde , dpdk stable Date: Mon, 22 Jul 2019 18:00:24 -0700 Message-Id: <20190723010115.6446-57-yskoh@mellanox.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190723010115.6446-1-yskoh@mellanox.com> References: <20190723010115.6446-1-yskoh@mellanox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/bnxt: fix Rx VLAN offload flags' has been queued to LTS release 17.11.7 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to LTS release 17.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objection by 07/27/19. So please shout if anyone has objection. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Thanks. Yongseok --- >From 6b489a635e8d9dba5936d30f414312615c50c671 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Mon, 25 Mar 2019 14:27:54 -0700 Subject: [PATCH] net/bnxt: fix Rx VLAN offload flags [ upstream commit 4339de851e55364d0f1f995babaa0006968870c0 ] The bnxt driver is not correctly setting the receive VLAN offload flags. When VLAN is offloaded the driver must set the PKT_RX_VLAN_STRIPPED flag. Actually, several drivers have the same bug, only most of the Intel drivers look right. Any driver that sets vlan_tci is probably stripping the tag, and should be setting RX_VLAN_STRIPPED. To quote rte_mbuf.h: /** * The RX packet is a 802.1q VLAN packet, and the tci has been * saved in in mbuf->vlan_tci. * If the flag PKT_RX_VLAN_STRIPPED is also present, the VLAN * header has been stripped from mbuf data, else it is still * present. */ Fixes: 2eb53b134aae ("net/bnxt: add initial Rx code") Signed-off-by: Stephen Hemminger Acked-by: Ajit Khaparde --- drivers/net/bnxt/bnxt_rxr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c index c5c54847a0..4aaad3563e 100644 --- a/drivers/net/bnxt/bnxt_rxr.c +++ b/drivers/net/bnxt/bnxt_rxr.c @@ -199,7 +199,7 @@ static void bnxt_tpa_start(struct bnxt_rx_queue *rxq, if (tpa_start1->flags2 & rte_cpu_to_le_32(RX_TPA_START_CMPL_FLAGS2_META_FORMAT_VLAN)) { mbuf->vlan_tci = rte_le_to_cpu_32(tpa_start1->metadata); - mbuf->ol_flags |= PKT_RX_VLAN; + mbuf->ol_flags |= PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED; } if (likely(tpa_start1->flags2 & rte_cpu_to_le_32(RX_TPA_START_CMPL_FLAGS2_L4_CS_CALC))) @@ -464,7 +464,7 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt, (RX_PKT_CMPL_METADATA_VID_MASK | RX_PKT_CMPL_METADATA_DE | RX_PKT_CMPL_METADATA_PRI_MASK); - mbuf->ol_flags |= PKT_RX_VLAN; + mbuf->ol_flags |= PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED; } if (likely(RX_CMP_IP_CS_OK(rxcmp1))) -- 2.21.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2019-07-22 17:55:09.569517778 -0700 +++ 0057-net-bnxt-fix-Rx-VLAN-offload-flags.patch 2019-07-22 17:55:06.165472000 -0700 @@ -1,8 +1,10 @@ -From 4339de851e55364d0f1f995babaa0006968870c0 Mon Sep 17 00:00:00 2001 +From 6b489a635e8d9dba5936d30f414312615c50c671 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Mon, 25 Mar 2019 14:27:54 -0700 Subject: [PATCH] net/bnxt: fix Rx VLAN offload flags +[ upstream commit 4339de851e55364d0f1f995babaa0006968870c0 ] + The bnxt driver is not correctly setting the receive VLAN offload flags. When VLAN is offloaded the driver must set the PKT_RX_VLAN_STRIPPED flag. @@ -22,7 +24,6 @@ */ Fixes: 2eb53b134aae ("net/bnxt: add initial Rx code") -Cc: stable@dpdk.org Signed-off-by: Stephen Hemminger Acked-by: Ajit Khaparde @@ -31,10 +32,10 @@ 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c -index 1bfc63d930..dc695e1777 100644 +index c5c54847a0..4aaad3563e 100644 --- a/drivers/net/bnxt/bnxt_rxr.c +++ b/drivers/net/bnxt/bnxt_rxr.c -@@ -154,7 +154,7 @@ static void bnxt_tpa_start(struct bnxt_rx_queue *rxq, +@@ -199,7 +199,7 @@ static void bnxt_tpa_start(struct bnxt_rx_queue *rxq, if (tpa_start1->flags2 & rte_cpu_to_le_32(RX_TPA_START_CMPL_FLAGS2_META_FORMAT_VLAN)) { mbuf->vlan_tci = rte_le_to_cpu_32(tpa_start1->metadata); @@ -43,7 +44,7 @@ } if (likely(tpa_start1->flags2 & rte_cpu_to_le_32(RX_TPA_START_CMPL_FLAGS2_L4_CS_CALC))) -@@ -437,7 +437,7 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt, +@@ -464,7 +464,7 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt, (RX_PKT_CMPL_METADATA_VID_MASK | RX_PKT_CMPL_METADATA_DE | RX_PKT_CMPL_METADATA_PRI_MASK);