RFC eth: bnxt: Implement rx-side device memory
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest2 patches 13 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | eth: bnxt: refactor buffer descriptordrivers/ drivers/ drivers/ +4 more | +199 | 6 replies | |
| 2/2 | eth: bnxt: add support rx side device memory TCPdrivers/ drivers/ drivers/ +5 more | +258 | 7 replies |
Reviews trailers per patch
None of the 2 patches has a Reviewed-by or Acked-by.
| Patch | David Wei |
|---|---|
| 1/2 | T-b |
| 2/2 | T-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [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(-)
Signature · 1 line
2.34.1