qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] virtio-net: Drop net_virtio_info.can_receive
@ 2015-06-30  3:06 Fam Zheng
  2015-06-30  8:35 ` Jason Wang
  0 siblings, 1 reply; 15+ messages in thread
From: Fam Zheng @ 2015-06-30  3:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: jasowang, Stefan Hajnoczi, Michael S. Tsirkin

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 <famz@redhat.com>
---
 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

^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2015-07-13  4:52 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-30  3:06 [Qemu-devel] [PATCH] virtio-net: Drop net_virtio_info.can_receive Fam Zheng
2015-06-30  8:35 ` Jason Wang
2015-07-02 12:46   ` Stefan Hajnoczi
2015-07-02 16:46     ` Michael S. Tsirkin
2015-07-03  1:12       ` Fam Zheng
2015-07-03  4:17         ` Fam Zheng
2015-07-04 18:48           ` Michael S. Tsirkin
2015-07-06  3:32     ` Jason Wang
2015-07-06 15:21       ` Stefan Hajnoczi
2015-07-06 17:09         ` Michael S. Tsirkin
2015-07-07  0:53           ` Fam Zheng
2015-07-07  8:10             ` Michael S. Tsirkin
2015-07-07  8:45         ` Jason Wang
2015-07-08 10:50           ` Stefan Hajnoczi
2015-07-13  4:52             ` Jason Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).