From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7E290A0518 for ; Fri, 24 Jul 2020 14:02:07 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 714921C030; Fri, 24 Jul 2020 14:02:07 +0200 (CEST) Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by dpdk.org (Postfix) with ESMTP id 2AD601C030 for ; Fri, 24 Jul 2020 14:02:06 +0200 (CEST) Received: by mail-wm1-f68.google.com with SMTP id o2so8053014wmh.2 for ; Fri, 24 Jul 2020 05:02:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=wJZfoEP5Xpxa64ic5DdoXGWpHk+qYng2TfFmrgSGfgU=; b=fL9LaLmNsQWy5wdg6IpMkvFh9LfGemr3Q5vAMS97RyTs2sEVMcJfPi7+VH1EhP33Nq HZ7e1zj0PWgaRHO/c86L0w0f7yWk08Ye5I0jeqsXf1QsyrmW2QKyG7NC/5VDMROqRygr Hn5Oxak/L3xuE7TuWs7vQ2Fqr3g5R7XGR/cDSv9NA2jpQ4jvFwIunO56EfktQOASFfTM K64/bdHQxW7ZKypxzf41EsOrP02he6pIZHSZeQ9vM2Y/4evIQTBCVWHb9Ul6bQacHoU6 HRJQi2KtsXsGSp/ksXNFmcPWfJn2Du/V9jAuP/OuNs22bO3UmosrjQ5uOu3QZE9kX31s UySA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=wJZfoEP5Xpxa64ic5DdoXGWpHk+qYng2TfFmrgSGfgU=; b=uLPxpQFRV1KqUqJx4GNBxDM2Qn+cygUAv/lRGHaSHPKKPp1bvkWSqCC7HKUk0Eh6XZ UxT/oUagQH6EOEo5PiyZd4G7PstGInnz5YJDnZnDbj2ELaSifXNOG4ilrwznca4SQyll dDqmcvpfU0V4lzkVBQ7/OIyPIscvJVmW7txVgj6xezqgw34/BcNSdXDbvzMRyglTFJIA ntzepyed2n5fXGlZ02GjJ6rbI/iLkZCNdQqdsO1k1OP2w6XqoRXk0/n5g8E27bx4hv1z QxS4Y+d/Lln0JN4S+jkqccBocrl5UIkAmRz6oCxnmYZuHPAyD2Kjh88DgdEsPxtHHtCo C06Q== X-Gm-Message-State: AOAM531bvQgHnn3spUgjyv+B15cNevJmxxQKK7iHBOMTFnOGsqgJwlht JTdMC3WsjTASsd5rt8Ka3AI= X-Google-Smtp-Source: ABdhPJzdiugMT0KpLfJM1hSLQpZPip3pTAS7jyH+ANoTYAOPpso05JjSIkhCBTCZyLp4Ls3WL9q7oQ== X-Received: by 2002:a7b:ca4c:: with SMTP id m12mr8532316wml.33.1595592125907; Fri, 24 Jul 2020 05:02:05 -0700 (PDT) Received: from localhost ([2a01:4b00:f419:6f00:7a8e:ed70:5c52:ea3]) by smtp.gmail.com with ESMTPSA id b18sm1091973wrs.46.2020.07.24.05.02.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jul 2020 05:02:04 -0700 (PDT) From: luca.boccassi@gmail.com To: Shy Shyman Cc: Ferruh Yigit , Phil Yang , dpdk stable Date: Fri, 24 Jul 2020 12:57:44 +0100 Message-Id: <20200724120030.1863487-26-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200724120030.1863487-1-luca.boccassi@gmail.com> References: <20200724120030.1863487-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'app/testpmd: fix error detection in MTU command' has been queued to stable release 19.11.4 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 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 Sender: "stable" Hi, FYI, your patch has been queued to stable release 19.11.4 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/26/20. 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. Thanks. Luca Boccassi --- >From 2333f80c8f65ad5dd876f8b03228867f0e5122de Mon Sep 17 00:00:00 2001 From: Shy Shyman Date: Mon, 8 Jun 2020 17:17:47 +0300 Subject: [PATCH] app/testpmd: fix error detection in MTU command [ upstream commit 3b931ddb5e1fe8b29caafbad53738005ee9fef0c ] MTU is used in testpmd to set the maximum payload size for packets. According to testpmd, the setting influence RX only. In rte_ethdev there's no relation between MTU setting and JUMBO offload or rx_max_pkt_len. The previous fix in patch referenced below was meant to update the correlated variables of max_pkt_len and JUMBO offload, but by doing so it assumes that MTU setting can only exist when JUMBO offload supported in the device. For example fail-safe device does supports set MTU and doesn't support JUMBO offload, and in this case, though set MTU succeeds, an error message is still printed since the JUMBO packet offload is disabled. The fix separates the two conditions to make sure the error triggers only in case the set_mtu action actually failed. Fixes: 150c9ac2df13 ("app/testpmd: update Rx offload after setting MTU") Signed-off-by: Shy Shyman Reviewed-by: Ferruh Yigit Reviewed-by: Phil Yang --- app/test-pmd/config.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index d5d246617..e345cea6d 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -1262,8 +1262,9 @@ port_mtu_set(portid_t port_id, uint16_t mtu) return; } diag = rte_eth_dev_set_mtu(port_id, mtu); - if (diag == 0 && - dev_info.rx_offload_capa & DEV_RX_OFFLOAD_JUMBO_FRAME) { + if (diag) + printf("Set MTU failed. diag=%d\n", diag); + else if (dev_info.rx_offload_capa & DEV_RX_OFFLOAD_JUMBO_FRAME) { /* * Ether overhead in driver is equal to the difference of * max_rx_pktlen and max_mtu in rte_eth_dev_info when the @@ -1278,10 +1279,7 @@ port_mtu_set(portid_t port_id, uint16_t mtu) } else rte_port->dev_conf.rxmode.offloads &= ~DEV_RX_OFFLOAD_JUMBO_FRAME; - - return; } - printf("Set MTU failed. diag=%d\n", diag); } /* Generic flow management functions. */ -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-07-24 12:53:49.620698065 +0100 +++ 0026-app-testpmd-fix-error-detection-in-MTU-command.patch 2020-07-24 12:53:48.215005118 +0100 @@ -1,8 +1,10 @@ -From 3b931ddb5e1fe8b29caafbad53738005ee9fef0c Mon Sep 17 00:00:00 2001 +From 2333f80c8f65ad5dd876f8b03228867f0e5122de Mon Sep 17 00:00:00 2001 From: Shy Shyman Date: Mon, 8 Jun 2020 17:17:47 +0300 Subject: [PATCH] app/testpmd: fix error detection in MTU command +[ upstream commit 3b931ddb5e1fe8b29caafbad53738005ee9fef0c ] + MTU is used in testpmd to set the maximum payload size for packets. According to testpmd, the setting influence RX only. In rte_ethdev there's no relation between MTU setting and JUMBO offload @@ -20,7 +22,6 @@ triggers only in case the set_mtu action actually failed. Fixes: 150c9ac2df13 ("app/testpmd: update Rx offload after setting MTU") -Cc: stable@dpdk.org Signed-off-by: Shy Shyman Reviewed-by: Ferruh Yigit @@ -30,10 +31,10 @@ 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c -index 016bcb09c..a7112c998 100644 +index d5d246617..e345cea6d 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c -@@ -1281,8 +1281,9 @@ port_mtu_set(portid_t port_id, uint16_t mtu) +@@ -1262,8 +1262,9 @@ port_mtu_set(portid_t port_id, uint16_t mtu) return; } diag = rte_eth_dev_set_mtu(port_id, mtu); @@ -45,7 +46,7 @@ /* * Ether overhead in driver is equal to the difference of * max_rx_pktlen and max_mtu in rte_eth_dev_info when the -@@ -1297,10 +1298,7 @@ port_mtu_set(portid_t port_id, uint16_t mtu) +@@ -1278,10 +1279,7 @@ port_mtu_set(portid_t port_id, uint16_t mtu) } else rte_port->dev_conf.rxmode.offloads &= ~DEV_RX_OFFLOAD_JUMBO_FRAME;