Message ID | 20250205235416.25410-1-johndale@cisco.com (mailing list archive) |
---|---|
Headers | show |
Series | enic: Use Page Pool API for receiving packets | expand |
Hello: This series was applied to netdev/net-next.git (main) by Jakub Kicinski <kuba@kernel.org>: On Wed, 5 Feb 2025 15:54:12 -0800 you wrote: > Use the Page Pool API for RX. The Page Pool API improves bandwidth and > CPU overhead by recycling pages instead of allocating new buffers in the > driver. Also, page pool fragment allocation for smaller MTUs is used > allow multiple packets to share pages. > > RX code was moved to its own file and some refactoring was done > beforehand to make the page pool changes more trasparent and to simplify > the resulting code. > > [...] Here is the summary with links: - [net-next,v8,1/4] enic: Move RX functions to their own file https://git.kernel.org/netdev/net-next/c/fe57762c6490 - [net-next,v8,2/4] enic: Simplify RX handler function https://git.kernel.org/netdev/net-next/c/eab3726347f8 - [net-next,v8,3/4] enic: Use the Page Pool API for RX https://git.kernel.org/netdev/net-next/c/d24cb52b2d8a - [net-next,v8,4/4] enic: remove copybreak tunable https://git.kernel.org/netdev/net-next/c/a3b2caaedeaa You are awesome, thank you!
Use the Page Pool API for RX. The Page Pool API improves bandwidth and CPU overhead by recycling pages instead of allocating new buffers in the driver. Also, page pool fragment allocation for smaller MTUs is used allow multiple packets to share pages. RX code was moved to its own file and some refactoring was done beforehand to make the page pool changes more trasparent and to simplify the resulting code. Signed-off-by: John Daley <johndale@cisco.com> --- Changes in v2: - Fixed a valid warning found by build_clang where a variable was used before it was initialized. The warnings in include/linux/mm.h were not addressed since they do not appear to be realated to this patchset. Changes in v3: - Moved a function to before where is was called and removed the forward declaration. Reworded a commit message. No functional changes. Changes in v4: - Replaced call to page_pool_put_page() with page_pool_put_full_page() since page_pool_dev_alloc() API is used and page_pool is created with PP_FLAG_DMA_SYNC_DEV flag. - Reworded final commit message one more time to try to make it clear that there is just one fix for the commit. Changes in v5: - Removed link related patches from the patchset. These were merged seperately. - Removed inappropriate calls to napi_free_frags() - Moved pp_alloc_error out of ethtool stats and accumulate into netdev queue stat 'alloc_error'. Changes in v6: - Use the page pool API for all MTUs, not just <= PAGE_SIZE. Use page pool 'order' field to accomodate MTUs > PAGE_SIZE. Remove the function pointers and functions that handled the bigger MTUs. Changes in v7: - Added return code check for page_pool_create() Change in v8: - removed vestiges of rx copybreak John Daley (4): enic: Move RX functions to their own file enic: Simplify RX handler function enic: Use the Page Pool API for RX enic: remove copybreak tunable drivers/net/ethernet/cisco/enic/Makefile | 2 +- drivers/net/ethernet/cisco/enic/enic.h | 4 +- .../net/ethernet/cisco/enic/enic_ethtool.c | 39 --- drivers/net/ethernet/cisco/enic/enic_main.c | 274 ++---------------- drivers/net/ethernet/cisco/enic/enic_rq.c | 242 ++++++++++++++++ drivers/net/ethernet/cisco/enic/enic_rq.h | 10 + drivers/net/ethernet/cisco/enic/vnic_rq.h | 2 + 7 files changed, 290 insertions(+), 283 deletions(-) create mode 100644 drivers/net/ethernet/cisco/enic/enic_rq.c create mode 100644 drivers/net/ethernet/cisco/enic/enic_rq.h