netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v6 0/3] enic: Use Page Pool API for receiving packets
@ 2025-01-17  8:01 John Daley
  2025-01-17  8:01 ` [PATCH net-next v6 1/3] enic: Move RX functions to their own file John Daley
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: John Daley @ 2025-01-17  8:01 UTC (permalink / raw)
  To: benve, satishkh, andrew+netdev, davem, edumazet, kuba, pabeni,
	netdev
  Cc: John Daley

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.

John Daley (3):
  enic: Move RX functions to their own file
  enic: Simplify RX handler function
  enic: Use the Page Pool API for RX

 drivers/net/ethernet/cisco/enic/Makefile    |   2 +-
 drivers/net/ethernet/cisco/enic/enic.h      |   3 +
 drivers/net/ethernet/cisco/enic/enic_main.c | 264 ++------------------
 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 +
 6 files changed, 283 insertions(+), 240 deletions(-)
 create mode 100644 drivers/net/ethernet/cisco/enic/enic_rq.c
 create mode 100644 drivers/net/ethernet/cisco/enic/enic_rq.h

-- 
2.35.2


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

end of thread, other threads:[~2025-01-19 19:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-17  8:01 [PATCH net-next v6 0/3] enic: Use Page Pool API for receiving packets John Daley
2025-01-17  8:01 ` [PATCH net-next v6 1/3] enic: Move RX functions to their own file John Daley
2025-01-17  8:01 ` [PATCH net-next v6 2/3] enic: Simplify RX handler function John Daley
2025-01-17  8:01 ` [PATCH net-next v6 3/3] enic: Use the Page Pool API for RX John Daley
2025-01-19  1:24   ` Jakub Kicinski
2025-01-19 19:27     ` John Daley

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).