ice: fix page reuse when PAGE_SIZE is over 8k
authorMaciej Fijalkowski <maciej.fijalkowski@intel.com>
Wed, 7 Aug 2024 10:53:24 +0000 (12:53 +0200)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Tue, 20 Aug 2024 20:19:52 +0000 (13:19 -0700)
commit50b2143356e888777fc5bca023c39f34f404613a
treebbe77ba7fdfb8876d8d9417a453a994ee00d1df3
parent7565c39da89dc6ac9b1b0733bd70276bc66612b1
ice: fix page reuse when PAGE_SIZE is over 8k

Architectures that have PAGE_SIZE >= 8192 such as arm64 should act the
same as x86 currently, meaning reuse of a page should only take place
when no one else is busy with it.

Do two things independently of underlying PAGE_SIZE:
- store the page count under ice_rx_buf::pgcnt
- then act upon its value vs ice_rx_buf::pagecnt_bias when making the
  decision regarding page reuse

Fixes: 2b245cb29421 ("ice: Implement transmit and NAPI support")
Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Tested-by: Chandan Kumar Rout <chandanx.rout@intel.com> (A Contingent Worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice_txrx.c