summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiayu Hu <jiayu.hu@intel.com>2017-07-31 15:56:44 +0800
committerYuanhan Liu <yliu@fridaylinux.org>2017-08-29 14:55:29 +0800
commit7395b289e22126bac4b696e8303f1f03a63a9d30 (patch)
tree01cbc4fa7b9d57947857016d5e4ddcfbd4ef2c08
parent16991ff94e0b4a013c6545864e7117961a711e8e (diff)
downloaddpdk-stable-7395b289e22126bac4b696e8303f1f03a63a9d30.zip
dpdk-stable-7395b289e22126bac4b696e8303f1f03a63a9d30.tar.gz
dpdk-stable-7395b289e22126bac4b696e8303f1f03a63a9d30.tar.xz
net/virtio: fix Rx interrupt setup
[ backported from upstream commit e7b9d1d2806c6bb8f30922c3cd6736b3076b7ec2 ] When use rte_eth_dev_configure() to enable rx queue interrupt for virtio devices, virtio_init_device() isn't called to set up the interrupt environment, which causes rx queue interrupt setup failed. This patch is to fix this issue. Fixes: 26b683b4f7d0 ("net/virtio: setup Rx queue interrupts") Signed-off-by: Jiayu Hu <jiayu.hu@intel.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
-rw-r--r--drivers/net/virtio/virtio_ethdev.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index 88118f1..6c18a53 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -1678,6 +1678,12 @@ virtio_dev_configure(struct rte_eth_dev *dev)
return ret;
}
+ if (dev->data->dev_conf.intr_conf.rxq) {
+ ret = virtio_init_device(dev, hw->req_guest_features);
+ if (ret < 0)
+ return ret;
+ }
+
if (rxmode->hw_ip_checksum &&
!vtpci_with_feature(hw, VIRTIO_NET_F_GUEST_CSUM)) {
PMD_DRV_LOG(NOTICE,