qemu-devel
[Top][All Lists]
Advanced

[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: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH v4 16/16] hub: add the support for hub own flow control
Date: Fri, 25 May 2012 13:13:08 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

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.

Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]