lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231215092112.3f0fee3d@kernel.org>
Date: Fri, 15 Dec 2023 09:21:12 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Andy Gospodarek <andrew.gospodarek@...adcom.com>
Cc: Michael Chan <michael.chan@...adcom.com>, davem@...emloft.net,
 netdev@...r.kernel.org, edumazet@...gle.com, pabeni@...hat.com,
 bpf@...r.kernel.org, hawk@...nel.org, ast@...nel.org, daniel@...earbox.net,
 john.fastabend@...il.com, Somnath Kotur <somnath.kotur@...adcom.com>
Subject: Re: [PATCH net] bnxt_en: do not map packet buffers twice

On Fri, 15 Dec 2023 11:57:14 -0500 Andy Gospodarek wrote:
> > 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.

Ah, I see it, interesting! In that case - next question.. :)

Are the XDP_REDIRECT (target) and XDP_TX going to the same rings?
The locking seems to be missing, and bnxt_tx_int_xdp() does not
seem to be able to handle the optimization you described if
a ring contains a mix of XDP_REDIRECT and XDP_TX.

If I'm reading the assignment in bnxt_alloc_mem() and indexing
right - XDP_REDIRECT and XDP_TX do seem to go to the same rings.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ