src/dpdk/drivers/net/virtio/virtio_ethdev.c
static int
virtio_queues_bind_intr(struct rte_eth_dev *dev)
{
	uint32_t i;
	struct virtio_hw *hw = dev->data->dev_private;

	PMD_INIT_LOG(INFO, "queue/interrupt binding");
	for (i = 0; i < dev->data->nb_rx_queues; ++i) {
		dev->intr_handle->intr_vec[i] = i + 1;
		if (VIRTIO_OPS(hw)->set_queue_irq(hw, hw->vqs[i * 2], i + 1) ==
						 VIRTIO_MSI_NO_VECTOR) {
			PMD_DRV_LOG(ERR, "failed to set queue vector");
			return -EBUSY;
		}
	}

	return 0;
}
/* 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).
 */
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).
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 ) .
static int
virtio_queues_bind_intr(struct rte_eth_dev *dev)
{
	uint32_t i;
	struct virtio_hw *hw = dev->data->dev_private;
	PMD_INIT_LOG(INFO, "queue/interrupt binding");
	for (i = 0; i < dev->data->nb_rx_queues; ++i) {
		dev->intr_handle->intr_vec[i] = i + 1;
		if (VIRTIO_OPS(hw)->set_queue_irq(hw, hw->vqs[i * 2], i + 1) ==
						 VIRTIO_MSI_NO_VECTOR) {
			PMD_DRV_LOG(ERR, "failed to set queue vector");
			return -EBUSY;
		}
	}
	return 0;
}
static int virtio_queues_bind_intr ( struct rte_eth_dev * dev ) { uint32_t i ; struct virtio_hw * hw = dev -> data -> dev_private ; PMD_INIT_LOG ( INFO , " " ) ; for ( i = 0 ; i < dev -> data -> nb_rx_queues ; ++ i ) { dev -> intr_handle -> intr_vec [ i ] = i + 1 ; if ( VIRTIO_OPS ( hw ) -> set_queue_irq ( hw , hw -> vqs [ i * 2 ] , i + 1 ) == VIRTIO_MSI_NO_VECTOR ) { PMD_DRV_LOG ( ERR , " " ) ; return - EBUSY ; } } return 0 ; }
Only support 1:1 queue/interrupt mapping so far.
Only support 1 : 1 queue / interrupt mapping so far .