i40e/i40evf: Add support for padding start of frames
authorAlexander Duyck <alexander.h.duyck@intel.com>
Wed, 5 Apr 2017 11:51:02 +0000 (07:51 -0400)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Sat, 8 Apr 2017 09:53:51 +0000 (02:53 -0700)
commitca9ec0888d631c446040a7fab9985afdeb4f73f3
tree8d3039c50ecfee4389540c2c427f918f616b9987
parent98efd69493b9d4b02353a552af8ffaaf30de8af4
i40e/i40evf: Add support for padding start of frames

This patch adds padding to the start of frames to make room for headroom
for us to eventually start using build_skb.  Right now we guarantee at
least NET_SKB_PAD + NET_IP_ALIGN, however we allocate more space if more is
available.  For example on x86 the headroom should be 192 bytes.

On systems that have too large of a cache line size to support storing 1.5K
padding and shared info we default to using 3K buffers and reserve
everything that isn't used for skb_shared_info or the data buffer for
headroom.

Change-ID: I33c641c9a1ea10cf7cc484c2d20985368d2d709a
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>
drivers/net/ethernet/intel/i40e/i40e_main.c
drivers/net/ethernet/intel/i40e/i40e_txrx.c
drivers/net/ethernet/intel/i40e/i40e_txrx.h
drivers/net/ethernet/intel/i40evf/i40e_txrx.c
drivers/net/ethernet/intel/i40evf/i40e_txrx.h
drivers/net/ethernet/intel/i40evf/i40evf_main.c