public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: davem@davemloft.net, therbert@google.com, netdev@vger.kernel.org,
	linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH net-next 4/4] gianfar: use netif_tx_queue_stopped instead of __netif_subqueue_stopped
Date: Sun, 18 Mar 2012 16:53:11 -0700	[thread overview]
Message-ID: <1332114791.3597.6.camel@edumazet-laptop> (raw)
In-Reply-To: <CAP=VYLpzpbLVAJ6=L1jdoZWcyAWPPKGMFTKBVU=7=HR+qTxwwA@mail.gmail.com>

Le dimanche 18 mars 2012 à 19:24 -0400, Paul Gortmaker a écrit :
> On Sun, Mar 18, 2012 at 5:55 PM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> > On Sun, 2012-03-18 at 17:39 -0400, Paul Gortmaker wrote:
> >> The __netif_subqueue_stopped() just does the following:
> >>
> >>         struct netdev_queue *txq = netdev_get_tx_queue(dev, queue_index);
> >>         return netif_tx_queue_stopped(txq);
> >>
> >> and since we already have the txq in scope, we can just call that
> >> directly in this case.
> >>
> >> Suggested-by: Eric Dumazet <eric.dumazet@gmail.com>
> >> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
> >> ---
> >>  drivers/net/ethernet/freescale/gianfar.c |    2 +-
> >>  1 files changed, 1 insertions(+), 1 deletions(-)
> >>
> >> diff --git a/drivers/net/ethernet/freescale/gianfar.c b/drivers/net/ethernet/freescale/gianfar.c
> >> index 6e66cc3..d9428f0 100644
> >> --- a/drivers/net/ethernet/freescale/gianfar.c
> >> +++ b/drivers/net/ethernet/freescale/gianfar.c
> >> @@ -2565,7 +2565,7 @@ static int gfar_clean_tx_ring(struct gfar_priv_tx_q *tx_queue)
> >>       }
> >>
> >>       /* If we freed a buffer, we can restart transmission, if necessary */
> >> -     if (__netif_subqueue_stopped(dev, tqi) && tx_queue->num_txbdfree)
> >> +     if (netif_tx_queue_stopped(txq) && tx_queue->num_txbdfree)
> >>               netif_wake_subqueue(dev, tqi);
> >>
> >>       /* Update dirty indicators */
> >
> > Please change netif_wake_subqueue() as well ;)
> 
> I looked at this earlier when I added patch #4 but I was concerned about
> the different semantics.
> 
> The netif_wake_subqueue() just returns on a netpoll_trap but the other
> netif_tx_wake_queue() actually calls netif_tx_start_queue() for the same
> netpoll_trap instance.  Maybe that is OK, but I didn't want to be changing
> the behaviour of subtleties in stuff where I am clearly still learning.
> 

I see... commit 7b3d3e4fc68 added a small difference here...

  reply	other threads:[~2012-03-18 23:53 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-18 16:56 [PATCH net-next 0/3] Gianfar byte queue limits Paul Gortmaker
2012-03-18 16:56 ` [PATCH net-next 1/3] gianfar: Add support for " Paul Gortmaker
2012-03-18 20:20   ` Eric Dumazet
2012-03-18 21:04     ` Paul Gortmaker
2012-03-18 16:56 ` [PATCH net-next 2/3] gianfar: constify giant block of status descriptor strings Paul Gortmaker
2012-03-18 16:56 ` [PATCH net-next 3/3] gianfar: delete orphaned version strings and dead macros Paul Gortmaker
2012-03-18 20:30 ` [PATCH net-next 0/3] Gianfar byte queue limits Eric Dumazet
2012-03-18 20:50   ` Paul Gortmaker
2012-03-18 21:39 ` [PATCH v2 net-next 0/4] " Paul Gortmaker
2012-03-18 21:39   ` [PATCH net-next 1/4] gianfar: Add support for " Paul Gortmaker
2012-03-18 21:39   ` [PATCH net-next 2/4] gianfar: constify giant block of status descriptor strings Paul Gortmaker
2012-03-18 21:39   ` [PATCH net-next 3/4] gianfar: delete orphaned version strings and dead macros Paul Gortmaker
2012-03-18 21:39   ` [PATCH net-next 4/4] gianfar: use netif_tx_queue_stopped instead of __netif_subqueue_stopped Paul Gortmaker
2012-03-18 21:55     ` Eric Dumazet
2012-03-18 23:24       ` Paul Gortmaker
2012-03-18 23:53         ` Eric Dumazet [this message]
2012-03-19 20:46   ` [PATCH v2 net-next 0/4] Gianfar byte queue limits David Miller

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=1332114791.3597.6.camel@edumazet-laptop \
    --to=eric.dumazet@gmail.com \
    --cc=davem@davemloft.net \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=netdev@vger.kernel.org \
    --cc=paul.gortmaker@windriver.com \
    --cc=therbert@google.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