BPF List
 help / color / mirror / Atom feed
From: Andy Gospodarek <andrew.gospodarek@broadcom.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: Michael Chan <michael.chan@broadcom.com>,
	Andy Gospodarek <andrew.gospodarek@broadcom.com>,
	davem@davemloft.net, netdev@vger.kernel.org, edumazet@google.com,
	pabeni@redhat.com, bpf@vger.kernel.org, hawk@kernel.org,
	ast@kernel.org, daniel@iogearbox.net, john.fastabend@gmail.com,
	Somnath Kotur <somnath.kotur@broadcom.com>
Subject: Re: [PATCH net] bnxt_en: do not map packet buffers twice
Date: Fri, 15 Dec 2023 11:57:14 -0500	[thread overview]
Message-ID: <ZXyFW0lIGluM8ipj@C02YVCJELVCG.dhcp.broadcom.net> (raw)
In-Reply-To: <20231215083759.0702559d@kernel.org>

On Fri, Dec 15, 2023 at 08:37:59AM -0800, Jakub Kicinski wrote:
> On Thu, 14 Dec 2023 13:31:38 -0800 Michael Chan wrote:
> > From: Andy Gospodarek <andrew.gospodarek@broadcom.com>
> > 
> > Remove double-mapping of DMA buffers as it can prevent page pool entries
> > from being freed.  Mapping is managed by page pool infrastructure and
> > was previously managed by the driver in __bnxt_alloc_rx_page before
> > allowing the page pool infrastructure to manage it.
> 
> This patch is all good, but I'm confused by the handling of head.
> Do you recycle it immediately and hope that the Tx happens before
> the Rx gets around to using the recycled page again? Am I misreading?

Your description is correct, but we use a better strategy that just
hoping it works out. :)

The design is that we do not update the rx ring with the producer value
that was present when the packet was received until after getting the tx
completion indicating that the packet sent via XDP_TX action has been
sent.


  reply	other threads:[~2023-12-15 16:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-14 21:31 [PATCH net] bnxt_en: do not map packet buffers twice Michael Chan
2023-12-14 23:18 ` David Wei
2023-12-15  0:27   ` Michael Chan
2023-12-15  5:54 ` David Wei
2023-12-15 16:37 ` Jakub Kicinski
2023-12-15 16:57   ` Andy Gospodarek [this message]
2023-12-15 17:21     ` Jakub Kicinski
2023-12-15 20:45       ` Michael Chan
2023-12-15 18:20 ` patchwork-bot+netdevbpf

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=ZXyFW0lIGluM8ipj@C02YVCJELVCG.dhcp.broadcom.net \
    --to=andrew.gospodarek@broadcom.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hawk@kernel.org \
    --cc=john.fastabend@gmail.com \
    --cc=kuba@kernel.org \
    --cc=michael.chan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=somnath.kotur@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox