qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] virtio-net: Drop net_virtio_info.can_receive


From: Fam Zheng
Subject: [Qemu-devel] [PATCH] virtio-net: Drop net_virtio_info.can_receive
Date: Tue, 30 Jun 2015 11:06:51 +0800

virtio_net_receive still does the check by calling
virtio_net_can_receive, if the device or driver is not ready, the packet
is dropped.

This is necessary because returning false from can_receive complicates
things: the peer would disable sending until we explicitly flush the
queue.

Signed-off-by: Fam Zheng <address@hidden>
---
 hw/net/virtio-net.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
index d728233..dbef0d0 100644
--- a/hw/net/virtio-net.c
+++ b/hw/net/virtio-net.c
@@ -1503,7 +1503,6 @@ static int virtio_net_load_device(VirtIODevice *vdev, 
QEMUFile *f,
 static NetClientInfo net_virtio_info = {
     .type = NET_CLIENT_OPTIONS_KIND_NIC,
     .size = sizeof(NICState),
-    .can_receive = virtio_net_can_receive,
     .receive = virtio_net_receive,
     .link_status_changed = virtio_net_set_link_status,
     .query_rx_filter = virtio_net_query_rxfilter,
-- 
2.4.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]