diff options
author | Tirthendu Sarkar <tirthendu.sarkar@intel.com> | 2023-03-09 21:56:10 +0300 |
---|---|---|
committer | Tony Nguyen <anthony.l.nguyen@intel.com> | 2023-03-10 00:11:04 +0300 |
commit | e2843f037127c3a9db26718aaa293d2a8e5881e4 (patch) | |
tree | 699f3110472b452c596d78a71fb84c40223db600 /drivers/net/ethernet/intel/i40e/i40e_txrx.h | |
parent | f7f732a7196d2e876639b1af453b30a6a5fe4a90 (diff) | |
download | linux-e2843f037127c3a9db26718aaa293d2a8e5881e4.tar.xz |
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>
Diffstat (limited to 'drivers/net/ethernet/intel/i40e/i40e_txrx.h')
-rw-r--r-- | drivers/net/ethernet/intel/i40e/i40e_txrx.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.h b/drivers/net/ethernet/intel/i40e/i40e_txrx.h index 768290dc6f48..eec4a4a99b9c 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_txrx.h +++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.h @@ -277,6 +277,7 @@ struct i40e_rx_buffer { struct page *page; __u32 page_offset; __u16 pagecnt_bias; + __u32 page_count; }; struct i40e_queue_stats { |