From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1E63AA04F3; Sat, 7 Dec 2019 20:57:16 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BCE014C93; Sat, 7 Dec 2019 20:57:14 +0100 (CET) Received: from mail-oi1-f196.google.com (mail-oi1-f196.google.com [209.85.167.196]) by dpdk.org (Postfix) with ESMTP id 9317F1DBC for ; Sat, 7 Dec 2019 20:57:13 +0100 (CET) Received: by mail-oi1-f196.google.com with SMTP id x195so2963556oix.4 for ; Sat, 07 Dec 2019 11:57:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=oDzMeN1jXiB3Lay2/oCs3Eo/EffLtsSfgOoAhk8MbTA=; b=d3uTCKNIYvEBA8ELGSklETCroaj8f6uEaHTsRZVXBtCeZ0EKUPHyP2KC1+yCNrNP29 6hKYPAVG0stmLZ8w/VuLROSLw99PETZFdQ1y+MmitJ9HkZE25p96Tm7iEodQ4uCCOjeu F/JzENSEUWWRPoodgo1FnvsD4a4+mM25kro1Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=oDzMeN1jXiB3Lay2/oCs3Eo/EffLtsSfgOoAhk8MbTA=; b=GbCCbifb1TeC7tNjeTBBj9Xn/NFVLhfIKzfZptzfuERurihj6nbmFjCgBTkCVSDSDP 4Uzg142iuMOJGxXttqj0V9TSoI+zwYsh7GnutCEGGqjtD8aLYQPnqMlrvHHqkp1B4p86 H4gEO1yAp32IuNieAp8v9vKCtWfwz62Fhz+3ON91Znp9/FgQGeYilnnaRWGbjHWa2K4m 3jdM59uBqueUqqtsqc0r9VEtEJuEZHJpO0QSboAR3aY1HMwGJv5v9OiMH5VDN9Rv3wLQ WffXat8u8E3yNCfmztc+ceiud53iK05CTRc+e09eZyi/zj5QTD/XV5kpY8nlxBitUnbf i5Sg== X-Gm-Message-State: APjAAAX3FNwoj0ZApStH4WuW1UQIQnKWjUbUL55jjAhDU1kJx5usRD6p 30JBvTAxgGoioUqKbZnVCiK+am75gtW0cldzjUjqOg== X-Google-Smtp-Source: APXvYqwX5sUj4zCYnYqCNDn175Y3YA6GBwRjZIIY1oIJ+g0YArAL+2ZsL9Ea0RjymSyjUxO7Z0TZw8gywG0GRHNs4cE= X-Received: by 2002:a54:4e94:: with SMTP id c20mr11318670oiy.27.1575748632579; Sat, 07 Dec 2019 11:57:12 -0800 (PST) MIME-Version: 1.0 References: <20191207005919.10962-1-ajit.khaparde@broadcom.com> <20191207005919.10962-2-ajit.khaparde@broadcom.com> <096af21e-a1c7-e19a-04f0-b5bb35e0e4aa@solarflare.com> In-Reply-To: <096af21e-a1c7-e19a-04f0-b5bb35e0e4aa@solarflare.com> From: Ajit Khaparde Date: Sat, 7 Dec 2019 11:56:56 -0800 Message-ID: To: Andrew Rybchenko Cc: dpdk-dev , Ferruh Yigit , Thomas Monjalon Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH 1/3] ethdev: add RSS hash level X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Sat, Dec 7, 2019 at 1:14 AM Andrew Rybchenko wrote: > On 12/7/19 3:59 AM, Ajit Khaparde wrote: > > 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 > > --- > > 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). > > + * > > + * 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 */ > > }; > > I'm not sure that offload flag is required in this case. > I think maximum supported rss_level in dev_info will provide more information and per-queue level does not make sense > in this case. Even if per-queue group control is required, > it should be doable via rte_flow API RSS action. > This is dev config and not flow specific configuration. Ofcourse while passing the rss_config, not all the queues may be specified, but that is not a new behavior and it is upto the application anyway. Are we transitioning the device level configuration to rte_flow/flow based scheme? > > Anyway, it looks like it is ABI breakage with all consequences. > In 64-bit case it is possible to put it before rss_hf to avoid > ABI breakage, but it will break ABI on 32-bit anyway. > Right. I sent the proposal for review early to get it cleaned up and ready when the window opens. > > > /* > > @@ -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 | \ > > > >