* DPDK callback to close the device. * * @param dev * Pointer to Ethernet device structure. */
| 442 | * Pointer to Ethernet device structure. |
| 443 | */ |
| 444 | static int |
| 445 | mvneta_dev_close(struct rte_eth_dev *dev) |
| 446 | { |
| 447 | struct mvneta_priv *priv = dev->data->dev_private; |
| 448 | int i, ret = 0; |
| 449 | |
| 450 | if (rte_eal_process_type() != RTE_PROC_PRIMARY) |
| 451 | return 0; |
| 452 | |
| 453 | if (priv->ppio) |
| 454 | ret = mvneta_dev_stop(dev); |
| 455 | |
| 456 | for (i = 0; i < dev->data->nb_rx_queues; i++) { |
| 457 | mvneta_rx_queue_release(dev, i); |
| 458 | dev->data->rx_queues[i] = NULL; |
| 459 | } |
| 460 | |
| 461 | for (i = 0; i < dev->data->nb_tx_queues; i++) { |
| 462 | mvneta_tx_queue_release(dev, i); |
| 463 | dev->data->tx_queues[i] = NULL; |
| 464 | } |
| 465 | |
| 466 | mvneta_dev_num--; |
| 467 | |
| 468 | if (mvneta_dev_num == 0) { |
| 469 | MVNETA_LOG(INFO, "Perform MUSDK deinit"); |
| 470 | mvneta_neta_deinit(); |
| 471 | rte_mvep_deinit(MVEP_MOD_T_NETA); |
| 472 | } |
| 473 | |
| 474 | return ret; |
| 475 | } |
| 476 | |
| 477 | /** |
| 478 | * DPDK callback to retrieve physical link information. |
nothing calls this directly
no test coverage detected