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

2015-07-12 Thread Jason Wang
On 07/08/2015 06:50 PM, Stefan Hajnoczi wrote: > On Tue, Jul 07, 2015 at 04:45:41PM +0800, Jason Wang wrote: >> >> On 07/06/2015 11:21 PM, Stefan Hajnoczi wrote: >>> On Mon, Jul 06, 2015 at 11:32:25AM +0800, Jason Wang wrote: On 07/02/2015 08:46 PM, Stefan Hajnoczi wrote: > On Tue, Jun 3

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

2015-07-08 Thread Stefan Hajnoczi
On Tue, Jul 07, 2015 at 04:45:41PM +0800, Jason Wang wrote: > > > On 07/06/2015 11:21 PM, Stefan Hajnoczi wrote: > > On Mon, Jul 06, 2015 at 11:32:25AM +0800, Jason Wang wrote: > >> > >> On 07/02/2015 08:46 PM, Stefan Hajnoczi wrote: > >>> On Tue, Jun 30, 2015 at 04:35:24PM +0800, Jason Wang wrot

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

2015-07-07 Thread Jason Wang
On 07/06/2015 11:21 PM, Stefan Hajnoczi wrote: > On Mon, Jul 06, 2015 at 11:32:25AM +0800, Jason Wang wrote: >> >> On 07/02/2015 08:46 PM, Stefan Hajnoczi wrote: >>> On Tue, Jun 30, 2015 at 04:35:24PM +0800, Jason Wang wrote: On 06/30/2015 11:06 AM, Fam Zheng wrote: > virtio_net_receive

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

2015-07-07 Thread Michael S. Tsirkin
On Tue, Jul 07, 2015 at 08:53:59AM +0800, Fam Zheng wrote: > On Mon, 07/06 20:09, Michael S. Tsirkin wrote: > > On Mon, Jul 06, 2015 at 04:21:16PM +0100, Stefan Hajnoczi wrote: > > > On Mon, Jul 06, 2015 at 11:32:25AM +0800, Jason Wang wrote: > > > > > > > > > > > > On 07/02/2015 08:46 PM, Stefan

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

2015-07-06 Thread Fam Zheng
On Mon, 07/06 20:09, Michael S. Tsirkin wrote: > On Mon, Jul 06, 2015 at 04:21:16PM +0100, Stefan Hajnoczi wrote: > > On Mon, Jul 06, 2015 at 11:32:25AM +0800, Jason Wang wrote: > > > > > > > > > On 07/02/2015 08:46 PM, Stefan Hajnoczi wrote: > > > > On Tue, Jun 30, 2015 at 04:35:24PM +0800, Jaso

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

2015-07-06 Thread Michael S. Tsirkin
On Mon, Jul 06, 2015 at 04:21:16PM +0100, Stefan Hajnoczi wrote: > On Mon, Jul 06, 2015 at 11:32:25AM +0800, Jason Wang wrote: > > > > > > On 07/02/2015 08:46 PM, Stefan Hajnoczi wrote: > > > On Tue, Jun 30, 2015 at 04:35:24PM +0800, Jason Wang wrote: > > >> On 06/30/2015 11:06 AM, Fam Zheng wrot

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

2015-07-06 Thread Stefan Hajnoczi
On Mon, Jul 06, 2015 at 11:32:25AM +0800, Jason Wang wrote: > > > On 07/02/2015 08:46 PM, Stefan Hajnoczi wrote: > > On Tue, Jun 30, 2015 at 04:35:24PM +0800, Jason Wang wrote: > >> On 06/30/2015 11:06 AM, Fam Zheng wrote: > >>> virtio_net_receive still does the check by calling > >>> virtio_net_

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

2015-07-05 Thread Jason Wang
On 07/02/2015 08:46 PM, Stefan Hajnoczi wrote: > On Tue, Jun 30, 2015 at 04:35:24PM +0800, Jason Wang wrote: >> On 06/30/2015 11:06 AM, Fam Zheng wrote: >>> virtio_net_receive still does the check by calling >>> virtio_net_can_receive, if the device or driver is not ready, the packet >>> is dropp

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

2015-07-04 Thread Michael S. Tsirkin
On Fri, Jul 03, 2015 at 12:17:38PM +0800, Fam Zheng wrote: > On Fri, 07/03 09:12, Fam Zheng wrote: > > On Thu, 07/02 18:46, Michael S. Tsirkin wrote: > > > On Thu, Jul 02, 2015 at 01:46:26PM +0100, Stefan Hajnoczi wrote: > > > > On Tue, Jun 30, 2015 at 04:35:24PM +0800, Jason Wang wrote: > > > > >

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

2015-07-02 Thread Fam Zheng
On Fri, 07/03 09:12, Fam Zheng wrote: > On Thu, 07/02 18:46, Michael S. Tsirkin wrote: > > On Thu, Jul 02, 2015 at 01:46:26PM +0100, Stefan Hajnoczi wrote: > > > On Tue, Jun 30, 2015 at 04:35:24PM +0800, Jason Wang wrote: > > > > On 06/30/2015 11:06 AM, Fam Zheng wrote: > > > > > virtio_net_receive

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

2015-07-02 Thread Fam Zheng
On Thu, 07/02 18:46, Michael S. Tsirkin wrote: > On Thu, Jul 02, 2015 at 01:46:26PM +0100, Stefan Hajnoczi wrote: > > On Tue, Jun 30, 2015 at 04:35:24PM +0800, Jason Wang wrote: > > > On 06/30/2015 11:06 AM, Fam Zheng wrote: > > > > virtio_net_receive still does the check by calling > > > > virtio_

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

2015-07-02 Thread Michael S. Tsirkin
On Thu, Jul 02, 2015 at 01:46:26PM +0100, Stefan Hajnoczi wrote: > On Tue, Jun 30, 2015 at 04:35:24PM +0800, Jason Wang wrote: > > On 06/30/2015 11:06 AM, Fam Zheng wrote: > > > virtio_net_receive still does the check by calling > > > virtio_net_can_receive, if the device or driver is not ready, th

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

2015-07-02 Thread Stefan Hajnoczi
On Tue, Jun 30, 2015 at 04:35:24PM +0800, Jason Wang wrote: > On 06/30/2015 11:06 AM, Fam Zheng wrote: > > 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 fals

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

2015-06-30 Thread Jason Wang
On 06/30/2015 11:06 AM, Fam Zheng wrote: > 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 sendin

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

2015-06-29 Thread Fam Zheng
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: