Re: [Qemu-devel] [PATCH] net/hub: remove can_receive handler

2013-10-30 Thread Stefan Hajnoczi
On Wed, Oct 30, 2013 at 02:29:00PM +0400, Fedorov Sergey wrote: > On 10/29/2013 06:55 PM, Stefan Hajnoczi wrote: > >On Mon, Oct 21, 2013 at 03:44:46PM +0400, Fedorov Sergey wrote: > >>After our discussion about this patch I decided to keep my patch in > >>our branch until rebase onto a new release.

Re: [Qemu-devel] [PATCH] net/hub: remove can_receive handler

2013-10-30 Thread Fedorov Sergey
On 10/29/2013 06:55 PM, Stefan Hajnoczi wrote: On Mon, Oct 21, 2013 at 03:44:46PM +0400, Fedorov Sergey wrote: After our discussion about this patch I decided to keep my patch in our branch until rebase onto a new release. Recently I have rebased our branch onto v1.5.3 and reverted my patch. The

Re: [Qemu-devel] [PATCH] net/hub: remove can_receive handler

2013-10-29 Thread Stefan Hajnoczi
On Mon, Oct 21, 2013 at 03:44:46PM +0400, Fedorov Sergey wrote: > After our discussion about this patch I decided to keep my patch in > our branch until rebase onto a new release. Recently I have rebased > our branch onto v1.5.3 and reverted my patch. Then I face an issue > when using user-mode net

Re: [Qemu-devel] [PATCH] net/hub: remove can_receive handler

2013-10-28 Thread Fedorov Sergey
On 10/21/2013 03:52 PM, Fedorov Sergey wrote: On 10/21/2013 03:44 PM, Fedorov Sergey wrote: On 04/23/2013 04:00 PM, Stefan Hajnoczi wrote: On Tue, Apr 23, 2013 at 11:41:42AM +0400, Fedorov Sergey wrote: Beyond that, we also want to avoid growing net queues indefinitely. If the hub does not

Re: [Qemu-devel] [PATCH] net/hub: remove can_receive handler

2013-10-21 Thread Fedorov Sergey
On 10/21/2013 03:44 PM, Fedorov Sergey wrote: On 04/23/2013 04:00 PM, Stefan Hajnoczi wrote: On Tue, Apr 23, 2013 at 11:41:42AM +0400, Fedorov Sergey wrote: Beyond that, we also want to avoid growing net queues indefinitely. If the hub does not implement .can_receive() then it relies on grow

Re: [Qemu-devel] [PATCH] net/hub: remove can_receive handler

2013-10-21 Thread Fedorov Sergey
On 04/23/2013 04:00 PM, Stefan Hajnoczi wrote: On Tue, Apr 23, 2013 at 11:41:42AM +0400, Fedorov Sergey wrote: Beyond that, we also want to avoid growing net queues indefinitely. If the hub does not implement .can_receive() then it relies on growing queues (keeping packets buffered in memory).

Re: [Qemu-devel] [PATCH] net/hub: remove can_receive handler

2013-04-23 Thread Fedorov Sergey
On 04/23/2013 04:00 PM, Stefan Hajnoczi wrote: On Tue, Apr 23, 2013 at 11:41:42AM +0400, Fedorov Sergey wrote: Beyond that, we also want to avoid growing net queues indefinitely. If the hub does not implement .can_receive() then it relies on growing queues (keeping packets buffered in memory).

Re: [Qemu-devel] [PATCH] net/hub: remove can_receive handler

2013-04-23 Thread Stefan Hajnoczi
On Tue, Apr 23, 2013 at 11:41:42AM +0400, Fedorov Sergey wrote: > >Beyond that, we also want to avoid growing net queues indefinitely. If > >the hub does not implement .can_receive() then it relies on growing > >queues (keeping packets buffered in memory). > No, net_hub_receive() calls qemu_send_p

Re: [Qemu-devel] [PATCH] net/hub: remove can_receive handler

2013-04-23 Thread Fedorov Sergey
On 04/23/2013 03:48 PM, Stefan Hajnoczi wrote: On Tue, Apr 23, 2013 at 01:32:11PM +0400, Fedorov Sergey wrote: On 04/23/2013 10:58 AM, Stefan Hajnoczi wrote: On Mon, Apr 22, 2013 at 07:27:21PM +0400, Fedorov Sergey wrote: On 04/22/2013 06:57 PM, Stefan Hajnoczi wrote: On Mon, Apr 22, 2013 at

Re: [Qemu-devel] [PATCH] net/hub: remove can_receive handler

2013-04-23 Thread Stefan Hajnoczi
On Tue, Apr 23, 2013 at 01:32:11PM +0400, Fedorov Sergey wrote: > > On 04/23/2013 10:58 AM, Stefan Hajnoczi wrote: > >On Mon, Apr 22, 2013 at 07:27:21PM +0400, Fedorov Sergey wrote: > >>On 04/22/2013 06:57 PM, Stefan Hajnoczi wrote: > >>>On Mon, Apr 22, 2013 at 04:26:16PM +0400, Fedorov Sergey wro

Re: [Qemu-devel] [PATCH] net/hub: remove can_receive handler

2013-04-23 Thread Fedorov Sergey
On 04/23/2013 10:58 AM, Stefan Hajnoczi wrote: On Mon, Apr 22, 2013 at 07:27:21PM +0400, Fedorov Sergey wrote: On 04/22/2013 06:57 PM, Stefan Hajnoczi wrote: On Mon, Apr 22, 2013 at 04:26:16PM +0400, Fedorov Sergey wrote: On 04/22/2013 03:47 PM, Stefan Hajnoczi wrote: On Thu, Apr 18, 2013 at

Re: [Qemu-devel] [PATCH] net/hub: remove can_receive handler

2013-04-23 Thread Fedorov Sergey
On 04/23/2013 10:58 AM, Stefan Hajnoczi wrote: On Mon, Apr 22, 2013 at 07:27:21PM +0400, Fedorov Sergey wrote: On 04/22/2013 06:57 PM, Stefan Hajnoczi wrote: On Mon, Apr 22, 2013 at 04:26:16PM +0400, Fedorov Sergey wrote: On 04/22/2013 03:47 PM, Stefan Hajnoczi wrote: On Thu, Apr 18, 2013 at

Re: [Qemu-devel] [PATCH] net/hub: remove can_receive handler

2013-04-23 Thread Fedorov Sergey
On 04/22/2013 08:09 PM, Paolo Bonzini wrote: Il 22/04/2013 17:27, Fedorov Sergey ha scritto: E.g. network hub has 3 ports. Suppose when iterating through port list in net_hub_port_can_receive() a packet is successfully delivered to the first port, and then is queued in the source port queue beca

Re: [Qemu-devel] [PATCH] net/hub: remove can_receive handler

2013-04-22 Thread Stefan Hajnoczi
On Mon, Apr 22, 2013 at 07:27:21PM +0400, Fedorov Sergey wrote: > On 04/22/2013 06:57 PM, Stefan Hajnoczi wrote: > >On Mon, Apr 22, 2013 at 04:26:16PM +0400, Fedorov Sergey wrote: > >>On 04/22/2013 03:47 PM, Stefan Hajnoczi wrote: > >>>On Thu, Apr 18, 2013 at 03:31:55PM +0400, Sergey Fedorov wrote:

Re: [Qemu-devel] [PATCH] net/hub: remove can_receive handler

2013-04-22 Thread Paolo Bonzini
Il 22/04/2013 17:27, Fedorov Sergey ha scritto: > > E.g. network hub has 3 ports. Suppose when iterating through port list > in net_hub_port_can_receive() a packet is successfully delivered to the > first port, and then is queued in the source port queue because the > second port cannot receive pa

Re: [Qemu-devel] [PATCH] net/hub: remove can_receive handler

2013-04-22 Thread Fedorov Sergey
On 04/22/2013 06:57 PM, Stefan Hajnoczi wrote: On Mon, Apr 22, 2013 at 04:26:16PM +0400, Fedorov Sergey wrote: On 04/22/2013 03:47 PM, Stefan Hajnoczi wrote: On Thu, Apr 18, 2013 at 03:31:55PM +0400, Sergey Fedorov wrote: Network hub should always receive incoming packets. Then forward them to

Re: [Qemu-devel] [PATCH] net/hub: remove can_receive handler

2013-04-22 Thread Stefan Hajnoczi
On Mon, Apr 22, 2013 at 04:26:16PM +0400, Fedorov Sergey wrote: > On 04/22/2013 03:47 PM, Stefan Hajnoczi wrote: > >On Thu, Apr 18, 2013 at 03:31:55PM +0400, Sergey Fedorov wrote: > >>Network hub should always receive incoming packets. Then forward them to > >>the appropriate port queue and let the

Re: [Qemu-devel] [PATCH] net/hub: remove can_receive handler

2013-04-22 Thread Fedorov Sergey
On 04/22/2013 03:47 PM, Stefan Hajnoczi wrote: On Thu, Apr 18, 2013 at 03:31:55PM +0400, Sergey Fedorov wrote: Network hub should always receive incoming packets. Then forward them to the appropriate port queue and let the qemu_send_packet() do the right things. If the destination queue cannot r

Re: [Qemu-devel] [PATCH] net/hub: remove can_receive handler

2013-04-22 Thread Stefan Hajnoczi
On Thu, Apr 18, 2013 at 03:31:55PM +0400, Sergey Fedorov wrote: > Network hub should always receive incoming packets. Then forward them to > the appropriate port queue and let the qemu_send_packet() do the right > things. If the destination queue cannot receive the packet it will be > appended to t

[Qemu-devel] [PATCH] net/hub: remove can_receive handler

2013-04-18 Thread Sergey Fedorov
Network hub should always receive incoming packets. Then forward them to the appropriate port queue and let the qemu_send_packet() do the right things. If the destination queue cannot receive the packet it will be appended to the queue. When the receiver call qemu_flush_queued_packets() later the q