[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CADYv5ecv3iz=B_Lve-0oK273a79Qqa=Eh08kbfhBHLFXDgotSw@mail.gmail.com>
Date: Tue, 8 Apr 2025 17:35:05 -0700
From: Hongguang Gao <hongguang.gao@...adcom.com>
To: Taehee Yoo <ap420073@...il.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 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.
> @@ -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,
-Hongguang
Download attachment "smime.p7s" of type "application/pkcs7-signature" (5423 bytes)
Powered by blists - more mailing lists