From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 81BFA4256E; Mon, 11 Sep 2023 12:09:59 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1C49A402E7; Mon, 11 Sep 2023 12:09:59 +0200 (CEST) Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by mails.dpdk.org (Postfix) with ESMTP id B6B1B402D6 for ; Mon, 11 Sep 2023 12:09:57 +0200 (CEST) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id A6EE85C00BF; Mon, 11 Sep 2023 06:09:54 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Mon, 11 Sep 2023 06:09:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm1; t= 1694426994; x=1694513394; bh=oysIkzPIT2hdqcbpBVzOQTeomuvWmc84SPM ycm5kTxE=; b=YP14FcIcpncnEFoAMGOeb1k8Nw9Rzc93Ogx2gFZULdJDkkN95E5 rIcVAUi+g5YNVxTTLoxp8DTVdZrISMoIK3YNOFIWmMaFgH4VJIb4LRvjiSaNb0Xx T/cu50buf8P/zzk0caGY8JLwvbsdtP+0JBK3RVKg/CzOiYhvMRHJqzPnYO51ZR4P MUl4kYrpT9zqew9e15BPdZqJJObfo1fADsEh/ZoFvRePnRYLJqwcw51XPQ+sYI9u 1nWyNwiuroZt/RhULNKV8ZBVB3RfhjiQrVxNheN/K0UPrITKb0NRQEGkO+56Qbb1 0Ge3Ml1UtHCHIYghK3ENPmEaddyfVvSPcdw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1694426994; x=1694513394; bh=oysIkzPIT2hdqcbpBVzOQTeomuvWmc84SPM ycm5kTxE=; b=JZ/vXbcMi5Z8DoOQnWkqTjt7ric9EVJrkCCbSmyUmZc6CfMluIR 7LZL6ySPTNffYkDwUzPWSVFbNJLzTPZg157khq01Gnw6cLvtxW1Rd7jBJ77p62ui 9lMc/GDLzpAD90loFqZKeAXDDQgVnqSIIIg2Ci7xmYrWNw4IWULLcl7+vtYgmLma 8zpgcQSB+3SPV0DTAWvLyNGQ9B472xxvAymR9EpeRtPX7n9ge1QA2f7BYzNkXwV1 BZwlp7FCmDJFx86zW6303oSHtLseMmv4LGbrf6feTRa3Mgs/DaQpAkFJZbYQYCk0 dB/C5OTq27Z+jpEFHNWNT7JrAkx4pvmvhhA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudeigedgvdegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkjghfggfgtgesthhqredttddtjeenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpeegtddtleejjeegffekkeektdejvedtheevtdekiedvueeuvdei uddvleevjeeujeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 11 Sep 2023 06:09:53 -0400 (EDT) From: Thomas Monjalon To: Jie Hai , Ajit Khaparde Cc: dev@dpdk.org, Ferruh Yigit , Andrew Rybchenko , liudongdong3@huawei.com, orika@nvidia.com, jerinj@marvell.com Subject: Re: [PATCH v2 1/5] ethdev: support setting and querying RSS algorithm Date: Mon, 11 Sep 2023 12:09:51 +0200 Message-ID: <2002233.kXSN5OTJKJ@thomas> In-Reply-To: References: <20230315110033.30143-1-liudongdong3@huawei.com> <6f9d565d-b9b7-030b-8daf-ffcd4faa39f1@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 09/09/2023 02:01, Ajit Khaparde: > On Fri, Sep 8, 2023 at 1:44=E2=80=AFAM Jie Hai wrote: > > > > Hi, Thomas > > Thanks for your review. > > > > On 2023/9/4 15:45, Thomas Monjalon wrote: > > > 04/09/2023 09:10, Jie Hai: > > >> On 2023/8/30 19:46, Thomas Monjalon wrote: > > >>> 26/08/2023 09:46, Jie Hai: > > > >> + * The *func* field of the *rss_conf* structure indicates the h= ash algorithm > > >>>> + * applied by the RSS hashing. Passing RTE_ETH_HASH_FUNCTION_DEFA= ULT allows > > >>>> + * the PMD to use its best-effort algorithm rather than a specifi= c one. > > >>>> */ > > >>> > > >>> I don't like commenting a field on top of the structure. > > >>> By the way, the first sentence does not look helpful. > > >>> RTE_ETH_HASH_FUNCTION_DEFAULT may be explained in the enum. > > >>> > > >> Other fields above the structure 'rte_eth_rss_conf' have comments. > > >> If the new fields 'func' do not have comments, it may be misleading. > > >> Unless all the comments above are removed. I'm not sure whether to > > >> delete them or not. > > > > > > You should explain RTE_ETH_HASH_FUNCTION_DEFAULT in its enum. > > > The rest of the explanation can be on the struct field. > > > I'm OK to have another patch moving old explanations from the struct > > > to the fields. > > Fixed in V4, please check it. > > > > > >>>> struct rte_eth_rss_conf { > > >>>> uint8_t *rss_key; /**< If not NULL, 40-byte hash key= =2E */ > > >>>> uint8_t rss_key_len; /**< hash key length in bytes. */ > > >>>> uint64_t rss_hf; /**< Hash functions to apply - see= below. */ > > >>>> + enum rte_eth_hash_function func; /**< Hash algorithm to = apply. */ > > >>> > > >>> You can drop "to apply" words. > > >> Fixed in V3. > > >>> > > >>> How the algorithms support combinations in rss_hf? > > >>> > > >> The rss_hf defines the input of the RSS hash algorithms. > > >> For example, rss_hf =3D RTE_ETH_RSS_NONFRAG_IPV4_TCP | RTE_ETH_RSS_I= PV4, > > >> these two kinds of packets can be dispatched to different queues > > >> according to their tuple field value. > > >> For ipv4-tcp packets, src-ip, dst-ip, src-port, dst-port are used as > > >> parameters of RSS hash algorithms to compute hash value. > > >> For ipv4 packets src-ip, dst-ip are used. > > >> > > >> If rss_hf =3D RTE_ETH_RSS_NONFRAG_IPV4_TCP | RTE_ETH_RSS_L4_SRC_ONLY= , for > > >> ipv4-tcp packets, src-port is used as parameters of RSS hash algorit= hms > > >> to compute hash value. > > > > > > I know what is rss_hf. > > > My question is about the algorithms. > > > Do they all support any combination in rss_hf? > > > > > > > > I don't know about all vendors' hardware implementations, > > so here's just my simple opinion. > > > > Theoretically, I think that all algorithms should support all > > combinations in rss_hf, The reasons are as follows. >=20 > Leave it to the driver and hardware to decide what combinations can be > supported. >=20 > > > > 1. The rss_hf and algorithms are independent. For different algorithms > > and the same packets and hash key, the input parameters for different > > algorithms should be the same, which depends on implemetation of hardwa= re. > > > > 2. As long as hardware and driver support, all packet types defined by > > rss_hf could generate the the input parameters for the algorithm to com= pute. How the application can know a hash is not supported with an algo? I guess this is an error code on configure?