From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [148.163.129.52]) by dpdk.org (Postfix) with ESMTP id 83CAF1D27E for ; Fri, 6 Apr 2018 17:41:48 +0200 (CEST) X-Virus-Scanned: Proofpoint Essentials engine Received: from webmail.solarflare.com (uk.solarflare.com [193.34.186.16]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1-us3.ppe-hosted.com (Proofpoint Essentials ESMTP Server) with ESMTPS id 94E5EB40076; Fri, 6 Apr 2018 15:41:46 +0000 (UTC) Received: from [192.168.38.17] (84.52.114.114) by ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server (TLS) id 15.0.1044.25; Fri, 6 Apr 2018 16:41:39 +0100 To: Adrien Mazarguil , Thomas Monjalon , Ferruh Yigit , CC: Wenzhuo Lu , Jingjing Wu , Beilei Xing , Qi Zhang , Konstantin Ananyev , Nelio Laranjeiro , Yongseok Koh , Pascal Mazon References: <20180404150312.12304-1-adrien.mazarguil@6wind.com> <20180406131736.19145-1-adrien.mazarguil@6wind.com> <20180406131736.19145-9-adrien.mazarguil@6wind.com> From: Andrew Rybchenko Message-ID: Date: Fri, 6 Apr 2018 18:41:35 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180406131736.19145-9-adrien.mazarguil@6wind.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-GB X-Originating-IP: [84.52.114.114] X-ClientProxiedBy: ocex03.SolarFlarecom.com (10.20.40.36) To ukex01.SolarFlarecom.com (10.17.10.4) X-TM-AS-Product-Ver: SMEX-11.0.0.1191-8.100.1062-23766.003 X-TM-AS-Result: No--13.210300-0.000000-31 X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No X-MDID: 1523029307-8i47J91gNPZf 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: Fri, 06 Apr 2018 15:41:48 -0000 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. 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; } > + return -EINVAL; > + > if ((rss->types & ~SFC_RSS_OFFLOADS) != 0) > return -EINVAL; > <...>