[dpdk-stable] patch 'net/bnxt: set VLAN strip mode before default VNIC cfg' has been queued to LTS release 17.11.5

Yongseok Koh yskoh at mellanox.com
Fri Nov 30 00:10:47 CET 2018


Hi,

FYI, your patch has been queued to LTS release 17.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/01/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Yongseok

---
>From d58e3cd8c34b45c19f6256363c73879466260169 Mon Sep 17 00:00:00 2001
From: Bei Sun <bei.sun at broadcom.com>
Date: Fri, 28 Sep 2018 19:00:04 -0700
Subject: [PATCH] net/bnxt: set VLAN strip mode before default VNIC cfg

[ upstream commit 3153ec8bd1eedbc6d34671b0e2b51bf97896caa3 ]

Firmware sets pf pair in default VNIC cfg. If the VLAN strip
setting is not available at this time, it will not be
configured correctly in the CFA.
Set the desired VLAN strip mode before default VNIC configuration.

Fixes: 7fe5668d2ea3 ("net/bnxt: support VLAN filter and strip")

Signed-off-by: Bei Sun <bei.sun at broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde at broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 7466a642e..109112142 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -204,7 +204,9 @@ static int bnxt_init_chip(struct bnxt *bp)
 	unsigned int i, rss_idx, fw_idx;
 	struct rte_eth_link new;
 	struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(bp->eth_dev);
+	struct rte_eth_conf *dev_conf = &bp->eth_dev->data->dev_conf;
 	struct rte_intr_handle *intr_handle = &pci_dev->intr_handle;
+	uint64_t rx_offloads = dev_conf->rxmode.offloads;
 	uint32_t intr_vector = 0;
 	uint32_t queue_id, base = BNXT_MISC_VEC_ID;
 	uint32_t vec = BNXT_MISC_VEC_ID;
@@ -275,6 +277,16 @@ static int bnxt_init_chip(struct bnxt *bp)
 			goto err_out;
 		}
 
+		/*
+		 * Firmware sets pf pair in default vnic cfg. If the VLAN strip
+		 * setting is not available at this time, it will not be
+		 * configured correctly in the CFA.
+		 */
+		if (rx_offloads & DEV_RX_OFFLOAD_VLAN_STRIP)
+			vnic->vlan_strip = true;
+		else
+			vnic->vlan_strip = false;
+
 		rc = bnxt_hwrm_vnic_cfg(bp, vnic);
 		if (rc) {
 			RTE_LOG(ERR, PMD, "HWRM vnic %d cfg failure rc: %x\n",
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-29 15:01:47.573529556 -0800
+++ 0053-net-bnxt-set-VLAN-strip-mode-before-default-VNIC-cfg.patch	2018-11-29 15:01:45.118959000 -0800
@@ -1,15 +1,16 @@
-From 3153ec8bd1eedbc6d34671b0e2b51bf97896caa3 Mon Sep 17 00:00:00 2001
+From d58e3cd8c34b45c19f6256363c73879466260169 Mon Sep 17 00:00:00 2001
 From: Bei Sun <bei.sun at broadcom.com>
 Date: Fri, 28 Sep 2018 19:00:04 -0700
 Subject: [PATCH] net/bnxt: set VLAN strip mode before default VNIC cfg
 
+[ upstream commit 3153ec8bd1eedbc6d34671b0e2b51bf97896caa3 ]
+
 Firmware sets pf pair in default VNIC cfg. If the VLAN strip
 setting is not available at this time, it will not be
 configured correctly in the CFA.
 Set the desired VLAN strip mode before default VNIC configuration.
 
 Fixes: 7fe5668d2ea3 ("net/bnxt: support VLAN filter and strip")
-Cc: stable at dpdk.org
 
 Signed-off-by: Bei Sun <bei.sun at broadcom.com>
 Signed-off-by: Ajit Khaparde <ajit.khaparde at broadcom.com>
@@ -18,11 +19,11 @@
  1 file changed, 12 insertions(+)
 
 diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
-index 0bc8c5004..88e026c7d 100644
+index 7466a642e..109112142 100644
 --- a/drivers/net/bnxt/bnxt_ethdev.c
 +++ b/drivers/net/bnxt/bnxt_ethdev.c
-@@ -202,7 +202,9 @@ static int bnxt_init_chip(struct bnxt *bp)
- 	struct bnxt_rx_queue *rxq;
+@@ -204,7 +204,9 @@ static int bnxt_init_chip(struct bnxt *bp)
+ 	unsigned int i, rss_idx, fw_idx;
  	struct rte_eth_link new;
  	struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(bp->eth_dev);
 +	struct rte_eth_conf *dev_conf = &bp->eth_dev->data->dev_conf;
@@ -31,8 +32,8 @@
  	uint32_t intr_vector = 0;
  	uint32_t queue_id, base = BNXT_MISC_VEC_ID;
  	uint32_t vec = BNXT_MISC_VEC_ID;
-@@ -283,6 +285,16 @@ static int bnxt_init_chip(struct bnxt *bp)
- 			}
+@@ -275,6 +277,16 @@ static int bnxt_init_chip(struct bnxt *bp)
+ 			goto err_out;
  		}
  
 +		/*
@@ -47,7 +48,7 @@
 +
  		rc = bnxt_hwrm_vnic_cfg(bp, vnic);
  		if (rc) {
- 			PMD_DRV_LOG(ERR, "HWRM vnic %d cfg failure rc: %x\n",
+ 			RTE_LOG(ERR, PMD, "HWRM vnic %d cfg failure rc: %x\n",
 -- 
 2.11.0
 


More information about the stable mailing list