From 597cb1874068054d4c0be41f161a72ef37888930 Mon Sep 17 00:00:00 2001 From: Christian Ehrhardt Date: Tue, 26 Feb 2019 09:17:37 +0100 Subject: New upstream version 17.11.5 Change-Id: I8d2aa1aee2a9a78614dff5a01008f91e88e810c7 Signed-off-by: Christian Ehrhardt --- drivers/net/bnxt/bnxt_ethdev.c | 12 ++++++++++++ drivers/net/bnxt/bnxt_hwrm.c | 4 +++- drivers/net/bnxt/bnxt_txr.c | 5 +++-- 3 files changed, 18 insertions(+), 3 deletions(-) (limited to 'drivers/net/bnxt') diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index 7466a642..10911214 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", diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c index db3222f4..815bad97 100644 --- a/drivers/net/bnxt/bnxt_hwrm.c +++ b/drivers/net/bnxt/bnxt_hwrm.c @@ -396,6 +396,8 @@ int bnxt_hwrm_set_l2_filter(struct bnxt *bp, HWRM_PREP(req, CFA_L2_FILTER_ALLOC); req.flags = rte_cpu_to_le_32(filter->flags); + req.flags |= + rte_cpu_to_le_32(HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_OUTERMOST); enables = filter->enables | HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_DST_ID; @@ -2744,7 +2746,7 @@ int bnxt_hwrm_vf_func_cfg_def_cp(struct bnxt *bp) HWRM_PREP(req, FUNC_VF_CFG); req.enables = rte_cpu_to_le_32( - HWRM_FUNC_CFG_INPUT_ENABLES_ASYNC_EVENT_CR); + HWRM_FUNC_VF_CFG_INPUT_ENABLES_ASYNC_EVENT_CR); req.async_event_cr = rte_cpu_to_le_16( bp->def_cp_ring->cp_ring_struct->fw_ring_id); rc = bnxt_hwrm_send_message(bp, &req, sizeof(req)); diff --git a/drivers/net/bnxt/bnxt_txr.c b/drivers/net/bnxt/bnxt_txr.c index f5ed03f1..e558413e 100644 --- a/drivers/net/bnxt/bnxt_txr.c +++ b/drivers/net/bnxt/bnxt_txr.c @@ -146,7 +146,7 @@ static uint16_t bnxt_start_xmit(struct rte_mbuf *tx_pkt, { struct bnxt_tx_ring_info *txr = txq->tx_ring; struct tx_bd_long *txbd; - struct tx_bd_long_hi *txbd1; + struct tx_bd_long_hi *txbd1 = NULL; uint32_t vlan_tag_flags, cfa_action; bool long_bd = false; uint16_t last_prod = 0; @@ -314,7 +314,8 @@ static uint16_t bnxt_start_xmit(struct rte_mbuf *tx_pkt, } txbd->flags_type |= TX_BD_LONG_FLAGS_PACKET_END; - txbd1->lflags = rte_cpu_to_le_32(txbd1->lflags); + if (txbd1) + txbd1->lflags = rte_cpu_to_le_32(txbd1->lflags); txr->tx_prod = RING_NEXT(txr->tx_ring_struct, txr->tx_prod); -- cgit 1.2.3-korg