Thread (65 messages) 65 messages, 5 authors, 2018-04-10
STALE2991d
Revisions (2)
  1. v2 current
  2. v3 [diff vs current]

[PATCH v2 2/5] net/virtio: add checking for cvq

From: <hidden>
Date: 2018-03-15 09:45:22
Subsystem: networking drivers, the rest · Maintainers: Andrew Lunn, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

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 <redacted>
---
 drivers/net/virtio/virtio_ethdev.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index b38582c8d..74943a5a9 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -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);
 	}
 }
 
-- 
2.14.3
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help