[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7c7dd9fa-40ab-4a3b-83e9-4dc338d02e60@davidwei.uk>
Date: Tue, 8 Apr 2025 20:46:49 -0700
From: David Wei <dw@...idwei.uk>
To: Taehee Yoo <ap420073@...il.com>, 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
Cc: 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 2025-04-07 21:35, Taehee Yoo 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>
> ---
>
> RFC -> PATCH v1:
> - Drop ring buffer descriptor refactoring patch.
> - Do not convert to netmem API for normal ring(non-agg ring).
> - Remove changes of napi_{enable | disable}() to
> napi_{enable | disable}_locked().
> - Relocate a need_head_pool in struct bnxt_rx_ring_info due to
> an alignment hole.
> - Remove *offset parameter of __bnxt_alloc_rx_netmem().
> *offset is always set to 0 in this function. it's unnecessary.
> - Get skb_shared_info outside of loop in __bnxt_rx_agg_netmems().
> - Drop Tested-by tag due to changes of this patch.
>
> drivers/net/ethernet/broadcom/bnxt/bnxt.c | 201 +++++++++++++---------
> drivers/net/ethernet/broadcom/bnxt/bnxt.h | 3 +-
> include/linux/netdevice.h | 1 +
> include/net/page_pool/helpers.h | 6 +
> net/core/dev.c | 6 +
> 5 files changed, 137 insertions(+), 80 deletions(-)
Tested to work with io_uring zero copy receive.
Tested-by: David Wei <dw@...idwei.uk>
Powered by blists - more mailing lists