Re: [PATCH net v2] net: sched: do not requeue a NULL skb

2016-04-11 Thread Eric Dumazet
On Mon, 2016-04-11 at 16:19 -0700, Cong Wang wrote: > My point is, for example, in OOM case, we don't know processin > more SKB would make it better or worse. Maybe we really need to > check the error code to decide to continue to exit? Really, given this bug has been there for a long time (v3.18

Re: [PATCH net v2] net: sched: do not requeue a NULL skb

2016-04-11 Thread Cong Wang
On Mon, Apr 11, 2016 at 11:30 AM, Eric Dumazet wrote: > On Mon, 2016-04-11 at 11:26 -0700, Eric Dumazet wrote: >> On Mon, 2016-04-11 at 11:02 -0700, Cong Wang wrote: >> >> > I am fine with either way as long as the loop stops on failure. > > > Note that skb that could not be validated is already f

Re: [PATCH net v2] net: sched: do not requeue a NULL skb

2016-04-11 Thread Eric Dumazet
On Mon, 2016-04-11 at 11:26 -0700, Eric Dumazet wrote: > On Mon, 2016-04-11 at 11:02 -0700, Cong Wang wrote: > > > I am fine with either way as long as the loop stops on failure. Note that skb that could not be validated is already freed. So I do not see any value from stopping the loop, since

Re: [PATCH net v2] net: sched: do not requeue a NULL skb

2016-04-11 Thread Eric Dumazet
On Mon, 2016-04-11 at 11:02 -0700, Cong Wang wrote: > I am fine with either way as long as the loop stops on failure. > Folding the test "if (skb)" into one also requires to retake the spinlock. Adding the likely() in this path would probably help as well. diff --git a/net/sched/sch_generic.c b/

Re: [PATCH net v2] net: sched: do not requeue a NULL skb

2016-04-11 Thread Cong Wang
On Mon, Apr 11, 2016 at 8:52 AM, Eric Dumazet wrote: > On Mon, 2016-04-11 at 17:17 +0200, Lars Persson wrote: >> >> On 04/11/2016 04:22 PM, Eric Dumazet wrote: >> > On Mon, 2016-04-11 at 15:38 +0200, Lars Persson wrote: >> > >> >> I though it would be prudent because the queue can be non-empty eve

Re: [PATCH net v2] net: sched: do not requeue a NULL skb

2016-04-11 Thread Cong Wang
On Mon, Apr 11, 2016 at 8:17 AM, Lars Persson wrote: > > > On 04/11/2016 04:22 PM, Eric Dumazet wrote: >> >> On Mon, 2016-04-11 at 15:38 +0200, Lars Persson wrote: >> >>> I though it would be prudent because the queue can be non-empty even for >>> the case of skb=NULL. So should it be there in thi

Re: [PATCH net v2] net: sched: do not requeue a NULL skb

2016-04-11 Thread Eric Dumazet
On Mon, 2016-04-11 at 17:17 +0200, Lars Persson wrote: > > On 04/11/2016 04:22 PM, Eric Dumazet wrote: > > On Mon, 2016-04-11 at 15:38 +0200, Lars Persson wrote: > > > >> I though it would be prudent because the queue can be non-empty even for > >> the case of skb=NULL. So should it be there in th

Re: [PATCH net v2] net: sched: do not requeue a NULL skb

2016-04-11 Thread Lars Persson
On 04/11/2016 04:22 PM, Eric Dumazet wrote: On Mon, 2016-04-11 at 15:38 +0200, Lars Persson wrote: I though it would be prudent because the queue can be non-empty even for the case of skb=NULL. So should it be there in this patch, another patch or not at all ? Then maybe change return code

Re: [PATCH net v2] net: sched: do not requeue a NULL skb

2016-04-11 Thread Eric Dumazet
On Mon, 2016-04-11 at 15:38 +0200, Lars Persson wrote: > I though it would be prudent because the queue can be non-empty even for > the case of skb=NULL. So should it be there in this patch, another patch > or not at all ? Then maybe change return code ? It seems strange that a validate_xmit_s

Re: [PATCH net v2] net: sched: do not requeue a NULL skb

2016-04-11 Thread Lars Persson
On 04/11/2016 03:23 PM, Eric Dumazet wrote: On Mon, 2016-04-11 at 08:24 +0200, Lars Persson wrote: A failure in validate_xmit_skb_list() triggered an unconditional call to dev_requeue_skb with skb=NULL. This slowly grows the queue discipline's qlen count until all traffic through the queue sto

Re: [PATCH net v2] net: sched: do not requeue a NULL skb

2016-04-11 Thread Eric Dumazet
On Mon, 2016-04-11 at 08:24 +0200, Lars Persson wrote: > A failure in validate_xmit_skb_list() triggered an unconditional call > to dev_requeue_skb with skb=NULL. This slowly grows the queue > discipline's qlen count until all traffic through the queue stops. > > By introducing a NULL check in dev

[PATCH net v2] net: sched: do not requeue a NULL skb

2016-04-10 Thread Lars Persson
A failure in validate_xmit_skb_list() triggered an unconditional call to dev_requeue_skb with skb=NULL. This slowly grows the queue discipline's qlen count until all traffic through the queue stops. By introducing a NULL check in dev_requeue_skb it was also necessary to make the __netif_schedule c