Re: [Qemu-devel] [PATCH for-2.4] net-hub: Drop can_receive

2015-07-03 Thread Stefan Hajnoczi
On Fri, Jul 03, 2015 at 08:42:15AM +0800, Fam Zheng wrote: > On Thu, 07/02 14:30, Stefan Hajnoczi wrote: > > On Tue, Jun 30, 2015 at 10:29:20AM +0800, Fam Zheng wrote: > > > It returns true as long as there is another attached port. This is not > > > strictly necessary because even if there is only

Re: [Qemu-devel] [PATCH for-2.4] net-hub: Drop can_receive

2015-07-02 Thread Fam Zheng
On Thu, 07/02 14:30, Stefan Hajnoczi wrote: > On Tue, Jun 30, 2015 at 10:29:20AM +0800, Fam Zheng wrote: > > It returns true as long as there is another attached port. This is not > > strictly necessary because even if there is only one port (the sender), > > net_hub_port_receive could succeed with

Re: [Qemu-devel] [PATCH for-2.4] net-hub: Drop can_receive

2015-07-02 Thread Stefan Hajnoczi
On Tue, Jun 30, 2015 at 10:29:20AM +0800, Fam Zheng wrote: > It returns true as long as there is another attached port. This is not > strictly necessary because even if there is only one port (the sender), > net_hub_port_receive could succeed with a NOP. So always deliver the > packets, instead of

Re: [Qemu-devel] [PATCH for-2.4] net-hub: Drop can_receive

2015-07-02 Thread Stefan Hajnoczi
On Tue, Jun 30, 2015 at 10:29:20AM +0800, Fam Zheng wrote: > It returns true as long as there is another attached port. No, other ports may also return false from .can_receive(). So this function can return false when there are multiple ports. > This is not > strictly necessary because even if t

Re: [Qemu-devel] [PATCH for-2.4] net-hub: Drop can_receive

2015-06-29 Thread Thomas Huth
On Tue, 30 Jun 2015 10:29:20 +0800 Fam Zheng wrote: > It returns true as long as there is another attached port. This is not > strictly necessary because even if there is only one port (the sender), > net_hub_port_receive could succeed with a NOP. So always deliver the > packets, instead of queui

[Qemu-devel] [PATCH for-2.4] net-hub: Drop can_receive

2015-06-29 Thread Fam Zheng
It returns true as long as there is another attached port. This is not strictly necessary because even if there is only one port (the sender), net_hub_port_receive could succeed with a NOP. So always deliver the packets, instead of queuing them. This fixes the possible hanging issue after net laye