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 4716542E54; Wed, 12 Jul 2023 16:51:37 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1FEE040A7D; Wed, 12 Jul 2023 16:51:37 +0200 (CEST) Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) by mails.dpdk.org (Postfix) with ESMTP id 69171406BA for ; Wed, 12 Jul 2023 16:51:35 +0200 (CEST) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id 0B4143200900; Wed, 12 Jul 2023 10:51:33 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Wed, 12 Jul 2023 10:51:34 -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=fm2; t= 1689173493; x=1689259893; bh=UQ4/QZktmeUovakGRAcBBVanERCpgWXdcXg PLn0rloA=; b=GWfr9O3K91lNYy/z04WIwIvQPAFoLGu2p6F9jxh6j4gmu9yGC7K fCZMWTfnMxC39TLOWMMpF1rJY5uoEv0XyYjdPdorYXdUNghjc7O4u0xRTCn1gENz lVVQEX+Gn25xZ+9whXxwkDvtN0L57D1WrTNWF94Ki1xhO2LC2XmBCgIczUuI+n66 iExDdom3Yeeddd+OtPfNgZb/yApNLGc6u+B/RtMXFnRYVnno+Wue+jrTQxDfEgx8 QWv7SELGHpO7AoDWu4nr2KS/sX8Rbv9hkC6bo9WtMigOG7Y4qnQsYrOuOQGGWuOd mx7ezuvodiVyPcjK+lIVc+NWem3Qfb/ctzw== 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=fm2; t= 1689173493; x=1689259893; bh=UQ4/QZktmeUovakGRAcBBVanERCpgWXdcXg PLn0rloA=; b=q3TaMRcjwqftHMhMIME4tMYN5u6YkOTdvr5FSob68UYVyYGASrC p8IA/co/GS0en+EKwCnQ9hCOoLvPgdteID4SvDxCzty2zHP1WB7BsBRsPrJq0QDp 98svNmLNHhEcqnDCMyZ6DdeWzpGlzzIf7kFUwAKEt2ieR9A7HSBhbHqJ4hWPzaO1 vBuKdcwDvNXckH0KiANVHWNJp2ECnm0L6X2ihmX4S+9fviV+cUpxiaf736pWRX6o 3+mwox5lyAqcqxMJbeMz5fe08JAKiEkc5Oea3OTCy0LhpMVoUQSZAECpc+0IUD3S 8W1NXHbMmRarF0gxrpy7DHEBKEuqVUV/Xyw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrfedvgdekvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnheptdejieeifeehtdffgfdvleetueeffeehueejgfeuteeftddtieek gfekudehtdfgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 12 Jul 2023 10:51:31 -0400 (EDT) From: Thomas Monjalon To: Cristian Dumitrescu Cc: dev@dpdk.org, nd@arm.com, Feifei Wang , Ruifeng Wang , Trevor Tao Subject: Re: [PATCH] app/test-pipeline: relax RSS hash requirement Date: Wed, 12 Jul 2023 16:51:30 +0200 Message-ID: <2585544.IobQ9Gjlxr@thomas> In-Reply-To: <20230626074538.3354554-1-feifei.wang2@arm.com> References: <20230626074538.3354554-1-feifei.wang2@arm.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 Cristian, any comment? 26/06/2023 09:45, Feifei Wang: > For some drivers which can not support the configured RSS hash functions, > the thread reports 'invalid rss_hf' when doing device configure. > > For example, i40e driver can not support 'RTE_ETH_RSS_IPV4', > 'RTE_ETH_RSS_IPV6' and 'RTE_ETH_RSS_NONFRAG_IPV6_OTHER', thus it can not > run successfully in test-pipeline with XL710 NIC and reports the issue: > ------------------------------------------------------------- > Ethdev port_id=0 invalid rss_hf: 0xa38c, valid value: 0x7ef8 > PANIC in app_init_ports(): > Cannot init NIC port 0 (-22) > ------------------------------------------------------------- > > To fix this, referring to l3fwd operation, adjust the 'rss_hf' based on > device capability and just report a warning. > > Signed-off-by: Feifei Wang > Reviewed-by: Ruifeng Wang > Reviewed-by: Trevor Tao > --- > app/test-pipeline/init.c | 22 +++++++++++++++++++++- > 1 file changed, 21 insertions(+), 1 deletion(-) > > diff --git a/app/test-pipeline/init.c b/app/test-pipeline/init.c > index d146c44be0..84a1734519 100644 > --- a/app/test-pipeline/init.c > +++ b/app/test-pipeline/init.c > @@ -188,21 +188,41 @@ static void > app_init_ports(void) > { > uint32_t i; > + struct rte_eth_dev_info dev_info; > + > > /* Init NIC ports, then start the ports */ > for (i = 0; i < app.n_ports; i++) { > uint16_t port; > int ret; > + struct rte_eth_conf local_port_conf = port_conf; > > port = app.ports[i]; > RTE_LOG(INFO, USER1, "Initializing NIC port %u ...\n", port); > > + ret = rte_eth_dev_info_get(port, &dev_info); > + if (ret != 0) > + rte_panic("Error during getting device (port %u) info: %s\n", > + port, rte_strerror(-ret)); > + > /* Init port */ > + local_port_conf.rx_adv_conf.rss_conf.rss_hf &= > + dev_info.flow_type_rss_offloads; > + if (local_port_conf.rx_adv_conf.rss_conf.rss_hf != > + port_conf.rx_adv_conf.rss_conf.rss_hf) { > + printf("Warning:" > + "Port %u modified RSS hash function based on hardware support," > + "requested:%#"PRIx64" configured:%#"PRIx64"\n", > + port, > + port_conf.rx_adv_conf.rss_conf.rss_hf, > + local_port_conf.rx_adv_conf.rss_conf.rss_hf); > + } > + > ret = rte_eth_dev_configure( > port, > 1, > 1, > - &port_conf); > + &local_port_conf); > if (ret < 0) > rte_panic("Cannot init NIC port %u (%d)\n", port, ret); > >