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: <CACKFLinHWLMScGbYKZ+zNAn2iV1zqLkNVWDMQwJRZYd-yRiY7g@mail.gmail.com>
Date: Mon, 31 Jul 2023 11:16:55 -0700
From: Michael Chan <michael.chan@...adcom.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: Jesper Dangaard Brouer <hawk@...nel.org>, davem@...emloft.net, netdev@...r.kernel.org, 
	edumazet@...gle.com, pabeni@...hat.com, gospo@...adcom.com, 
	bpf@...r.kernel.org, somnath.kotur@...adcom.com, 
	Ilias Apalodimas <ilias.apalodimas@...aro.org>
Subject: Re: [PATCH net-next 3/3] bnxt_en: Let the page pool manage the DMA mapping

On Mon, Jul 31, 2023 at 11:00 AM Jakub Kicinski <kuba@...nel.org> wrote:
>
> On Mon, 31 Jul 2023 19:47:08 +0200 Jesper Dangaard Brouer wrote:
> > > This should be smaller than PAGE_SIZE only if you're wasting the rest
> > > of the buffer, e.g. MTU is 3k so you know last 1k will never get used.
> > > PAGE_SIZE is always a multiple of BNXT_RX_PAGE so you waste nothing.
> >
> > Remember pp.max_len is used for dma_sync_for_device.
> > If driver is smart, it can set pp.max_len according to MTU, as the (DMA
> > sync for) device knows hardware will not go beyond this.
> > On Intel "dma_sync_for_device" is a no-op, so most drivers done
> > optimized for this. I remember is had HUGE effects on ARM EspressoBin board.
>
> Note that (AFAIU) there is no MTU here, these are pages for LRO/GRO,
> they will be filled with TCP payload start to end. page_pool_put_page()
> does nothing for non-last frag, so we'll only sync for the last
> (BNXT_RX_PAGE-sized) frag released, and we need to sync the entire
> host page.

Correct, there is no MTU here.  Remember this matters only when
PAGE_SIZE > BNXT_RX_PAGE_SIZE (e.g. 64K PAGE_SIZE and 32K
BNXT_RX_PAGE_SIZE).  I think we want to dma_sync_for_device for 32K in
this case.

Download attachment "smime.p7s" of type "application/pkcs7-signature" (4209 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ