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

Function ionic_dev_close

dpdk/drivers/net/ionic/ionic_ethdev.c:961–991  ·  view source on GitHub ↗

* Reset and stop device. */

Source from the content-addressed store, hash-verified

959 * Reset and stop device.
960 */
961static int
962ionic_dev_close(struct rte_eth_dev *eth_dev)
963{
964 struct ionic_lif *lif = IONIC_ETH_DEV_TO_LIF(eth_dev);
965 struct ionic_adapter *adapter = lif->adapter;
966
967 IONIC_PRINT_CALL();
968 if (rte_eal_process_type() != RTE_PROC_PRIMARY)
969 return 0;
970
971 ionic_lif_stop(lif);
972
973 IONIC_PRINT(NOTICE, "Removing device %s", eth_dev->device->name);
974 if (adapter->intf->unconfigure_intr)
975 (*adapter->intf->unconfigure_intr)(adapter);
976
977 ionic_port_reset(adapter);
978 ionic_reset(adapter);
979
980 ionic_lif_free_queues(lif);
981 ionic_lif_deinit(lif);
982 ionic_lif_free(lif); /* Does not free LIF object */
983
984 if (adapter->intf->unmap_bars)
985 (*adapter->intf->unmap_bars)(adapter);
986
987 lif->adapter = NULL;
988 rte_free(adapter);
989
990 return 0;
991}
992
993int
994eth_ionic_dev_init(struct rte_eth_dev *eth_dev, void *init_params)

Callers 1

eth_ionic_dev_uninitFunction · 0.85

Calls 8

rte_eal_process_typeFunction · 0.85
ionic_lif_stopFunction · 0.85
ionic_port_resetFunction · 0.85
ionic_resetFunction · 0.85
ionic_lif_free_queuesFunction · 0.85
ionic_lif_deinitFunction · 0.85
ionic_lif_freeFunction · 0.85
rte_freeFunction · 0.85

Tested by

no test coverage detected