[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250331114729.594603-1-ap420073@gmail.com>
Date: Mon, 31 Mar 2025 11:47:27 +0000
From: Taehee Yoo <ap420073@...il.com>
To: 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,
ilias.apalodimas@...aro.org,
dw@...idwei.uk,
netdev@...r.kernel.org
Cc: ap420073@...il.com,
kuniyu@...zon.com,
sdf@...ichev.me,
aleksander.lobakin@...el.com
Subject: [RFC net-next 0/2]eth: bnxt: Implement rx-side device memory
This patchset implements device memory TCP using netmem API instead of
page API.
The bnxt_en driver already satisfies the requirements of devmem TCP. The
only change required for devmem TCP is to switch from the page API to
the netmem API.
The first patch refactors bnxt_en drivers.
The main purpose of this is to make the bnxt_en driver use page_pool dma
sync API instead of raw DMA sync API.
page_pool_dma_sync_for_{cpu | device}() doesn't support virtual address
handling, so it requires to switch from handling virtual address to
page.
It switches from virtual address to page in the struct bnxt_sw_rx_bd.
By this change, the struct bnxt_sw_rx_bd becomes the same structure with
bnxt_sw_rx_agg_bd.
So it makes code much simpler.
The second patch switches apply netmem API.
This patch adds PP_FLAG_ALLOW_UNREADABLE_NETMEM flags to page_pool
parameter.
This flag indicates if the user enabled netmem, page_pool will be
initialized to support unreadable-netmem.
By this patchset, bnxt_en driver supports rx-side device memory TCP.
But Only Thor+ NICs support it and recent firmware is also required.
We can test device memory TCP with
tools/testing/selftests/drivers/net/hw/ncdevmem.c
This is tested with BCM57504-N425G and firmware version 232.0.155.8/pkg
232.1.132.8.
David Wei tested this patch on the io_uring side.
Thank you for testing, David.
Taehee Yoo (2):
eth: bnxt: refactor buffer descriptor
eth: bnxt: add support rx side device memory TCP
drivers/net/ethernet/broadcom/bnxt/bnxt.c | 520 ++++++++++--------
drivers/net/ethernet/broadcom/bnxt/bnxt.h | 35 +-
.../net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 2 +-
drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c | 41 +-
drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.h | 4 +-
include/linux/netdevice.h | 1 +
include/net/page_pool/helpers.h | 6 +
include/net/page_pool/types.h | 4 +-
net/core/dev.c | 6 +
net/core/page_pool.c | 23 +-
10 files changed, 344 insertions(+), 298 deletions(-)
--
2.34.1
Powered by blists - more mailing lists