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

Function bond_ethdev_close

dpdk/drivers/net/bonding/rte_eth_bond_pmd.c:2253–2278  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2251}
2252
2253int
2254bond_ethdev_close(struct rte_eth_dev *dev)
2255{
2256 struct bond_dev_private *internals = dev->data->dev_private;
2257
2258 if (rte_eal_process_type() != RTE_PROC_PRIMARY)
2259 return 0;
2260
2261 RTE_BOND_LOG(INFO, "Closing bonding device %s", dev->device->name);
2262
2263 bond_ethdev_cfg_cleanup(dev, true);
2264
2265 bond_ethdev_free_queues(dev);
2266 rte_bitmap_reset(internals->vlan_filter_bmp);
2267 rte_bitmap_free(internals->vlan_filter_bmp);
2268 rte_free(internals->vlan_filter_bmpmem);
2269
2270 /* Try to release mempool used in mode6. If the bond
2271 * device is not mode6, free the NULL is not problem.
2272 */
2273 rte_mempool_free(internals->mode6.mempool);
2274
2275 rte_kvargs_free(internals->kvlist);
2276
2277 return 0;
2278}
2279
2280/* forward declaration */
2281static int bond_ethdev_configure(struct rte_eth_dev *dev);

Callers 1

bond_removeFunction · 0.85

Calls 8

rte_eal_process_typeFunction · 0.85
bond_ethdev_cfg_cleanupFunction · 0.85
bond_ethdev_free_queuesFunction · 0.85
rte_bitmap_resetFunction · 0.85
rte_bitmap_freeFunction · 0.85
rte_freeFunction · 0.85
rte_mempool_freeFunction · 0.85
rte_kvargs_freeFunction · 0.85

Tested by

no test coverage detected