MCPcopy Create free account
hub / github.com/F-Stack/f-stack / bnxt_free_one_vnic

Function bnxt_free_one_vnic

dpdk/drivers/net/bnxt/bnxt_ethdev.c:2702–2730  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2700}
2701
2702static int bnxt_free_one_vnic(struct bnxt *bp, uint16_t vnic_id)
2703{
2704 struct bnxt_vnic_info *vnic = &bp->vnic_info[vnic_id];
2705 unsigned int i;
2706 int rc;
2707
2708 /* Destroy vnic filters and vnic */
2709 if (bp->eth_dev->data->dev_conf.rxmode.offloads &
2710 RTE_ETH_RX_OFFLOAD_VLAN_FILTER) {
2711 for (i = 0; i < RTE_ETHER_MAX_VLAN_ID; i++)
2712 bnxt_del_vlan_filter(bp, i);
2713 }
2714 bnxt_del_dflt_mac_filter(bp, vnic);
2715
2716 rc = bnxt_hwrm_vnic_ctx_free(bp, vnic);
2717 if (rc)
2718 return rc;
2719
2720 rc = bnxt_hwrm_vnic_free(bp, vnic);
2721 if (rc)
2722 return rc;
2723
2724 rte_free(vnic->fw_grp_ids);
2725 vnic->fw_grp_ids = NULL;
2726
2727 vnic->rx_queue_cnt = 0;
2728
2729 return 0;
2730}
2731
2732static int
2733bnxt_config_vlan_hw_stripping(struct bnxt *bp, uint64_t rx_offloads)

Callers 1

Calls 5

bnxt_del_vlan_filterFunction · 0.85
bnxt_del_dflt_mac_filterFunction · 0.85
bnxt_hwrm_vnic_ctx_freeFunction · 0.85
bnxt_hwrm_vnic_freeFunction · 0.85
rte_freeFunction · 0.85

Tested by

no test coverage detected