summaryrefslogtreecommitdiff
path: root/drivers/net/virtio/virtio_ethdev.c
diff options
context:
space:
mode:
authorZhiyong Yang <zhiyong.yang@intel.com>2018-03-21 11:03:41 +0800
committerFerruh Yigit <ferruh.yigit@intel.com>2018-03-30 14:08:44 +0200
commitac860c86e3be03d1e933611c179dc1fc6dd981cc (patch)
treec9a81b0b1fa6e77aedbf516c096700a9c850ef3a /drivers/net/virtio/virtio_ethdev.c
parent7c7f2e6088aeb24d9ffbf41d1076512ca8da8a85 (diff)
downloaddpdk-next-eventdev-ac860c86e3be03d1e933611c179dc1fc6dd981cc.zip
dpdk-next-eventdev-ac860c86e3be03d1e933611c179dc1fc6dd981cc.tar.gz
dpdk-next-eventdev-ac860c86e3be03d1e933611c179dc1fc6dd981cc.tar.xz
net/virtio: add check for cvq
Add checking for cvq to judge if virtio_ack_link_announce should be called. The existing code doesn't cause issue, and add the checking just to look more reasonable. Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com> Reviewed-by: Jianfeng Tan <jianfeng.tan@intel.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Diffstat (limited to 'drivers/net/virtio/virtio_ethdev.c')
-rw-r--r--drivers/net/virtio/virtio_ethdev.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index 4a1971c..2ef213d 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -1296,7 +1296,8 @@ virtio_interrupt_handler(void *param)
if (isr & VIRTIO_NET_S_ANNOUNCE) {
virtio_notify_peers(dev);
- virtio_ack_link_announce(dev);
+ if (hw->cvq)
+ virtio_ack_link_announce(dev);
}
}