[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <BN1PR0301MB077018D4A512E3AA9B8583E0CA3D0@BN1PR0301MB0770.namprd03.prod.outlook.com>
Date: Tue, 3 Feb 2015 15:46:31 +0000
From: Haiyang Zhang <haiyangz@...rosoft.com>
To: Jason Wang <jasowang@...hat.com>
CC: "davem@...emloft.net" <davem@...emloft.net>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
KY Srinivasan <kys@...rosoft.com>,
"olaf@...fle.de" <olaf@...fle.de>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"driverdev-devel@...uxdriverproject.org"
<driverdev-devel@...uxdriverproject.org>
Subject: RE: [PATCH net] hyperv: Fix the error processing in netvsc_send()
> -----Original Message-----
> From: Jason Wang [mailto:jasowang@...hat.com]
> Sent: Monday, February 2, 2015 1:49 AM
> >> btw, I find during netvsc_start_xmit(), ret was change to -ENOSPC
> >> when
> >> queue_sends[q_idx] < 1. But non of the caller check -ENOSPC in fact?
> >
> > In this case, we don't request re-send, so set ret to a value other
> > than
> > -EAGAIN.
>
> Why not? We have available slots for it to be sent now. Dropping the
> packet in this case may cause out of order sending.
The EAGAIN error doesn't normally happen, because we set the hi water mark
to stop send queue. If in really rare case, the ring buffer is full and there
is no outstanding sends, we can't stop queue here because there will be no
send-completion msg to wake it up. And, the ring buffer is likely to be
occupied by other special msg, e.g. receive-completion msg (not a normal case),
so we can't assume there are available slots. We don't request retry from
the upper layer in this case to avoid possible busy retry.
Thanks,
- Haiyang
Powered by blists - more mailing lists