[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAF=yD-+sHFZ9+ko_NBT3Oq-CCZvLdzbOi6Od=CNvj6nj_DmGHQ@mail.gmail.com>
Date: Tue, 14 Nov 2017 20:56:04 -0500
From: Willem de Bruijn <willemdebruijn.kernel@...il.com>
To: John Fastabend <john.fastabend@...il.com>
Cc: Daniel Borkmann <daniel@...earbox.net>,
Eric Dumazet <eric.dumazet@...il.com>, make0818@...il.com,
Network Development <netdev@...r.kernel.org>,
Jiří Pírko <jiri@...nulli.us>,
Cong Wang <xiyou.wangcong@...il.com>
Subject: Re: [RFC PATCH 03/17] net: sched: remove remaining uses for
qdisc_qlen in xmit path
On Tue, Nov 14, 2017 at 7:11 PM, Willem de Bruijn
<willemdebruijn.kernel@...il.com> wrote:
> On Mon, Nov 13, 2017 at 3:08 PM, John Fastabend
> <john.fastabend@...il.com> wrote:
>> sch_direct_xmit() uses qdisc_qlen as a return value but all call sites
>> of the routine only check if it is zero or not. Simplify the logic so
>> that we don't need to return an actual queue length value.
>>
>> This introduces a case now where sch_direct_xmit would have returned
>> a qlen of zero but now it returns true.
>
> You mean the first case, when the likely(skb) branch failed?
> Can that return false, then?
I misunderstood. __qdisc_run will just take one extra loop, since it
will no longer break out of the loop on reading the last packet on
the queue with qdisc_restart.
That does have a subtle (but benign if rare) side effect of possibly
calling __netif_schedule while there is nothing queued, if either
the quota is exactly exhausted or need_resched is true.
Powered by blists - more mailing lists