[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4 16/16] hub: add the support for hub own flow
From: |
Zhi Yong Wu |
Subject: |
Re: [Qemu-devel] [PATCH v4 16/16] hub: add the support for hub own flow control |
Date: |
Sat, 26 May 2012 20:32:08 +0800 |
On Fri, May 25, 2012 at 8:13 PM, Stefan Hajnoczi
<address@hidden> wrote:
> On Fri, May 25, 2012 at 06:52:14PM +0800, address@hidden wrote:
>> @@ -59,16 +60,16 @@ static ssize_t net_hub_receive_iov(NetHub *hub,
>> NetHubPort *source_port,
>> const struct iovec *iov, int iovcnt)
>> {
>> NetHubPort *port;
>> - ssize_t ret = 0;
>> + ssize_t len = iov_size(iov, iovcnt);
>>
>> QLIST_FOREACH(port, &hub->ports, next) {
>> if (port == source_port) {
>> continue;
>> }
>>
>> - ret = qemu_sendv_packet(&port->nc, iov, iovcnt);
>> + qemu_sendv_packet(&port->nc, iov, iovcnt);
>> }
>> - return ret;
>> + return len;
>> }
>
> I think this is okay because at this point we've given it our best shot:
> we already checked that port peers can receive. If they error out now
> there's not much we can do. The packet is dropped for that particular
> peer but at least we tried to deliver it when they claimed to be ready.
Yeah, i think that he is lack of enough understanding on net subsystem
code. He can't see that his thought brought a lot of issues.
>
> Stefan
>
--
Regards,
Zhi Yong Wu