i40e: add pre-xdp page_count in rx_buffer
authorTirthendu Sarkar <tirthendu.sarkar@intel.com>
Thu, 9 Mar 2023 18:56:10 +0000 (00:26 +0530)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Thu, 9 Mar 2023 21:11:04 +0000 (13:11 -0800)
commite2843f037127c3a9db26718aaa293d2a8e5881e4
tree699f3110472b452c596d78a71fb84c40223db600
parentf7f732a7196d2e876639b1af453b30a6a5fe4a90
i40e: add pre-xdp page_count in rx_buffer

Page count of rx_buffer needs to be stored prior to XDP call to prevent
page recycling in case that buffer would be freed within xdp redirect
path. Instead of storing it on the stack, now it is stored in the
rx_buffer struct. This will help in processing multi-buffers as the page
counts of all rx_buffers (of the same packet) don't need to be stored on
stack.

Signed-off-by: Tirthendu Sarkar <tirthendu.sarkar@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/i40e/i40e_txrx.c
drivers/net/ethernet/intel/i40e/i40e_txrx.h