[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241227031410.25607-1-johndale@cisco.com>
Date: Thu, 26 Dec 2024 19:14:05 -0800
From: John Daley <johndale@...co.com>
To: benve@...co.com,
satishkh@...co.com,
andrew+netdev@...n.ch,
davem@...emloft.net,
edumazet@...gle.com,
kuba@...nel.org,
pabeni@...hat.com,
netdev@...r.kernel.org
Cc: John Daley <johndale@...co.com>
Subject: [PATCH net-next v2 0/5] enic: Use Page Pool API for receiving packets
When the MTU is less than PAGE_SIZE, 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 allow multiple packets
to share a page.
Since older hardware does not support receiving packets into
multiple discontiguous pages, the original RX path where
netdev_alloc_skb_ip_align() is used for buffer allocation is now
used only when MTU > PAGE_SIZE. Function pointers are used to select
functions based on the MTU. Some refactoring was done so that common
code can be shared. The refactored functions and the new functions
using page pool are in a new file called enic_rq.c.
Fixed bug in the RX adaptive coalescing and did a minor cleanup.
Signed-off-by: John Daley <johndale@...co.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.
---
John Daley (5):
enic: Refactor RX path common code into helper functions
enic: Remove an unnecessary parameter from function enic_queue_rq_desc
enic: Use function pointers for buf alloc, free and RQ service
enic: Use the Page Pool API for RX when MTU is less than page size
enic: Obtain the Link speed only after the link comes up
Makefile | 2 +-
drivers/net/ethernet/cisco/enic/Makefile | 2 +-
drivers/net/ethernet/cisco/enic/enic.h | 15 +
.../net/ethernet/cisco/enic/enic_ethtool.c | 1 +
drivers/net/ethernet/cisco/enic/enic_main.c | 171 +++++-------
drivers/net/ethernet/cisco/enic/enic_res.h | 10 +-
drivers/net/ethernet/cisco/enic/enic_rq.c | 261 ++++++++++++++++++
drivers/net/ethernet/cisco/enic/enic_rq.h | 27 ++
drivers/net/ethernet/cisco/enic/vnic_rq.h | 2 +
9 files changed, 374 insertions(+), 117 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
Powered by blists - more mailing lists