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 3481F43337 for ; Wed, 15 Nov 2023 12:45:44 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2DB2540294; Wed, 15 Nov 2023 12:45:44 +0100 (CET) Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) by mails.dpdk.org (Postfix) with ESMTP id E5C6340285 for ; Wed, 15 Nov 2023 12:45:42 +0100 (CET) Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-4079ed65582so52071605e9.1 for ; Wed, 15 Nov 2023 03:45:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700048742; x=1700653542; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=SJKig4Bpj0ay8fjrvDI4y1BSIlVl/pd4qWKPlhiLxwU=; b=Whc06qXYiAryl8Acdtkz7f/G+ONe9eImNvb9tQKNZ2CqdWKkdVTdI6b8xH+21MPvu8 sCn4d7TbUxOJxpHmhmuukRfpzDx88QPrrI5dhFpACvls+NElOWga/uwOnzALiEKvANxT Nu2DLxD8GPFze9404jCm5BRVbCThgDZgrRlFswpWmGneTr1y9feGN5HLZmlEXFG70dxU Kl+4VZfvWJENCdkmoZPSmpYXAsquMbByjGi3Tcm12+LEurjKC6Jwp09pu+BfGu9dlKNY XauqUNkh2eQOAtmeESxUwrXDBRI7domsVtRUNo9c1OOkKvYzKVEl1ttPkggUCGIycl7J 1bSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700048742; x=1700653542; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SJKig4Bpj0ay8fjrvDI4y1BSIlVl/pd4qWKPlhiLxwU=; b=YmfWrvm90HYaCCcj38GU52RUOz95mWGeqYgoxfVFy3pZKcot6uSl/PaLvzp2FYzKjU WUBRVtlpdnwZLn+swfkQmLa1nYPimluriEzxNhDsYbGrgqtBzoAk0uL701Nq8QKgAujN iYM52dnrBbdyEeus9GmUsOOqlTutOYiysYkXHJJItubkrM/8lyFDdmkw2Lv8TvFYMcST YmXRYAzEpFvo4iskazaUc26dUV8c+F2veJ1wSJbFu2asnsQToeAhWDBjxyHYX2h8DPaS kL/KCWmZHA6jDVrACoqT+dicu7AV3MEuq++ByWVqm1nbvqA5GTLIc4sQJUVOoVAgH6fe 790Q== X-Gm-Message-State: AOJu0YzJ90oFC0t2Nuw5YL2W51XgH8YW91r2RgAOx7KSM6qvnK1a9SSX O0xxK+ai0pXFPY8f7nHcas+oMGh1Q8FyPw== X-Google-Smtp-Source: AGHT+IHPjJfPAQU2LLAUc2cxodo/yQwvH/rqlJE/MYs2xeprouc8nyntjhbHeXI2Fq+Vfb3l4/onjQ== X-Received: by 2002:a05:600c:5493:b0:40a:437e:30fe with SMTP id iv19-20020a05600c549300b0040a437e30femr10319319wmb.24.1700048742495; Wed, 15 Nov 2023 03:45:42 -0800 (PST) Received: from localhost ([2a01:4b00:d307:1000:f1d3:eb5e:11f4:a7d9]) by smtp.gmail.com with ESMTPSA id i18-20020a5d6312000000b0032d9a1f2ec3sm10389972wru.27.2023.11.15.03.45.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Nov 2023 03:45:41 -0800 (PST) From: luca.boccassi@gmail.com To: Huisong Li Cc: Ferruh Yigit , dpdk stable Subject: patch 'app/testpmd: fix tunnel TSO capability check' has been queued to stable release 20.11.10 Date: Wed, 15 Nov 2023 11:45:08 +0000 Message-Id: <20231115114515.2355140-9-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231115114515.2355140-1-luca.boccassi@gmail.com> References: <20231108192535.922238-37-luca.boccassi@gmail.com> <20231115114515.2355140-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 20.11.10 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/17/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/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/a99c87f3f843863104c0a2816cb3a0e10a89b751 Thanks. Luca Boccassi --- >From a99c87f3f843863104c0a2816cb3a0e10a89b751 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 16b700252f..e8b680defe 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -4938,33 +4938,27 @@ struct cmd_tunnel_tso_set_result { portid_t port_id; }; -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 & DEV_TX_OFFLOAD_VXLAN_TNL_TSO)) + if (!(tx_offload_capa & DEV_TX_OFFLOAD_VXLAN_TNL_TSO)) printf("Warning: VXLAN TUNNEL TSO not supported therefore " "not enabled for port %d\n", port_id); - if (!(dev_info.tx_offload_capa & DEV_TX_OFFLOAD_GRE_TNL_TSO)) + if (!(tx_offload_capa & DEV_TX_OFFLOAD_GRE_TNL_TSO)) printf("Warning: GRE TUNNEL TSO not supported therefore " "not enabled for port %d\n", port_id); - if (!(dev_info.tx_offload_capa & DEV_TX_OFFLOAD_IPIP_TNL_TSO)) + if (!(tx_offload_capa & DEV_TX_OFFLOAD_IPIP_TNL_TSO)) printf("Warning: IPIP TUNNEL TSO not supported therefore " "not enabled for port %d\n", port_id); - if (!(dev_info.tx_offload_capa & DEV_TX_OFFLOAD_GENEVE_TNL_TSO)) + if (!(tx_offload_capa & DEV_TX_OFFLOAD_GENEVE_TNL_TSO)) printf("Warning: GENEVE TUNNEL TSO not supported therefore " "not enabled for port %d\n", port_id); - if (!(dev_info.tx_offload_capa & DEV_TX_OFFLOAD_IP_TNL_TSO)) + if (!(tx_offload_capa & DEV_TX_OFFLOAD_IP_TNL_TSO)) printf("Warning: IP TUNNEL TSO not supported therefore " "not enabled for port %d\n", port_id); - if (!(dev_info.tx_offload_capa & DEV_TX_OFFLOAD_UDP_TNL_TSO)) + if (!(tx_offload_capa & DEV_TX_OFFLOAD_UDP_TNL_TSO)) printf("Warning: UDP TUNNEL TSO not supported therefore " "not enabled for port %d\n", port_id); - return dev_info; } static void @@ -4974,6 +4968,7 @@ 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)) return; @@ -4985,7 +4980,11 @@ cmd_tunnel_tso_set_parsed(void *parsed_result, if (!strcmp(res->mode, "set")) 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 &= ~(DEV_TX_OFFLOAD_VXLAN_TNL_TSO | -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-11-15 11:44:13.978186007 +0000 +++ 0009-app-testpmd-fix-tunnel-TSO-capability-check.patch 2023-11-15 11:44:13.570387532 +0000 @@ -1 +1 @@ -From 6d4def820aa7d118f1ebdebf7af8ba6299ac20ee Mon Sep 17 00:00:00 2001 +From a99c87f3f843863104c0a2816cb3a0e10a89b751 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 16b700252f..e8b680defe 100644 @@ -22 +23 @@ -@@ -5035,39 +5035,33 @@ struct cmd_tunnel_tso_set_result { +@@ -4938,33 +4938,27 @@ struct cmd_tunnel_tso_set_result { @@ -36,30 +37,24 @@ -- 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); +- if (!(dev_info.tx_offload_capa & DEV_TX_OFFLOAD_VXLAN_TNL_TSO)) ++ if (!(tx_offload_capa & DEV_TX_OFFLOAD_VXLAN_TNL_TSO)) + printf("Warning: VXLAN TUNNEL TSO not supported therefore " + "not enabled for port %d\n", port_id); +- if (!(dev_info.tx_offload_capa & DEV_TX_OFFLOAD_GRE_TNL_TSO)) ++ if (!(tx_offload_capa & DEV_TX_OFFLOAD_GRE_TNL_TSO)) + printf("Warning: GRE TUNNEL TSO not supported therefore " + "not enabled for port %d\n", port_id); +- if (!(dev_info.tx_offload_capa & DEV_TX_OFFLOAD_IPIP_TNL_TSO)) ++ if (!(tx_offload_capa & DEV_TX_OFFLOAD_IPIP_TNL_TSO)) + printf("Warning: IPIP TUNNEL TSO not supported therefore " + "not enabled for port %d\n", port_id); +- if (!(dev_info.tx_offload_capa & DEV_TX_OFFLOAD_GENEVE_TNL_TSO)) ++ if (!(tx_offload_capa & DEV_TX_OFFLOAD_GENEVE_TNL_TSO)) + printf("Warning: GENEVE TUNNEL TSO not supported therefore " + "not enabled for port %d\n", port_id); +- if (!(dev_info.tx_offload_capa & DEV_TX_OFFLOAD_IP_TNL_TSO)) ++ if (!(tx_offload_capa & DEV_TX_OFFLOAD_IP_TNL_TSO)) + printf("Warning: IP TUNNEL TSO not supported therefore " + "not enabled for port %d\n", port_id); +- if (!(dev_info.tx_offload_capa & DEV_TX_OFFLOAD_UDP_TNL_TSO)) ++ if (!(tx_offload_capa & DEV_TX_OFFLOAD_UDP_TNL_TSO)) + printf("Warning: UDP TUNNEL TSO not supported therefore " + "not enabled for port %d\n", port_id); @@ -70 +65 @@ -@@ -5077,6 +5071,7 @@ cmd_tunnel_tso_set_parsed(void *parsed_result, +@@ -4974,6 +4968,7 @@ cmd_tunnel_tso_set_parsed(void *parsed_result, @@ -78 +73 @@ -@@ -5088,7 +5083,11 @@ cmd_tunnel_tso_set_parsed(void *parsed_result, +@@ -4985,7 +4980,11 @@ cmd_tunnel_tso_set_parsed(void *parsed_result, @@ -90 +85 @@ - ~(RTE_ETH_TX_OFFLOAD_VXLAN_TNL_TSO | + ~(DEV_TX_OFFLOAD_VXLAN_TNL_TSO |