| 3442 | } |
| 3443 | |
| 3444 | static int |
| 3445 | igbvf_dev_stop(struct rte_eth_dev *dev) |
| 3446 | { |
| 3447 | struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev); |
| 3448 | struct rte_intr_handle *intr_handle = pci_dev->intr_handle; |
| 3449 | struct e1000_adapter *adapter = |
| 3450 | E1000_DEV_PRIVATE(dev->data->dev_private); |
| 3451 | |
| 3452 | /* |
| 3453 | * This function calls into the base driver, which in turn will use |
| 3454 | * function pointers, which are not guaranteed to be valid in secondary |
| 3455 | * processes, so avoid using this function in secondary processes. |
| 3456 | */ |
| 3457 | if (rte_eal_process_type() != RTE_PROC_PRIMARY) |
| 3458 | return -E_RTE_SECONDARY; |
| 3459 | |
| 3460 | if (adapter->stopped) |
| 3461 | return 0; |
| 3462 | |
| 3463 | PMD_INIT_FUNC_TRACE(); |
| 3464 | |
| 3465 | igbvf_stop_adapter(dev); |
| 3466 | |
| 3467 | /* |
| 3468 | * Clear what we set, but we still keep shadow_vfta to |
| 3469 | * restore after device starts |
| 3470 | */ |
| 3471 | igbvf_set_vfta_all(dev,0); |
| 3472 | |
| 3473 | igb_dev_clear_queues(dev); |
| 3474 | |
| 3475 | /* disable intr eventfd mapping */ |
| 3476 | rte_intr_disable(intr_handle); |
| 3477 | |
| 3478 | /* Clean datapath event and queue/vec mapping */ |
| 3479 | rte_intr_efd_disable(intr_handle); |
| 3480 | |
| 3481 | /* Clean vector list */ |
| 3482 | rte_intr_vec_list_free(intr_handle); |
| 3483 | |
| 3484 | adapter->stopped = true; |
| 3485 | dev->data->dev_started = 0; |
| 3486 | |
| 3487 | return 0; |
| 3488 | } |
| 3489 | |
| 3490 | static int |
| 3491 | igbvf_dev_close(struct rte_eth_dev *dev) |
no test coverage detected