| 384 | } |
| 385 | |
| 386 | void |
| 387 | failsafe_dev_remove(struct rte_eth_dev *dev) |
| 388 | { |
| 389 | struct sub_device *sdev; |
| 390 | uint8_t i; |
| 391 | |
| 392 | FOREACH_SUBDEV(sdev, i, dev) { |
| 393 | if (!sdev->remove) |
| 394 | continue; |
| 395 | |
| 396 | /* Active devices must have finished their burst and |
| 397 | * their stats must be saved. |
| 398 | */ |
| 399 | if (sdev->state >= DEV_ACTIVE && |
| 400 | fs_rxtx_clean(sdev) == 0) |
| 401 | continue; |
| 402 | if (fs_lock(dev, 1) != 0) |
| 403 | return; |
| 404 | if (sdev->state >= DEV_ACTIVE) |
| 405 | fs_dev_stats_save(sdev); |
| 406 | fs_dev_remove(sdev); |
| 407 | fs_unlock(dev, 1); |
| 408 | } |
| 409 | } |
| 410 | |
| 411 | static int |
| 412 | failsafe_eth_dev_rx_queues_sync(struct rte_eth_dev *dev) |
no test coverage detected