[dpdk-dev,v2,2/5] net/virtio: add checking for cvq
Checks
Commit Message
Add checking for cvq to judge if virtio_ack_link_announce is called.
The original code doesn't cause issue, and add the checking just to look
more reasonable.
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
---
drivers/net/virtio/virtio_ethdev.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
@@ -1338,7 +1338,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);
}
}