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

Function pfe_eth_close

dpdk/drivers/net/pfe/pfe_ethdev.c:387–417  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

385}
386
387static int
388pfe_eth_close(struct rte_eth_dev *dev)
389{
390 int ret;
391 PMD_INIT_FUNC_TRACE();
392
393 if (!dev)
394 return -1;
395
396 if (!g_pfe)
397 return -1;
398
399 if (rte_eal_process_type() != RTE_PROC_PRIMARY)
400 return 0;
401
402 ret = pfe_eth_stop(dev);
403 /* Close the device file for link status */
404 pfe_eth_close_cdev(dev->data->dev_private);
405
406 munmap(g_pfe->cbus_baseaddr, g_pfe->cbus_size);
407 g_pfe->nb_devs--;
408
409 if (g_pfe->nb_devs == 0) {
410 pfe_hif_exit(g_pfe);
411 pfe_hif_lib_exit(g_pfe);
412 rte_free(g_pfe);
413 g_pfe = NULL;
414 }
415
416 return ret;
417}
418
419static int
420pfe_eth_configure(struct rte_eth_dev *dev __rte_unused)

Callers 1

pmd_pfe_removeFunction · 0.85

Calls 6

rte_eal_process_typeFunction · 0.85
pfe_eth_stopFunction · 0.85
pfe_eth_close_cdevFunction · 0.85
pfe_hif_exitFunction · 0.85
pfe_hif_lib_exitFunction · 0.85
rte_freeFunction · 0.85

Tested by

no test coverage detected