| 379 | } |
| 380 | |
| 381 | static void |
| 382 | fs_rx_queue_release(struct rte_eth_dev *dev, uint16_t qid) |
| 383 | { |
| 384 | struct sub_device *sdev; |
| 385 | uint8_t i; |
| 386 | struct rxq *rxq = dev->data->rx_queues[qid]; |
| 387 | |
| 388 | if (rxq == NULL) |
| 389 | return; |
| 390 | if (fs_lock(dev, 0) != 0) |
| 391 | return; |
| 392 | if (rxq->event_fd >= 0) |
| 393 | close(rxq->event_fd); |
| 394 | FOREACH_SUBDEV_STATE(sdev, i, dev, DEV_ACTIVE) { |
| 395 | if (ETH(sdev)->data->rx_queues != NULL && |
| 396 | ETH(sdev)->data->rx_queues[rxq->qid] != NULL) |
| 397 | SUBOPS(sdev, rx_queue_release)(ETH(sdev), rxq->qid); |
| 398 | } |
| 399 | dev->data->rx_queues[rxq->qid] = NULL; |
| 400 | rte_free(rxq); |
| 401 | fs_unlock(dev, 0); |
| 402 | } |
| 403 | |
| 404 | static int |
| 405 | fs_rx_queue_setup(struct rte_eth_dev *dev, |
no test coverage detected