[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241220215058.11118-1-johndale@cisco.com>
Date: Fri, 20 Dec 2024 13:50:53 -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 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.
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
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 +
8 files changed, 373 insertions(+), 116 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