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

Function dpaa2_cmdif_destroy

dpdk/drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c:230–251  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

228}
229
230static int
231dpaa2_cmdif_destroy(const char *name)
232{
233 int ret;
234 struct rte_rawdev *rdev;
235
236 rdev = rte_rawdev_pmd_get_named_dev(name);
237 if (!rdev) {
238 DPAA2_CMDIF_ERR("Invalid device name (%s)", name);
239 return -EINVAL;
240 }
241
242 /* The primary process will only free the DPCI device */
243 if (rte_eal_process_type() == RTE_PROC_PRIMARY)
244 rte_dpaa2_free_dpci_dev(rdev->dev_private);
245
246 ret = rte_rawdev_pmd_release(rdev);
247 if (ret)
248 DPAA2_CMDIF_DEBUG("Device cleanup failed");
249
250 return 0;
251}
252
253static int
254dpaa2_cmdif_probe(struct rte_vdev_device *vdev)

Callers 1

dpaa2_cmdif_removeFunction · 0.85

Calls 4

rte_eal_process_typeFunction · 0.85
rte_dpaa2_free_dpci_devFunction · 0.85
rte_rawdev_pmd_releaseFunction · 0.85

Tested by

no test coverage detected