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 D6E9243345 for ; Thu, 16 Nov 2023 14:25:17 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D099540ED2; Thu, 16 Nov 2023 14:25:17 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 09BAC40DF5 for ; Thu, 16 Nov 2023 14:25:15 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1700141115; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lxldcX6h8bh341Nu3J3G4D2xUD67bbDwSS3hjgE4B3o=; b=cHSivADa3My+fYHpcd/12ORN/5YENeYhlYO2YchJiJL9VsZUGgU5n9JZzxn1hVRM3Tdj6b XIh1HwEC7h+fB/on0fXgDWfDGqtRY7MtauNJcgdFEtNe2Rl+tv3J+g+HrVQQYJkg/asY0I 9m+Wp6TP9P110gNQB1zr36z+0TUcwQo= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-443-CV7sf-vJNTGpWzTs8aa2ZQ-1; Thu, 16 Nov 2023 08:25:12 -0500 X-MC-Unique: CV7sf-vJNTGpWzTs8aa2ZQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3185C1C03162; Thu, 16 Nov 2023 13:25:12 +0000 (UTC) Received: from rh.Home (unknown [10.39.194.169]) by smtp.corp.redhat.com (Postfix) with ESMTP id 627142166B27; Thu, 16 Nov 2023 13:25:11 +0000 (UTC) From: Kevin Traynor To: Huisong Li Cc: Ferruh Yigit , dpdk stable Subject: patch 'app/testpmd: fix tunnel TSO capability check' has been queued to stable release 21.11.6 Date: Thu, 16 Nov 2023 13:23:38 +0000 Message-ID: <20231116132348.557257-56-ktraynor@redhat.com> In-Reply-To: <20231116132348.557257-1-ktraynor@redhat.com> References: <20231116132348.557257-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 21.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/21/23. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/d29fe61592f24e237aad5f4139b8ddd65c805d4d Thanks. Kevin --- >From d29fe61592f24e237aad5f4139b8ddd65c805d4d Mon Sep 17 00:00:00 2001 From: Huisong Li Date: Sat, 11 Nov 2023 12:59:41 +0800 Subject: [PATCH] app/testpmd: fix tunnel TSO capability check [ upstream commit 6d4def820aa7d118f1ebdebf7af8ba6299ac20ee ] Currently, testpmd set tunnel TSO offload even if fail to get dev_info. In this case, the 'tx_offload_capa' in dev_info is a random value, Fixes: 6f51deb903b2 ("app/testpmd: check status of getting ethdev info") Signed-off-by: Huisong Li Reviewed-by: Ferruh Yigit --- app/test-pmd/cmdline.c | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index 8e200c740b..f7b4e319fb 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -5059,37 +5059,31 @@ struct cmd_tunnel_tso_set_result { }; -static struct rte_eth_dev_info -check_tunnel_tso_nic_support(portid_t port_id) +static void +check_tunnel_tso_nic_support(portid_t port_id, uint64_t tx_offload_capa) { - struct rte_eth_dev_info dev_info; - - if (eth_dev_info_get_print_err(port_id, &dev_info) != 0) - return dev_info; - - if (!(dev_info.tx_offload_capa & RTE_ETH_TX_OFFLOAD_VXLAN_TNL_TSO)) + if (!(tx_offload_capa & RTE_ETH_TX_OFFLOAD_VXLAN_TNL_TSO)) fprintf(stderr, "Warning: VXLAN TUNNEL TSO not supported therefore not enabled for port %d\n", port_id); - if (!(dev_info.tx_offload_capa & RTE_ETH_TX_OFFLOAD_GRE_TNL_TSO)) + if (!(tx_offload_capa & RTE_ETH_TX_OFFLOAD_GRE_TNL_TSO)) fprintf(stderr, "Warning: GRE TUNNEL TSO not supported therefore not enabled for port %d\n", port_id); - if (!(dev_info.tx_offload_capa & RTE_ETH_TX_OFFLOAD_IPIP_TNL_TSO)) + if (!(tx_offload_capa & RTE_ETH_TX_OFFLOAD_IPIP_TNL_TSO)) fprintf(stderr, "Warning: IPIP TUNNEL TSO not supported therefore not enabled for port %d\n", port_id); - if (!(dev_info.tx_offload_capa & RTE_ETH_TX_OFFLOAD_GENEVE_TNL_TSO)) + if (!(tx_offload_capa & RTE_ETH_TX_OFFLOAD_GENEVE_TNL_TSO)) fprintf(stderr, "Warning: GENEVE TUNNEL TSO not supported therefore not enabled for port %d\n", port_id); - if (!(dev_info.tx_offload_capa & RTE_ETH_TX_OFFLOAD_IP_TNL_TSO)) + if (!(tx_offload_capa & RTE_ETH_TX_OFFLOAD_IP_TNL_TSO)) fprintf(stderr, "Warning: IP TUNNEL TSO not supported therefore not enabled for port %d\n", port_id); - if (!(dev_info.tx_offload_capa & RTE_ETH_TX_OFFLOAD_UDP_TNL_TSO)) + if (!(tx_offload_capa & RTE_ETH_TX_OFFLOAD_UDP_TNL_TSO)) fprintf(stderr, "Warning: UDP TUNNEL TSO not supported therefore not enabled for port %d\n", port_id); - return dev_info; } @@ -5101,4 +5095,5 @@ cmd_tunnel_tso_set_parsed(void *parsed_result, struct cmd_tunnel_tso_set_result *res = parsed_result; struct rte_eth_dev_info dev_info; + int ret; if (port_id_is_invalid(res->port_id, ENABLED_WARN)) @@ -5112,5 +5107,9 @@ cmd_tunnel_tso_set_parsed(void *parsed_result, ports[res->port_id].tunnel_tso_segsz = res->tso_segsz; - dev_info = check_tunnel_tso_nic_support(res->port_id); + ret = eth_dev_info_get_print_err(res->port_id, &dev_info); + if (ret != 0) + return; + + check_tunnel_tso_nic_support(res->port_id, dev_info.tx_offload_capa); if (ports[res->port_id].tunnel_tso_segsz == 0) { ports[res->port_id].dev_conf.txmode.offloads &= -- 2.41.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-11-16 13:21:53.874947204 +0000 +++ 0056-app-testpmd-fix-tunnel-TSO-capability-check.patch 2023-11-16 13:21:52.545946652 +0000 @@ -1 +1 @@ -From 6d4def820aa7d118f1ebdebf7af8ba6299ac20ee Mon Sep 17 00:00:00 2001 +From d29fe61592f24e237aad5f4139b8ddd65c805d4d Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 6d4def820aa7d118f1ebdebf7af8ba6299ac20ee ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -19 +20 @@ -index d68418bc67..1fffb07db1 100644 +index 8e200c740b..f7b4e319fb 100644 @@ -22 +23 @@ -@@ -5036,37 +5036,31 @@ struct cmd_tunnel_tso_set_result { +@@ -5059,37 +5059,31 @@ struct cmd_tunnel_tso_set_result { @@ -68 +69 @@ -@@ -5078,4 +5072,5 @@ cmd_tunnel_tso_set_parsed(void *parsed_result, +@@ -5101,4 +5095,5 @@ cmd_tunnel_tso_set_parsed(void *parsed_result, @@ -74 +75 @@ -@@ -5089,5 +5084,9 @@ cmd_tunnel_tso_set_parsed(void *parsed_result, +@@ -5112,5 +5107,9 @@ cmd_tunnel_tso_set_parsed(void *parsed_result,