| 354 | } |
| 355 | |
| 356 | int |
| 357 | rte_eth_dev_destroy(struct rte_eth_dev *ethdev, |
| 358 | ethdev_uninit_t ethdev_uninit) |
| 359 | { |
| 360 | int ret; |
| 361 | |
| 362 | ethdev = rte_eth_dev_allocated(ethdev->data->name); |
| 363 | if (!ethdev) |
| 364 | return -ENODEV; |
| 365 | |
| 366 | if (*ethdev_uninit == NULL) |
| 367 | return -EINVAL; |
| 368 | |
| 369 | ret = ethdev_uninit(ethdev); |
| 370 | if (ret) |
| 371 | return ret; |
| 372 | |
| 373 | return rte_eth_dev_release_port(ethdev); |
| 374 | } |
| 375 | |
| 376 | struct rte_eth_dev * |
| 377 | rte_eth_dev_get_by_name(const char *name) |
no test coverage detected