netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: songliubraving@fb.com
Cc: netdev@vger.kernel.org, kernel-team@fb.com, john.fastabend@gmail.com
Subject: Re: [PATCH net] net: sched: check netif_xmit_frozen_or_stopped() in sch_direct_xmit()
Date: Tue, 29 May 2018 10:02:55 -0400 (EDT)	[thread overview]
Message-ID: <20180529.100255.625454563789387164.davem@davemloft.net> (raw)
In-Reply-To: <20180525181144.224395-1-songliubraving@fb.com>

From: Song Liu <songliubraving@fb.com>
Date: Fri, 25 May 2018 11:11:44 -0700

> Summary:
> 
> At the end of sch_direct_xmit(), we are in the else path of
> !dev_xmit_complete(ret), which means ret == NETDEV_TX_OK. The following
> condition will always fail and netif_xmit_frozen_or_stopped() is not
> checked at all.
> 
>     if (ret && netif_xmit_frozen_or_stopped(txq))
>          return false;
> 
> In this patch, this condition is fixed as:
> 
>     if (netif_xmit_frozen_or_stopped(txq))
>          return false;
> 
> and further simplifies the code as:
> 
>     return !netif_xmit_frozen_or_stopped(txq);
> 
> Fixes: 29b86cdac00a ("net: sched: remove remaining uses for qdisc_qlen in xmit path")
> Cc: John Fastabend <john.fastabend@gmail.com>
> Cc: David S. Miller <davem@davemloft.net>
> Signed-off-by: Song Liu <songliubraving@fb.com>

I expect a new version of this patch which removes the test entirely.

  parent reply	other threads:[~2018-05-29 14:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-25 18:11 [PATCH net] net: sched: check netif_xmit_frozen_or_stopped() in sch_direct_xmit() Song Liu
2018-05-25 19:46 ` Song Liu
2018-05-26 19:43   ` John Fastabend
2018-05-28 18:30     ` Song Liu
2018-05-29 14:02 ` David Miller [this message]
2018-05-29 16:51   ` Song Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180529.100255.625454563789387164.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=john.fastabend@gmail.com \
    --cc=kernel-team@fb.com \
    --cc=netdev@vger.kernel.org \
    --cc=songliubraving@fb.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).