From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45399) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z9lss-0007Od-Hi for qemu-devel@nongnu.org; Mon, 29 Jun 2015 23:06:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z9lso-0003la-EA for qemu-devel@nongnu.org; Mon, 29 Jun 2015 23:06:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52133) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z9lso-0003lW-8c for qemu-devel@nongnu.org; Mon, 29 Jun 2015 23:06:50 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id 70E7F359D4E for ; Tue, 30 Jun 2015 03:06:49 +0000 (UTC) From: Fam Zheng Date: Tue, 30 Jun 2015 11:06:51 +0800 Message-Id: <1435633611-14023-1-git-send-email-famz@redhat.com> Subject: [Qemu-devel] [PATCH] virtio-net: Drop net_virtio_info.can_receive List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: jasowang@redhat.com, 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 --- 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