On 11/14/2017 05:56 PM, Willem de Bruijn wrote: > On Tue, Nov 14, 2017 at 7:11 PM, Willem de Bruijn > <willemdebruijn.ker...@gmail.com> wrote: >> On Mon, Nov 13, 2017 at 3:08 PM, John Fastabend >> <john.fastab...@gmail.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. >
Right. Seems OK to me. Will also make code cleanup comment from intial email. .John