OpenCloudOS-Kernel/drivers/net/ethernet/intel
Alexander Duyck c74042f3b3 ixgbe: Limit use of 2K buffers on architectures with 256B or larger cache lines
On architectures that have a cache line size larger than 64 Bytes we start
running into issues where the amount of headroom for the frame starts
shrinking.

The size of skb_shared_info on a system with a 64B L1 cache line size is
320.  This increases to 384 with a 128B cache line, and 512 with a 256B
cache line.

In addition the NET_SKB_PAD value increases as well consistent with the
cache line size.  As a result when we get to a 256B cache line as seen on
the s390 we end up 768 bytes used by padding and shared info leaving us
with only 1280 bytes to use for data storage.  On architectures such as
this we should default to using 3K Rx buffers out of a 8K page instead of
trying to do 1.5K buffers out of a 4K page.

To take all of this into account I have added one small check so that we
compare the max_frame to the amount of actual data we can store.  This was
already occurring for igb, but I had overlooked it for ixgbe as it doesn't
have strict limits for 82599 once we enable jumbo frames.  By adding this
check we will automatically enable 3K Rx buffers as soon as the maximum
frame size we can handle drops below the standard Ethernet MTU.

I also went through and fixed one small typo that I found where I had left
an IGB in a variable name due to a copy/paste error.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2017-03-02 18:03:39 -08:00
..
e1000 e1000: use disable_hardirq() for e1000_netpoll() 2016-12-10 23:31:19 -05:00
e1000e net: Remove usage of net_device last_rx member 2017-01-18 17:22:49 -05:00
fm10k net: make ndo_get_stats64 a void function 2017-01-08 17:51:44 -05:00
i40e scripts/spelling.txt: add "varible" pattern and fix typo instances 2017-02-27 18:43:47 -08:00
i40evf i40e: mark the value passed to csum_replace_by_diff as __wsum 2017-02-18 20:35:36 -08:00
igb scripts/spelling.txt: add "overwritting" pattern and fix typo instances 2017-02-27 18:43:47 -08:00
igbvf Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-12-03 12:29:53 -05:00
ixgb drivers: net: generalize napi_complete_done() 2017-01-30 15:10:42 -05:00
ixgbe ixgbe: Limit use of 2K buffers on architectures with 256B or larger cache lines 2017-03-02 18:03:39 -08:00
ixgbevf ixgbevf: get rid of custom busy polling code 2017-02-03 17:17:53 -05:00
Kconfig ptp_clock: Allow for it to be optional 2016-11-16 09:26:34 +01:00
Makefile fm10k: Add skeletal frame for Intel(R) FM10000 Ethernet Switch Host Interface Driver 2014-09-23 03:59:13 -07:00
e100.c drivers: net: generalize napi_complete_done() 2017-01-30 15:10:42 -05:00