]> git.baikalelectronics.ru Git - kernel.git/commit
i40e: store the result of i40e_rx_offset() onto i40e_ring
authorMaciej Fijalkowski <maciej.fijalkowski@intel.com>
Mon, 18 Jan 2021 15:13:16 +0000 (16:13 +0100)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Fri, 12 Feb 2021 18:35:13 +0000 (10:35 -0800)
commit5e1b7d2f995de5453a386b572b4528b72476b440
treebc7d5ed66636e0b03c4e71437b77554b7b7f2391
parente500f50bac2b7ba6d625b84ac7eeb19775503331
i40e: store the result of i40e_rx_offset() onto i40e_ring

Output of i40e_rx_offset() is based on ethtool's priv flag setting,
which when changed, causes PF reset (disables napi, frees irqs, loads
different Rx mem model, etc.). This means that within napi its result is
constant and there is no reason to call it per each processed frame.

Add new 'rx_offset' field to i40e_ring that is meant to hold the
i40e_rx_offset() result and use it within i40e_clean_rx_irq().
Furthermore, use it within i40e_alloc_mapped_page().

Last but not least, un-inline the function of interest so that compiler
makes the decision about inlining as it lives in .c file.

Reviewed-by: Björn Töpel <bjorn.topel@intel.com>
Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Tested-by: Tony Brelinski <tonyx.brelinski@intel.com>
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