All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Laight <David.Laight@ACULAB.COM>
To: 'Jakub Kicinski' <kuba@kernel.org>,
	"davem@davemloft.net" <davem@davemloft.net>
Cc: "michael.chan@broadcom.com" <michael.chan@broadcom.com>,
	"huangjw@broadcom.com" <huangjw@broadcom.com>,
	"eddie.wai@broadcom.com" <eddie.wai@broadcom.com>,
	"prashant@broadcom.com" <prashant@broadcom.com>,
	"gospo@broadcom.com" <gospo@broadcom.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"edwin.peer@broadcom.com" <edwin.peer@broadcom.com>
Subject: RE: [PATCH net v2 3/4] bnxt: make sure xmit_more + errors does not miss doorbells
Date: Fri, 13 Aug 2021 08:35:39 +0000	[thread overview]
Message-ID: <0d4efdfc3b394ec2bf411dd8036c259e@AcuMS.aculab.com> (raw)
In-Reply-To: <20210811213749.3276687-4-kuba@kernel.org>

From: Jakub Kicinski
> Sent: 11 August 2021 22:38
> 
> skbs are freed on error and not put on the ring. We may, however,
> be in a situation where we're freeing the last skb of a batch,
> and there is a doorbell ring pending because of xmit_more() being
> true earlier. Make sure we ring the door bell in such situations.
> 
> Since errors are rare don't pay attention to xmit_more() and just
> always flush the pending frames.
> 
...
> +tx_free:
>  	dev_kfree_skb_any(skb);
> +tx_kick_pending:
> +	tx_buf->skb = NULL;
> +	if (txr->kick_pending)
> +		bnxt_txr_db_kick(bp, txr, txr->tx_prod);
>  	return NETDEV_TX_OK;

Is this case actually so unlikely that the 'kick' can be
done unconditionally?
Then all the conditionals can be removed from the hot path.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)


  parent reply	other threads:[~2021-08-13  8:35 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
2021-08-13  8:35   ` David Laight [this message]
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=0d4efdfc3b394ec2bf411dd8036c259e@AcuMS.aculab.com \
    --to=david.laight@aculab.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=michael.chan@broadcom.com \
    --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.