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

Function mvneta_dev_close

dpdk/drivers/net/mvneta/mvneta_ethdev.c:444–475  ·  view source on GitHub ↗

* DPDK callback to close the device. * * @param dev * Pointer to Ethernet device structure. */

Source from the content-addressed store, hash-verified

442 * Pointer to Ethernet device structure.
443 */
444static int
445mvneta_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.

Callers

nothing calls this directly

Calls 6

rte_eal_process_typeFunction · 0.85
mvneta_dev_stopFunction · 0.85
mvneta_rx_queue_releaseFunction · 0.85
mvneta_tx_queue_releaseFunction · 0.85
mvneta_neta_deinitFunction · 0.85
rte_mvep_deinitFunction · 0.85

Tested by

no test coverage detected