From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com [74.125.82.67]) by dpdk.org (Postfix) with ESMTP id 65EEF1B73F for ; Mon, 9 Apr 2018 16:41:38 +0200 (CEST) Received: by mail-wm0-f67.google.com with SMTP id r82so17406299wme.0 for ; Mon, 09 Apr 2018 07:41:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=QnlCdGy2FqO7DT9If3I8mVPfoLWmSDLvoUfuJ8Pjkpo=; b=mll22g5kJ8JdRh06AzNlT6v+MXx9VQg5Y9LPGVhs9Vnv4cPDvXIB+wGw2tT+43pATx d4+tYVf44S9uu/GemdT+VLVA3S8ZXd+OsUm+GQ3TW/JCEMvLOTkFnddKIbNO5ts4Zb+H 2hYSNe3sXDpCrr5BFL613NGoHIEB3+C5okQqkL808YMvzsLpweqG1QHW1JtG7zpUMnAh SZEU4n8/x+m4mfG0YtPPjr/tjZ3Zvg3I3UouFyTG78JtxPnsNDi31Yw1eYSEJgWzHyqV QzS6lyfXBSPDqnXur/Pj5d69eXd4Rmn5cJ2NEdNA079LIREdLr13+wdSN191GU4sUK0C V0Bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=QnlCdGy2FqO7DT9If3I8mVPfoLWmSDLvoUfuJ8Pjkpo=; b=Ezr2yfF8ORv+1ekyE0h60z4v5IDvAV1HdwXITB+P7sUnqk8nzfUDwbovl1mo7ZIL6p j0Uw/86p+TL8a/3VtKRUUeYZ885YysF5oHCIV9zj2Ya+ejtG96cAYNxf1nfq87zptynP IMMBOk7kw+wN8TXjEnj0ChbS9m1wC+NdRRMk21k9+YDqTJm/2On9RnsRs3pwXz7oUCgP i9o0XwYKfVAvjEKgTde4jfL26TjaFJ4/NQB5pGxPN8wtU58kz29MXaokCmhGJL4SM/sK HtVi1EXuIy7/nVDsWma/gMx1qM6B3yo8PoAa7rQ/DK3jBajN0iWKzpqB8nAZL5TLJZd4 BUpQ== X-Gm-Message-State: ALQs6tC04IoPMkE6vrVxlNUSbYVWJq1wf9DPIgsZF7PIBY6qRG67AoT6 TbIuS+8RO99kAS2GJiPYuhx+Dg== X-Google-Smtp-Source: AIpwx4/+EhgwV9Fd4MNoXsUIGoi/VZIJ0P+GVOaXs6/W0dm7p0QZP4pYeZOYqd2KIevmUF86EpxLPA== X-Received: by 10.28.184.204 with SMTP id i195mr169893wmf.15.1523284898149; Mon, 09 Apr 2018 07:41:38 -0700 (PDT) Received: from 6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id v75sm562301wrc.90.2018.04.09.07.41.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Apr 2018 07:41:37 -0700 (PDT) Date: Mon, 9 Apr 2018 16:41:24 +0200 From: Adrien Mazarguil To: Andrew Rybchenko Cc: Thomas Monjalon , Ferruh Yigit , dev@dpdk.org, Wenzhuo Lu , Jingjing Wu , Beilei Xing , Qi Zhang , Konstantin Ananyev , Nelio Laranjeiro , Yongseok Koh , Pascal Mazon Message-ID: <20180409144124.GX4957@6wind.com> References: <20180404150312.12304-1-adrien.mazarguil@6wind.com> <20180406131736.19145-1-adrien.mazarguil@6wind.com> <20180406131736.19145-9-adrien.mazarguil@6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Subject: Re: [dpdk-dev] [PATCH v2 08/15] ethdev: add hash function to RSS flow API action 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: , X-List-Received-Date: Mon, 09 Apr 2018 14:41:38 -0000 On Fri, Apr 06, 2018 at 06:41:35PM +0300, Andrew Rybchenko wrote: > On 04/06/2018 04:25 PM, Adrien Mazarguil wrote: > > By definition, RSS involves some kind of hash algorithm, usually Toeplitz. > > > > Until now it could not be modified on a flow rule basis and PMDs had to > > always assume RTE_ETH_HASH_FUNCTION_DEFAULT, which remains the default > > behavior when unspecified (0). > > > > This breaks ABI compatibility for the following public functions: > > > > - rte_flow_copy() > > - rte_flow_create() > > - rte_flow_query() > > - rte_flow_validate() > > > > Signed-off-by: Adrien Mazarguil > > Cc: Ferruh Yigit > > Cc: Thomas Monjalon > > Cc: Wenzhuo Lu > > Cc: Jingjing Wu > > Cc: Beilei Xing > > Cc: Qi Zhang > > Cc: Konstantin Ananyev > > Cc: Nelio Laranjeiro > > Cc: Yongseok Koh > > Cc: Andrew Rybchenko > > Cc: Pascal Mazon > > --- > > app/test-pmd/cmdline_flow.c | 72 ++++++++++++++++++++++++ > > app/test-pmd/config.c | 1 + > > doc/guides/prog_guide/rte_flow.rst | 2 + > > doc/guides/testpmd_app_ug/testpmd_funcs.rst | 3 + > > drivers/net/e1000/igb_flow.c | 4 ++ > > drivers/net/e1000/igb_rxtx.c | 4 +- > > drivers/net/i40e/i40e_ethdev.c | 4 +- > > drivers/net/i40e/i40e_flow.c | 4 ++ > > drivers/net/ixgbe/ixgbe_flow.c | 4 ++ > > drivers/net/ixgbe/ixgbe_rxtx.c | 4 +- > > drivers/net/mlx4/mlx4_flow.c | 7 +++ > > drivers/net/mlx5/mlx5_flow.c | 13 +++++ > > drivers/net/sfc/sfc_flow.c | 3 + > > drivers/net/tap/tap_flow.c | 6 ++ > > lib/librte_ether/rte_flow.c | 1 + > > lib/librte_ether/rte_flow.h | 2 + > > 16 files changed, 131 insertions(+), 3 deletions(-) > > <...> > > > diff --git a/drivers/net/sfc/sfc_flow.c b/drivers/net/sfc/sfc_flow.c > > index 1a2c0299c..dbe4c2baa 100644 > > --- a/drivers/net/sfc/sfc_flow.c > > +++ b/drivers/net/sfc/sfc_flow.c > > @@ -1261,6 +1261,9 @@ sfc_flow_parse_rss(struct sfc_adapter *sa, > > rxq_hw_index_max = rxq->hw_index; > > } > > + if (rss->func) > > May be it is better to compare with RTE_ETH_HASH_FUNCTION_DEFAULT > explicitly? I think it is more readable. If so, it is applicable to all > similar checks > in the patch. Good suggestion, although RTE_ETH_HASH_FUNCTION_DEFAULT can't be anything other than 0 for various reasons, I'll clarify (most of) the code in my next update. > In the case of sfc, please, allow RTE_ETH_HASH_FUNCTION_TOEPLITZ as well. > I'd suggest: > switch (rss->func) { > case RTE_ETH_HASH_FUNCTION_DEFAULT: > case RTE_ETH_HASH_FUNCTION_TOEPLITZ: >       break; > default: >       return -EINVAL; > } I'll add it, thanks. -- Adrien Mazarguil 6WIND