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

Function virtio_queues_bind_intr

dpdk/drivers/net/virtio/virtio_ethdev.c:1320–1339  ·  view source on GitHub ↗

Only support 1:1 queue/interrupt mapping so far. * TODO: support n:1 queue/interrupt mapping when there are limited number of * interrupt vectors (<N+1). */

Source from the content-addressed store, hash-verified

1318 * interrupt vectors (<N+1).
1319 */
1320static int
1321virtio_queues_bind_intr(struct rte_eth_dev *dev)
1322{
1323 uint32_t i;
1324 struct virtio_hw *hw = dev->data->dev_private;
1325
1326 PMD_INIT_LOG(INFO, "queue/interrupt binding");
1327 for (i = 0; i < dev->data->nb_rx_queues; ++i) {
1328 if (rte_intr_vec_list_index_set(dev->intr_handle, i,
1329 i + 1))
1330 return -rte_errno;
1331 if (VIRTIO_OPS(hw)->set_queue_irq(hw, hw->vqs[i * 2], i + 1) ==
1332 VIRTIO_MSI_NO_VECTOR) {
1333 PMD_DRV_LOG(ERR, "failed to set queue vector");
1334 return -EBUSY;
1335 }
1336 }
1337
1338 return 0;
1339}
1340
1341static void
1342virtio_queues_unbind_intr(struct rte_eth_dev *dev)

Callers 1

virtio_configure_intrFunction · 0.85

Calls 1

Tested by

no test coverage detected