summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBei Sun <bei.sun@broadcom.com>2018-09-28 19:00:04 -0700
committerFerruh Yigit <ferruh.yigit@intel.com>2018-10-11 18:53:48 +0200
commit3153ec8bd1eedbc6d34671b0e2b51bf97896caa3 (patch)
tree5778f8711bfcd08b04dcae671b4559d077256c09
parent5bf10cdb67db5ee7308cc752b51f0f12dcdcb0e8 (diff)
downloaddpdk-3153ec8bd1eedbc6d34671b0e2b51bf97896caa3.zip
dpdk-3153ec8bd1eedbc6d34671b0e2b51bf97896caa3.tar.gz
dpdk-3153ec8bd1eedbc6d34671b0e2b51bf97896caa3.tar.xz
net/bnxt: set VLAN strip mode before default VNIC cfg
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@dpdk.org Signed-off-by: Bei Sun <bei.sun@broadcom.com> Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
-rw-r--r--drivers/net/bnxt/bnxt_ethdev.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 0bc8c50..88e026c 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;
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;
@@ -283,6 +285,16 @@ static int bnxt_init_chip(struct bnxt *bp)
}
}
+ /*
+ * 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) {
PMD_DRV_LOG(ERR, "HWRM vnic %d cfg failure rc: %x\n",