]> git.baikalelectronics.ru Git - kernel.git/commit
ixgbe: store the result of ixgbe_rx_offset() onto ixgbe_ring
authorMaciej Fijalkowski <maciej.fijalkowski@intel.com>
Mon, 18 Jan 2021 15:13:18 +0000 (16:13 +0100)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Fri, 12 Feb 2021 18:40:03 +0000 (10:40 -0800)
commitb253c51cbe6c38b4b25d669ede89d952bab6b8c6
tree7bb95ab7f756ae95a7ba52c7054361ba09dca10f
parent498dc0b568bc092b1432d885a6b1734f3817750d
ixgbe: store the result of ixgbe_rx_offset() onto ixgbe_ring

Output of ixgbe_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 ixgbe_ring that is meant to hold the
ixgbe_rx_offset() result and use it within ixgbe_clean_rx_irq().
Furthermore, use it within ixgbe_alloc_mapped_page().

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

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/ixgbe/ixgbe.h
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c