All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ananyev, Konstantin" <konstantin.ananyev@intel.com>
To: Ajit Khaparde <ajit.khaparde@broadcom.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Cc: "Yigit, Ferruh" <ferruh.yigit@intel.com>
Subject: Re: [dpdk-dev] [PATCH 1/3] ethdev: add RSS hash level
Date: Sun, 8 Dec 2019 18:02:53 +0000	[thread overview]
Message-ID: <BN7PR11MB25471087EACCAD267BD3A2B69A590@BN7PR11MB2547.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20191207005919.10962-2-ajit.khaparde@broadcom.com>

Hi Ajit,

> This patch adds ability to configure RSS hash level in hardware.
> This feature will allow an application to select RSS hash calculation
> on outer or inner headers for tunneled packets.
> 
> Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
> ---
>  lib/librte_ethdev/rte_ethdev.h | 27 +++++++++++++++++++++++++++
>  1 file changed, 27 insertions(+)
> 
> diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
> index 18a9defc2..5189bdbab 100644
> --- a/lib/librte_ethdev/rte_ethdev.h
> +++ b/lib/librte_ethdev/rte_ethdev.h
> @@ -444,11 +444,35 @@ struct rte_vlan_filter_conf {
>   * The *rss_hf* field of the *rss_conf* structure indicates the different
>   * types of IPv4/IPv6 packets to which the RSS hashing must be applied.
>   * Supplying an *rss_hf* equal to zero disables the RSS feature.
> + *
> + * The *rss_level* field of the *rss_conf* structure indicates the
> + * Packet encapsulation level RSS hash @p types apply to.
> + *
> + * - @p 0 requests the default behavior. Depending on the packet
> + *   type, it can mean outermost, innermost, anything in between or
> + *   even no RSS.
> + *
> + *   It basically stands for the innermost encapsulation level RSS
> + *   can be performed on according to PMD and device capabilities.
> + *
> + * - @p 1 requests RSS to be performed on the outermost packet
> + *   encapsulation level.
> + *
> + * - @p 2 and subsequent values request RSS to be performed on the
> + *   specified inner packet encapsulation level, from outermost to
> + *   innermost (lower to higher values).

If it is just to add ability to do rss over inner header, then do we really need
all this concept of 'levels'?
Might be just:

#define DEV_RX_OFFLOAD_RSS_HASH		0x00080000
+#define DEV_RX_OFFLOAD_RSS_HASH_INNER	0x00100000 

and uint8_t in rte_eth_rss_conf (between key_len and rss_hf) to indicate
inner/outer?

> + *
> + * Support for values other than @p 0 is dependent on the underlying
> + * hardware in use.
> + *
> + * Requesting a specific RSS level on unrecognized traffic results
> + * in undefined behavior.
>   */
>  struct rte_eth_rss_conf {
>  	uint8_t *rss_key;    /**< If not NULL, 40-byte hash key. */
>  	uint8_t rss_key_len; /**< hash key length in bytes. */
>  	uint64_t rss_hf;     /**< Hash functions to apply - see below. */
> +	uint32_t rss_level;  /**< RSS hash level */
>  };
> 
>  /*
> @@ -599,6 +623,8 @@ rte_eth_rss_hf_refine(uint64_t rss_hf)
>  	ETH_RSS_GENEVE | \
>  	ETH_RSS_NVGRE)
> 
> +#define ETH_RSS_LEVEL_DEFAULT	0
> +
>  /*
>   * Definitions used for redirection table entry size.
>   * Some RSS RETA sizes may not be supported by some drivers, check the
> @@ -1103,6 +1129,7 @@ struct rte_eth_conf {
>  #define DEV_RX_OFFLOAD_SCTP_CKSUM	0x00020000
>  #define DEV_RX_OFFLOAD_OUTER_UDP_CKSUM  0x00040000
>  #define DEV_RX_OFFLOAD_RSS_HASH		0x00080000
> +#define DEV_RX_OFFLOAD_RSS_LEVEL	0x00100000
> 
>  #define DEV_RX_OFFLOAD_CHECKSUM (DEV_RX_OFFLOAD_IPV4_CKSUM | \
>  				 DEV_RX_OFFLOAD_UDP_CKSUM | \
> --
> 2.21.0 (Apple Git-122.2)


  parent reply	other threads:[~2019-12-08 18:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-07  0:59 [dpdk-dev] [PATCH 0/3] add support for RSS level Ajit Khaparde
2019-12-07  0:59 ` [dpdk-dev] [PATCH 1/3] ethdev: add RSS hash level Ajit Khaparde
2019-12-07  9:13   ` Andrew Rybchenko
2019-12-07 19:56     ` Ajit Khaparde
2019-12-09  7:35       ` Andrew Rybchenko
2019-12-09 14:41         ` Ferruh Yigit
2019-12-07 22:27   ` Stephen Hemminger
2019-12-08 18:02   ` Ananyev, Konstantin [this message]
2019-12-07  0:59 ` [dpdk-dev] [PATCH 2/3] app/testpmd: support RSS hash level setting Ajit Khaparde
2019-12-07  0:59 ` [dpdk-dev] [PATCH 3/3] net/bnxt: add support to set RSS hash level Ajit Khaparde

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=BN7PR11MB25471087EACCAD267BD3A2B69A590@BN7PR11MB2547.namprd11.prod.outlook.com \
    --to=konstantin.ananyev@intel.com \
    --cc=ajit.khaparde@broadcom.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    /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.