iavf: drop page splitting and recycling
authorAlexander Lobakin <aleksander.lobakin@intel.com>
Thu, 18 Apr 2024 11:36:09 +0000 (13:36 +0200)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Wed, 24 Apr 2024 18:06:25 +0000 (11:06 -0700)
commit920d86f3c5529d658bb9576ae9120a2330d9b220
treebdc252cc94c94bd2a971243182ba14c929d57050
parent53844673d555290010dd3d6de1365af72e9839c8
iavf: drop page splitting and recycling

As an intermediate step, remove all page splitting/recycling code. Just
always allocate a new page and don't touch its refcount, so that it gets
freed by the core stack later.
Same for the "in-place" recycling, i.e. when an unused buffer gets
assigned to a first needs-refilling descriptor. In some cases, this
was leading to moving up to 63 &iavf_rx_buf structures around the ring
on a per-field basis -- not something wanted on hotpath.
The change allows to greatly simplify certain parts of the code:

Function: add/remove: 0/2 grow/shrink: 0/7 up/down: 0/-744 (-744)

Although the array of &iavf_rx_buf is barely used now and could be
replaced with just page pointer array, don't touch it now to not
complicate replacing it with libie Rx buffer struct later on.
No surprise perf loses up to 30% here, but that regression will
go away once PP lands.
Note that iavf_rx_pg_*() definitions are left to reduce diffstat.
They will be removed with the conversion to Page Pool.

Signed-off-by: Alexander Lobakin <aleksander.lobakin@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/iavf/iavf_main.c
drivers/net/ethernet/intel/iavf/iavf_txrx.c
drivers/net/ethernet/intel/iavf/iavf_txrx.h
drivers/net/ethernet/intel/iavf/iavf_type.h
drivers/net/ethernet/intel/iavf/iavf_virtchnl.c