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

Function bnxt_mac_addr_add_op

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

Source from the content-addressed store, hash-verified

1812}
1813
1814static int bnxt_mac_addr_add_op(struct rte_eth_dev *eth_dev,
1815 struct rte_ether_addr *mac_addr,
1816 uint32_t index, uint32_t pool)
1817{
1818 struct bnxt *bp = eth_dev->data->dev_private;
1819 struct bnxt_vnic_info *vnic = &bp->vnic_info[pool];
1820 int rc = 0;
1821
1822 rc = is_bnxt_in_error(bp);
1823 if (rc)
1824 return rc;
1825
1826 if (BNXT_VF(bp) && !BNXT_VF_IS_TRUSTED(bp)) {
1827 PMD_DRV_LOG(ERR, "Cannot add MAC address to a VF interface\n");
1828 return -ENOTSUP;
1829 }
1830
1831 if (!vnic) {
1832 PMD_DRV_LOG(ERR, "VNIC not found for pool %d!\n", pool);
1833 return -EINVAL;
1834 }
1835
1836 /* Filter settings will get applied when port is started */
1837 if (!eth_dev->data->dev_started)
1838 return 0;
1839
1840 rc = bnxt_add_mac_filter(bp, vnic, mac_addr, index, pool);
1841
1842 return rc;
1843}
1844
1845int bnxt_link_update_op(struct rte_eth_dev *eth_dev, int wait_to_complete)
1846{

Callers 1

bnxt_restore_mac_filtersFunction · 0.85

Calls 2

is_bnxt_in_errorFunction · 0.85
bnxt_add_mac_filterFunction · 0.85

Tested by

no test coverage detected