From: Zhiyong Yang Date: Wed, 21 Mar 2018 03:03:41 +0000 (+0800) Subject: net/virtio: add check for cvq X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=ac860c86e3be03d1e933611c179dc1fc6dd981cc;p=dpdk.git 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 Reviewed-by: Jianfeng Tan Reviewed-by: Maxime Coquelin --- diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c index 4a1971cd59..2ef213d1a5 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); } }