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 6D6AC424EC; Mon, 4 Sep 2023 09:46:01 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 52F22402AF; Mon, 4 Sep 2023 09:46:01 +0200 (CEST) Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) by mails.dpdk.org (Postfix) with ESMTP id C5A0F402AE for ; Mon, 4 Sep 2023 09:45:59 +0200 (CEST) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id EA9F73200094; Mon, 4 Sep 2023 03:45:57 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Mon, 04 Sep 2023 03:45:58 -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= 1693813557; x=1693899957; bh=jpNc8Wdi4iasQn1dBDGiqbMiiWTbJPU1pjK K4rLt+e8=; b=HWBLRHQC8rPCjP6KTow0cunJtiznERhdpDstuBjrXyiCkQxnyjr O3r+Nxsz7Ihvzqq+ufuq1TmjkQK2qx00V4p6q9/Go1zTFgFIkgKKiuA5gaEJKz/m JqkKl6ktz6NDJi17kdX+KXZ6u13mOIuwhGHYXItujOcpaOwSmiz7Cq7HtuRKaPFz YDUzIn7jpN7Sldu4zqBdDWlrl4hP/rA/BB5AiyiZu1ZILzO92FF1BwJrsn0lnuJI HfU8ZsAIul34C8VUGxALGH6+iETjHIWcTpwxLw2PfYOnN1agp4QwUo6J65lrJ3z4 ys80YF+t8Fjz8ZSsKwLn7oUg4xoshTLp0iw== 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= 1693813557; x=1693899957; bh=jpNc8Wdi4iasQn1dBDGiqbMiiWTbJPU1pjK K4rLt+e8=; b=I8WaRLcIQZKLiycnJKbziy2+rA/9pY2KCXVrHv294ieSaNyldGu ma03DkKpGfmDsclFtgZ67MIKKbeejPBqC02Bwps8hgY+WSfcd+iSpPMfOOJjqoJ4 dSqr3Py3Ro8YnjFdWPks3u1oebFQXiyYLQB6+zQ4SpypP65G+lBsw1h5H3tqfrzE S/xz+4XtHCUwAlQg19rBOtG7q2sAOkVA1ttfBF+Ix7VqZW4GajV5erOeP6MF8s/d FUnCgoB4E618dh3e5RMgMjZmnjdpZSth0TTGd1uxy7BXJ32ZPBzpfwtJrrTC3Kqw 6oILZXESROsKNbxoPy/b/NUEkYTL5hfSVnA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudegjedguddvjecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhho mhgrshcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqne cuggftrfgrthhtvghrnheptdejieeifeehtdffgfdvleetueeffeehueejgfeuteeftddt ieekgfekudehtdfgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh hfrhhomhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 4 Sep 2023 03:45:55 -0400 (EDT) From: Thomas Monjalon To: Jie Hai Cc: dev@dpdk.org, Ferruh Yigit , Andrew Rybchenko , liudongdong3@huawei.com, orika@nvidia.com, jerinj@marvell.com, ajit.khaparde@broadcom.com Subject: Re: [PATCH v2 1/5] ethdev: support setting and querying RSS algorithm Date: Mon, 04 Sep 2023 09:45:53 +0200 Message-ID: <2922097.o0KrE1Onz3@thomas> In-Reply-To: <9abeba8a-4596-6e69-ded1-59d7a518b3d7@huawei.com> References: <20230315110033.30143-1-liudongdong3@huawei.com> <1939253.PYKUYFuaPT@thomas> <9abeba8a-4596-6e69-ded1-59d7a518b3d7@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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 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 hash algorithm > >> + * applied by the RSS hashing. Passing RTE_ETH_HASH_FUNCTION_DEFAULT allows > >> + * the PMD to use its best-effort algorithm rather than a specific 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. > >> 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. */ > >> + 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 = RTE_ETH_RSS_NONFRAG_IPV4_TCP | RTE_ETH_RSS_IPV4, > 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 = 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 algorithms > 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?