[dpdk-stable] [PATCH] net/virtio: fix fail to configure rxq interrupt

Yuanhan Liu yliu at fridaylinux.org
Wed Jul 19 13:08:45 CEST 2017


On Wed, Jul 19, 2017 at 11:18:23AM +0800, Jiayu Hu wrote:
> When use rte_eth_dev_configure() to enable rx queue interrupt for virtio
> devices, virtio_configure_intr() isn't called to set up the interrupt
> environment, which causes rx queue interrupt setup failed. This patch is
> to fix this issue.

Hmm, how was this supposed to work in the begining when this feature
was introduced? Jianfeng?

	--yliu


> 
> Fixes: 26b683b4f7d0 ("net/virtio: setup Rx queue interrupts")
> Cc: stable at dpdk.org
> 
> Signed-off-by: Jiayu Hu <jiayu.hu at intel.com>
> ---
>  drivers/net/virtio/virtio_ethdev.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
> index 00a3122..66656ed 100644
> --- a/drivers/net/virtio/virtio_ethdev.c
> +++ b/drivers/net/virtio/virtio_ethdev.c
> @@ -1688,6 +1688,13 @@ virtio_dev_configure(struct rte_eth_dev *dev)
>  		return -ENOTSUP;
>  	}
>  
> +	if (dev->data->dev_conf.intr_conf.rxq) {
> +		if (virtio_configure_intr(dev) < 0) {
> +			PMD_DRV_LOG(ERR, "failed to configure interrupt");
> +			return -ENOTSUP;
> +		}
> +	}
> +
>  	if (dev->data->dev_flags & RTE_ETH_DEV_INTR_LSC)
>  		/* Enable vector (0) for Link State Intrerrupt */
>  		if (VTPCI_OPS(hw)->set_config_irq(hw, 0) ==
> -- 
> 2.7.4


More information about the stable mailing list