linux/drivers/net/ethernet/intel/ice
Maciej Fijalkowski 7237f5b0db ice: introduce legacy Rx flag
Add an ethtool "legacy-rx" priv flag for toggling the Rx path. This
control knob will be mainly used for build_skb usage as well as buffer
size/MTU manipulation.

In preparation for adding build_skb support in a way that it takes
care of how we set the values of max_frame and rx_buf_len fields of
struct ice_vsi. Specifically, in this patch mentioned fields are set to
values that will allow us to provide headroom and tailroom in-place.

This can be mostly broken down onto following:
- for legacy-rx "on" ethtool control knob, old behaviour is kept;
- for standard 1500 MTU size configure the buffer of size 1536, as
  network stack is expecting the NET_SKB_PAD to be provided and
  NET_IP_ALIGN can have a non-zero value (these can be typically equal
  to 32 and 2, respectively);
- for larger MTUs go with max_frame set to 9k and configure the 3k
  buffer in case when PAGE_SIZE of underlying arch is less than 8k; 3k
  buffer is implying the need for order 1 page, so that our page
  recycling scheme can still be applied;

With that said, substitute the hardcoded ICE_RXBUF_2048 and PAGE_SIZE
values in DMA API that we're making use of with rx_ring->rx_buf_len and
ice_rx_pg_size(rx_ring). The latter is an introduced helper for
determining the page size based on its order (which was figured out via
ice_rx_pg_order). Last but not least, take care of truesize calculation.

In the followup patch the headroom/tailroom computation logic will be
introduced.

This change aligns the buffer and frame configuration with other Intel
drivers, most importantly with iavf.

Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2019-11-04 13:09:46 -08:00
..
ice_adminq_cmd.h ice: Implement Dynamic Device Personalization (DDP) download 2019-09-12 11:19:16 -07:00
ice_base.c ice: Add support for AF_XDP 2019-11-04 12:01:55 -08:00
ice_base.h ice: get rid of per-tc flow in Tx queue configuration routines 2019-11-04 10:03:14 -08:00
ice_common.c ice: Enable DDP package download 2019-09-12 11:37:38 -07:00
ice_common.h ice: Enable DDP package download 2019-09-12 11:37:38 -07:00
ice_controlq.c ice: separate out control queue lock creation 2019-07-31 10:23:04 -07:00
ice_controlq.h ice: Trivial cosmetic changes 2019-05-30 10:57:55 -07:00
ice_dcb_lib.c ice: Enable DDP package download 2019-09-12 11:37:38 -07:00
ice_dcb_lib.h ice: Introduce ice_base.c 2019-11-04 10:03:14 -08:00
ice_dcb.c ice: Allow for delayed LLDP MIB change registration 2019-09-05 08:13:41 -07:00
ice_dcb.h ice: Allow for delayed LLDP MIB change registration 2019-09-05 08:13:41 -07:00
ice_devids.h ice: Change device ID define names to align with branding string 2018-10-24 13:53:30 -07:00
ice_ethtool.c ice: introduce legacy Rx flag 2019-11-04 13:09:46 -08:00
ice_flex_pipe.c ice: Enable DDP package download 2019-09-12 11:37:38 -07:00
ice_flex_pipe.h ice: Enable DDP package download 2019-09-12 11:37:38 -07:00
ice_flex_type.h ice: Initialize DDP package structures 2019-09-12 11:28:40 -07:00
ice_hw_autogen.h ice: Implement Dynamic Device Personalization (DDP) download 2019-09-12 11:19:16 -07:00
ice_lan_tx_rx.h ice: update Tx context struct 2019-09-05 08:13:41 -07:00
ice_lib.c ice: introduce legacy Rx flag 2019-11-04 13:09:46 -08:00
ice_lib.h ice: Add support for AF_XDP 2019-11-04 12:01:55 -08:00
ice_main.c ice: Add support for AF_XDP 2019-11-04 12:01:55 -08:00
ice_nvm.c ice: Add handler for ethtool selftest 2019-05-29 02:44:12 -07:00
ice_osdep.h ice: Start hardware initialization 2018-03-26 09:59:08 -07:00
ice_sched.c ice: Check root pointer for validity 2019-09-05 08:13:40 -07:00
ice_sched.h ice: Add code for DCB initialization part 3/4 2019-04-18 08:38:47 -07:00
ice_sriov.c ice: Add support for new PHY types 2019-01-15 12:38:44 -08:00
ice_sriov.h ice: Add handlers for VF netdevice operations 2018-10-03 07:42:30 -07:00
ice_status.h ice: Add handler for ethtool selftest 2019-05-29 02:44:12 -07:00
ice_switch.c ice: Fix resource leak in ice_remove_rule_internal() 2019-09-03 16:08:54 -07:00
ice_switch.h ice: Minor cleanup in ice_switch.h 2019-05-29 02:55:34 -07:00
ice_txrx_lib.c ice: Move common functions to ice_txrx_lib.c 2019-11-04 11:45:05 -08:00
ice_txrx_lib.h ice: Move common functions to ice_txrx_lib.c 2019-11-04 11:45:05 -08:00
ice_txrx.c ice: introduce legacy Rx flag 2019-11-04 13:09:46 -08:00
ice_txrx.h ice: introduce legacy Rx flag 2019-11-04 13:09:46 -08:00
ice_type.h ice: Implement Dynamic Device Personalization (DDP) download 2019-09-12 11:19:16 -07:00
ice_virtchnl_pf.c ice: Introduce ice_base.c 2019-11-04 10:03:14 -08:00
ice_virtchnl_pf.h ice: add support for virtchnl_queue_select.[tx|rx]_queues bitmap 2019-08-26 23:37:16 -07:00
ice_xsk.c ice: Add support for AF_XDP 2019-11-04 12:01:55 -08:00
ice_xsk.h ice: Add support for AF_XDP 2019-11-04 12:01:55 -08:00
ice.h ice: introduce legacy Rx flag 2019-11-04 13:09:46 -08:00
Makefile ice: Add support for AF_XDP 2019-11-04 12:01:55 -08:00