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

Function igbvf_dev_close

dpdk/drivers/net/e1000/igb_ethdev.c:3490–3525  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3488}
3489
3490static int
3491igbvf_dev_close(struct rte_eth_dev *dev)
3492{
3493 struct e1000_hw *hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
3494 struct rte_ether_addr addr;
3495 struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);
3496 int ret;
3497
3498 PMD_INIT_FUNC_TRACE();
3499
3500 if (rte_eal_process_type() != RTE_PROC_PRIMARY)
3501 return 0;
3502
3503 e1000_reset_hw(hw);
3504
3505 ret = igbvf_dev_stop(dev);
3506 if (ret != 0)
3507 return ret;
3508
3509 igb_dev_free_queues(dev);
3510
3511 /**
3512 * reprogram the RAR with a zero mac address,
3513 * to ensure that the VF traffic goes to the PF
3514 * after stop, close and detach of the VF.
3515 **/
3516
3517 memset(&addr, 0, sizeof(addr));
3518 igbvf_default_mac_addr_set(dev, &addr);
3519
3520 rte_intr_callback_unregister(pci_dev->intr_handle,
3521 eth_igbvf_interrupt_handler,
3522 (void *)dev);
3523
3524 return 0;
3525}
3526
3527static int
3528igbvf_promiscuous_enable(struct rte_eth_dev *dev)

Callers 1

eth_igbvf_dev_uninitFunction · 0.85

Calls 7

rte_eal_process_typeFunction · 0.85
e1000_reset_hwFunction · 0.85
igbvf_dev_stopFunction · 0.85
igb_dev_free_queuesFunction · 0.85
memsetFunction · 0.85

Tested by

no test coverage detected