All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bowers, AndrewX <andrewx.bowers@intel.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [PATCH S30 v2 6/9] ice: introduce legacy Rx flag
Date: Fri, 18 Oct 2019 00:17:33 +0000	[thread overview]
Message-ID: <171bb77aaeae4e6780cd0c9a7d6402f1@intel.com> (raw)
In-Reply-To: <20191016150201.41597-6-anthony.l.nguyen@intel.com>

> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On
> Behalf Of Tony Nguyen
> Sent: Wednesday, October 16, 2019 8:02 AM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [PATCH S30 v2 6/9] ice: introduce legacy Rx flag
> 
> From: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
> 
> 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>
> ---
>  drivers/net/ethernet/intel/ice/ice.h         |  1 +
>  drivers/net/ethernet/intel/ice/ice_ethtool.c |  6 +++
>  drivers/net/ethernet/intel/ice/ice_lib.c     | 22 +++++++---
>  drivers/net/ethernet/intel/ice/ice_txrx.c    | 46 ++++++++++++--------
>  drivers/net/ethernet/intel/ice/ice_txrx.h    | 13 ++++++
>  5 files changed, 63 insertions(+), 25 deletions(-)

Tested-by: Andrew Bowers <andrewx.bowers@intel.com>



  reply	other threads:[~2019-10-18  0:17 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-16 15:01 [Intel-wired-lan] [PATCH S30 v2 1/9] ice: Introduce ice_base.c Tony Nguyen
2019-10-16 15:01 ` [Intel-wired-lan] [PATCH S30 v2 2/9] ice: get rid of per-tc flow in Tx queue configuration routines Tony Nguyen
2019-10-18  0:15   ` Bowers, AndrewX
2019-10-16 15:01 ` [Intel-wired-lan] [PATCH S30 v2 3/9] ice: Add support for XDP Tony Nguyen
2019-10-18  0:16   ` Bowers, AndrewX
2019-10-16 15:01 ` [Intel-wired-lan] [PATCH S30 v2 4/9] ice: Move common functions to ice_txrx_lib.c Tony Nguyen
2019-10-18  0:16   ` Bowers, AndrewX
2019-10-16 15:01 ` [Intel-wired-lan] [PATCH S30 v2 5/9] ice: Add support for AF_XDP Tony Nguyen
2019-10-18  0:17   ` Bowers, AndrewX
2019-10-16 15:01 ` [Intel-wired-lan] [PATCH S30 v2 6/9] ice: introduce legacy Rx flag Tony Nguyen
2019-10-18  0:17   ` Bowers, AndrewX [this message]
2019-10-16 15:01 ` [Intel-wired-lan] [PATCH S30 v2 7/9] ice: introduce frame padding computation logic Tony Nguyen
2019-10-18  0:17   ` Bowers, AndrewX
2019-10-16 15:02 ` [Intel-wired-lan] [PATCH S30 v2 8/9] ice: add build_skb() support Tony Nguyen
2019-10-18  0:18   ` Bowers, AndrewX
2019-10-16 15:02 ` [Intel-wired-lan] [PATCH S30 v2 9/9] ice: allow 3k MTU for XDP Tony Nguyen
2019-10-18  0:18   ` Bowers, AndrewX
2019-10-18  0:15 ` [Intel-wired-lan] [PATCH S30 v2 1/9] ice: Introduce ice_base.c Bowers, AndrewX

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=171bb77aaeae4e6780cd0c9a7d6402f1@intel.com \
    --to=andrewx.bowers@intel.com \
    --cc=intel-wired-lan@osuosl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.