All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Chan <michael.chan@broadcom.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: David Miller <davem@davemloft.net>,
	Jeffrey Huang <huangjw@broadcom.com>,
	Eddie Wai <eddie.wai@broadcom.com>,
	Prashant Sreedharan <prashant@broadcom.com>,
	Andrew Gospodarek <gospo@broadcom.com>,
	Netdev <netdev@vger.kernel.org>,
	Edwin Peer <edwin.peer@broadcom.com>
Subject: Re: [PATCH net v2 3/4] bnxt: make sure xmit_more + errors does not miss doorbells
Date: Wed, 11 Aug 2021 23:51:25 -0700	[thread overview]
Message-ID: <CACKFLikHWrpk55YpTjhUZziSzaE26q+qhFUF039kDqpaTjx1=Q@mail.gmail.com> (raw)
In-Reply-To: <20210811213749.3276687-4-kuba@kernel.org>

[-- Attachment #1: Type: text/plain, Size: 847 bytes --]

On Wed, Aug 11, 2021 at 2:38 PM Jakub Kicinski <kuba@kernel.org> wrote:

> @@ -396,6 +404,8 @@ static netdev_tx_t bnxt_start_xmit(struct sk_buff *skb, struct net_device *dev)
>         free_size = bnxt_tx_avail(bp, txr);
>         if (unlikely(free_size < skb_shinfo(skb)->nr_frags + 2)) {
>                 netif_tx_stop_queue(txq);
> +               if (net_ratelimit() && txr->kick_pending)
> +                       netif_warn(bp, tx_err, dev, "bnxt: ring busy!\n");

I think there is one more problem here.  Now that it is possible to
get here, we can race with bnxt_tx_int() again here.  We can call
netif_tx_stop_queue() here after bnxt_tx_int() has already cleaned the
entire TX ring.  So I think we need to call bnxt_tx_wake_queue() here
again if descriptors have become available.

>                 return NETDEV_TX_BUSY;
>         }
>

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4209 bytes --]

  parent reply	other threads:[~2021-08-12  6:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-11 21:37 [PATCH net v2 0/4] bnxt: Tx NAPI disabling resiliency improvements Jakub Kicinski
2021-08-11 21:37 ` [PATCH net v2 1/4] bnxt: don't lock the tx queue from napi poll Jakub Kicinski
2021-08-11 21:37 ` [PATCH net v2 2/4] bnxt: disable napi before canceling DIM Jakub Kicinski
2021-08-11 21:37 ` [PATCH net v2 3/4] bnxt: make sure xmit_more + errors does not miss doorbells Jakub Kicinski
2021-08-11 22:36   ` Michael Chan
2021-08-11 22:44     ` Jakub Kicinski
2021-08-11 23:00       ` Michael Chan
2021-08-11 23:16         ` Jakub Kicinski
2021-08-11 23:38           ` Michael Chan
2021-08-12  6:51   ` Michael Chan [this message]
2021-08-13  8:35   ` David Laight
2021-08-11 21:37 ` [PATCH net v2 4/4] bnxt: count Tx drops Jakub Kicinski

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='CACKFLikHWrpk55YpTjhUZziSzaE26q+qhFUF039kDqpaTjx1=Q@mail.gmail.com' \
    --to=michael.chan@broadcom.com \
    --cc=davem@davemloft.net \
    --cc=eddie.wai@broadcom.com \
    --cc=edwin.peer@broadcom.com \
    --cc=gospo@broadcom.com \
    --cc=huangjw@broadcom.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=prashant@broadcom.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.