RE: [PATCH net] hyperv: Fix the error processing in netvsc_send()

2015-02-04 Thread Haiyang Zhang
> -Original Message- > From: Jason Wang [mailto:jasow...@redhat.com] > Sent: Wednesday, February 4, 2015 2:29 AM > > The EAGAIN error doesn't normally happen, because we set the hi water > > mark > > to stop send queue. > > This is not true since only txq was stopped which means only net

RE: [PATCH net] hyperv: Fix the error processing in netvsc_send()

2015-02-03 Thread Jason Wang
On Tue, Feb 3, 2015 at 11:46 PM, Haiyang Zhang wrote: -Original Message- From: Jason Wang [mailto:jasow...@redhat.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

RE: [PATCH net] hyperv: Fix the error processing in netvsc_send()

2015-02-03 Thread Haiyang Zhang
> -Original Message- > From: Jason Wang [mailto:jasow...@redhat.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,

RE: [PATCH net] hyperv: Fix the error processing in netvsc_send()

2015-02-01 Thread Jason Wang
On Fri, Jan 30, 2015 at 11:05 PM, Haiyang Zhang wrote: -Original Message- From: Jason Wang [mailto:jasow...@redhat.com] Sent: Friday, January 30, 2015 5:25 AM > + if (ret != 0) { > + if (section_index != NETVSC_INVALID_INDEX) > + netvsc_free_send_slot(

Re: [PATCH net] hyperv: Fix the error processing in netvsc_send()

2015-01-31 Thread David Miller
From: Haiyang Zhang Date: Thu, 29 Jan 2015 12:34:49 -0800 > The existing code frees the skb in EAGAIN case, in which the skb will be > retried from upper layer and used again. > Also, the existing code doesn't free send buffer slot in error case, because > there is no completion message for unsen

RE: [PATCH net] hyperv: Fix the error processing in netvsc_send()

2015-01-30 Thread Haiyang Zhang
> -Original Message- > From: Jason Wang [mailto:jasow...@redhat.com] > Sent: Friday, January 30, 2015 5:25 AM > > + if (ret != 0) { > > + if (section_index != NETVSC_INVALID_INDEX) > > + netvsc_free_send_slot(net_device, section_index); > > What if ret is -E

Re: [PATCH net] hyperv: Fix the error processing in netvsc_send()

2015-01-30 Thread Jason Wang
On Fri, Jan 30, 2015 at 4:34 AM, Haiyang Zhang wrote: The existing code frees the skb in EAGAIN case, in which the skb will be retried from upper layer and used again. Also, the existing code doesn't free send buffer slot in error case, because there is no completion message for unsent pac