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

Function ixgbe_set_default_mac_addr

dpdk/drivers/net/ixgbe/ixgbe_ethdev.c:5305–5322  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5303}
5304
5305static int
5306ixgbe_set_default_mac_addr(struct rte_eth_dev *dev, struct rte_ether_addr *addr)
5307{
5308 struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);
5309
5310 /*
5311 * This function calls into the base driver, which in turn will use
5312 * function pointers, which are not guaranteed to be valid in secondary
5313 * processes, so avoid using this function in secondary processes.
5314 */
5315 if (rte_eal_process_type() != RTE_PROC_PRIMARY)
5316 return -E_RTE_SECONDARY;
5317
5318 ixgbe_remove_rar(dev, 0);
5319 ixgbe_add_rar(dev, addr, 0, pci_dev->max_vfs);
5320
5321 return 0;
5322}
5323
5324static bool
5325is_device_supported(struct rte_eth_dev *dev, struct rte_pci_driver *drv)

Callers

nothing calls this directly

Calls 3

rte_eal_process_typeFunction · 0.85
ixgbe_remove_rarFunction · 0.85
ixgbe_add_rarFunction · 0.85

Tested by

no test coverage detected