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: <CAMArcTU7iv1McsFM24yaK5TxaiOqsayizOBr__82VKqD0w=fHw@mail.gmail.com>
Date: Wed, 9 Apr 2025 12:48:10 +0900
From: Taehee Yoo <ap420073@...il.com>
To: Hongguang Gao <hongguang.gao@...adcom.com>
Cc: davem@...emloft.net, kuba@...nel.org, pabeni@...hat.com, 
	edumazet@...gle.com, andrew+netdev@...n.ch, horms@...nel.org, 
	michael.chan@...adcom.com, pavan.chebbi@...adcom.com, hawk@...nel.org, 
	ilias.apalodimas@...aro.org, netdev@...r.kernel.org, dw@...idwei.uk, 
	kuniyu@...zon.com, sdf@...ichev.me, ahmed.zaki@...el.com, 
	aleksander.lobakin@...el.com
Subject: Re: [PATCH net-next] eth: bnxt: add support rx side device memory TCP

On Wed, Apr 9, 2025 at 9:35 AM Hongguang Gao <hongguang.gao@...adcom.com> wrote:
>

Hi Hongguang,
Thanks a lot for your review!

> On Mon, Apr 7, 2025 at 9:36 PM Taehee Yoo <ap420073@...il.com> wrote:
> >
> > Currently, bnxt_en driver satisfies the requirements of the Device
> > memory TCP, which is HDS.
> > So, it implements rx-side Device memory TCP for bnxt_en driver.
> > It requires only converting the page API to netmem API.
> > `struct page` of agg rings are changed to `netmem_ref netmem` and
> > corresponding functions are changed to a variant of netmem API.
> >
> > It also passes PP_FLAG_ALLOW_UNREADABLE_NETMEM flag to a parameter of
> > page_pool.
> > The netmem will be activated only when a user requests devmem TCP.
> >
> > When netmem is activated, received data is unreadable and netmem is
> > disabled, received data is readable.
> > But drivers don't need to handle both cases because netmem core API will
> > handle it properly.
> > So, using proper netmem API is enough for drivers.
> >
> > Device memory TCP can be tested with
> > tools/testing/selftests/drivers/net/hw/ncdevmem.
> > This is tested with BCM57504-N425G and firmware version 232.0.155.8/pkg
> > 232.1.132.8.
> >
> > Signed-off-by: Taehee Yoo <ap420073@...il.com>
>
> Hi Taehee,
> Thanks for submitting the patch. Overall it looks good to me.  Please see
> 2 minor comments below.
>
> I'm also in progress to test this patch, not finished yet.
>
>
> > @@ -3777,15 +3811,20 @@ static int bnxt_alloc_rx_page_pool(struct bnxt *bp,
> >         pp.dev = &bp->pdev->dev;
> >         pp.dma_dir = bp->rx_dir;
> >         pp.max_len = PAGE_SIZE;
> > -       pp.flags = PP_FLAG_DMA_MAP | PP_FLAG_DMA_SYNC_DEV;
> > +       pp.flags = PP_FLAG_DMA_MAP | PP_FLAG_DMA_SYNC_DEV |
> > +                  PP_FLAG_ALLOW_UNREADABLE_NETMEM;
> > +       pp.queue_idx = rxr->bnapi->index;
> > +       pp.order = 0;
>
> Nit, set pp.order to 0 is not needed. The whole struct was initialized
> to 0 already.

Okay, I will remove it in v2.

>
>
> > @@ -15766,7 +15808,7 @@ static int bnxt_queue_mem_alloc(struct net_device *dev, void *qmem, int idx)
> >         xdp_rxq_info_unreg(&clone->xdp_rxq);
> >  err_page_pool_destroy:
> >         page_pool_destroy(clone->page_pool);
> > -       if (bnxt_separate_head_pool())
> > +       if (bnxt_separate_head_pool(rxr))
>
> Should be:
>         if (bnxt_separate_head_pool(clone))

Thanks for this. You're right.
I will fix it in v2.

Thanks a lot!
Taehee Yoo

>
> Thanks,
> -Hongguang

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ