| 3488 | } |
| 3489 | |
| 3490 | static int |
| 3491 | igbvf_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 | |
| 3527 | static int |
| 3528 | igbvf_promiscuous_enable(struct rte_eth_dev *dev) |
no test coverage detected