iavf: switch to Page Pool
authorAlexander Lobakin <aleksander.lobakin@intel.com>
Thu, 18 Apr 2024 11:36:15 +0000 (13:36 +0200)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Wed, 24 Apr 2024 18:06:26 +0000 (11:06 -0700)
commit5fa4caff59f251bf9f766fc48c9f0a774a9216a0
tree233a136a8dab14981031dc37ae849205e29af1b9
parent97cadd3d3ce3df32647011233a35a1597bb7a55b
iavf: switch to Page Pool

Now that the IAVF driver simply uses dev_alloc_page() + free_page() with
no custom recycling logics, it can easily be switched to using Page
Pool / libeth API instead.
This allows to removing the whole dancing around headroom, HW buffer
size, and page order. All DMA-for-device is now done in the PP core,
for-CPU -- in the libeth helper.
Use skb_mark_for_recycle() to bring back the recycling and restore the
performance. Speaking of performance: on par with the baseline and
faster with the PP optimization series applied. But the memory usage for
1500b MTU is now almost 2x lower (x86_64) thanks to allocating a page
every second descriptor.

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_virtchnl.c
include/linux/net/intel/libie/rx.h