netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC net-next 0/2]eth: bnxt: Implement rx-side device memory
@ 2025-03-31 11:47 Taehee Yoo
  2025-03-31 11:47 ` [RFC net-next 1/2] eth: bnxt: refactor buffer descriptor Taehee Yoo
  2025-03-31 11:47 ` [RFC net-next 2/2] eth: bnxt: add support rx side device memory TCP Taehee Yoo
  0 siblings, 2 replies; 16+ messages in thread
From: Taehee Yoo @ 2025-03-31 11:47 UTC (permalink / raw)
  To: davem, kuba, pabeni, edumazet, andrew+netdev, horms, michael.chan,
	pavan.chebbi, ilias.apalodimas, dw, netdev
  Cc: ap420073, kuniyu, sdf, aleksander.lobakin

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


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2025-04-03  1:55 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-31 11:47 [RFC net-next 0/2]eth: bnxt: Implement rx-side device memory Taehee Yoo
2025-03-31 11:47 ` [RFC net-next 1/2] eth: bnxt: refactor buffer descriptor Taehee Yoo
2025-03-31 17:34   ` Jakub Kicinski
2025-04-01  6:48     ` Taehee Yoo
2025-04-01  5:39   ` Michael Chan
2025-04-01  7:17     ` Taehee Yoo
2025-04-01 15:22       ` David Wei
2025-04-01 15:20   ` David Wei
2025-03-31 11:47 ` [RFC net-next 2/2] eth: bnxt: add support rx side device memory TCP Taehee Yoo
2025-03-31 18:50   ` Jakub Kicinski
2025-04-02 12:09     ` Taehee Yoo
2025-04-02 12:46       ` Jakub Kicinski
2025-04-02 22:11     ` Mina Almasry
2025-04-02 22:45       ` Jakub Kicinski
2025-04-02 22:16   ` Mina Almasry
2025-04-03  1:55     ` Taehee Yoo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).