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 F1F68A054C for ; Fri, 14 Feb 2020 18:05:40 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DC5D4F72; Fri, 14 Feb 2020 18:05:40 +0100 (CET) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by dpdk.org (Postfix) with ESMTP id 17BF3F72 for ; Fri, 14 Feb 2020 18:05:39 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581699939; 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=r1PpLjXFQ8uL+VgDhS2/l0C7LhVHC02YT0W5DDaERks=; b=dmbkWW42uUbErk7zUxEtfpm9ArGIWv3rMCQUon3KRv9t7RkRk4lxYVmWLuD1sj1raPIrI+ SkLtp6JJG4ZLOejjj69R9VoeIyrm7eNNhE3o9XT25NyLl9v5gNLh2fYfx02WXR8KXhv+4n 7dc4QzruPINq+v6ExHo2Jrz3mfIGiuI= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-245--ulek7FhPAO4ba6K1Rhj0A-1; Fri, 14 Feb 2020 12:05:34 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 75340107ACC4; Fri, 14 Feb 2020 17:05:32 +0000 (UTC) Received: from rh.redhat.com (unknown [10.33.36.13]) by smtp.corp.redhat.com (Postfix) with ESMTP id E287A84BCD; Fri, 14 Feb 2020 17:05:26 +0000 (UTC) From: Kevin Traynor To: "Wei Hu (Xavier)" Cc: Huisong Li , Xuan Li , Ferruh Yigit , dpdk stable Date: Fri, 14 Feb 2020 17:03:22 +0000 Message-Id: <20200214170337.25093-28-ktraynor@redhat.com> In-Reply-To: <20200214170337.25093-1-ktraynor@redhat.com> References: <20200214170337.25093-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-MC-Unique: -ulek7FhPAO4ba6K1Rhj0A-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Subject: [dpdk-stable] patch 'app/testpmd: fix initial value when setting PFC' has been queued to LTS release 18.11.7 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 LTS release 18.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/20/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 rebasi= ng (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-queue This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable-queue/commit/0592a1a35d1f51c5d5= 0dfd86ecc26f3484fe3ab0 Thanks. Kevin. --- >From 0592a1a35d1f51c5d50dfd86ecc26f3484fe3ab0 Mon Sep 17 00:00:00 2001 From: "Wei Hu (Xavier)" Date: Tue, 21 Jan 2020 19:44:32 +0800 Subject: [PATCH] app/testpmd: fix initial value when setting PFC [ upstream commit 3b687ec6e11b506bd9971b6ac536f6d89f5c6d56 ] Currently, the initial values of the local structure variable named rx_tx_onoff_2_lfc_mode and rx_tx_onoff_2_pfc_mode are different in the similar part of these two following functions: =09cmd_link_flow_ctrl_set_parsed =09cmd_priority_flow_ctrl_set_parsed 1) The code snippset in cmd_link_flow_ctrl_set_parsed function: =09static enum rte_eth_fc_mode rx_tx_onoff_2_lfc_mode[2][2] =3D { =09 {RTE_FC_NONE, RTE_FC_TX_PAUSE}, {RTE_FC_RX_PAUSE, RTE_FC_FULL} =09}; =09if (!cmd || cmd =3D=3D &cmd_link_flow_control_set_rx) =09=09rx_fc_en =3D (!strcmp(res->rx_lfc_mode, "on")) ? 1 : 0; =09if (!cmd || cmd =3D=3D &cmd_link_flow_control_set_tx) =09=09tx_fc_en =3D (!strcmp(res->tx_lfc_mode, "on")) ? 1 : 0; =09fc_conf.mode =3D rx_tx_onoff_2_lfc_mode[rx_fc_en][tx_fc_en]; =09<...> =09ret =3D rte_eth_dev_flow_ctrl_set(res->port_id, &fc_conf); =09<...> 2) The code snippset in cmd_priority_flow_ctrl_set_parsed function: =09static enum rte_eth_fc_mode rx_tx_onoff_2_pfc_mode[2][2] =3D { =09 {RTE_FC_NONE, RTE_FC_RX_PAUSE}, {RTE_FC_TX_PAUSE, RTE_FC_FULL} =09}; =09rx_fc_enable =3D (!strncmp(res->rx_pfc_mode, "on",2)) ? 1 : 0; =09tx_fc_enable =3D (!strncmp(res->tx_pfc_mode, "on",2)) ? 1 : 0; =09pfc_conf.fc.mode =3D =09=09 rx_tx_onoff_2_pfc_mode[rx_fc_enable][tx_fc_enable]; =09<...> =09ret =3D rte_eth_dev_priority_flow_ctrl_set(res->port_id, &pfc_conf); =09<...> The initial value of rx_tx_onoff_2_pfc_mode is wrong, it should be the same as rx_tx_onoff_2_lfc_mode. Fixes: 9b53e542e9e1 ("app/testpmd: add priority flow control") Signed-off-by: Huisong Li Signed-off-by: Wei Hu (Xavier) Signed-off-by: Xuan Li Reviewed-by: Ferruh Yigit --- app/test-pmd/cmdline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index 7c90457cd3..a8b53b89cf 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -6900,5 +6900,5 @@ cmd_priority_flow_ctrl_set_parsed(void *parsed_result= , =09 */ =09static enum rte_eth_fc_mode rx_tx_onoff_2_pfc_mode[2][2] =3D { -=09=09=09{RTE_FC_NONE, RTE_FC_RX_PAUSE}, {RTE_FC_TX_PAUSE, RTE_FC_FULL} +=09=09{RTE_FC_NONE, RTE_FC_TX_PAUSE}, {RTE_FC_RX_PAUSE, RTE_FC_FULL} =09}; =20 --=20 2.21.1 --- Diff of the applied patch vs upstream commit (please double-check if non-= empty: --- --- -=092020-02-14 17:02:38.598875844 +0000 +++ 0028-app-testpmd-fix-initial-value-when-setting-PFC.patch=092020-02-14 = 17:02:37.017406561 +0000 @@ -1 +1 @@ -From 3b687ec6e11b506bd9971b6ac536f6d89f5c6d56 Mon Sep 17 00:00:00 2001 +From 0592a1a35d1f51c5d50dfd86ecc26f3484fe3ab0 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 3b687ec6e11b506bd9971b6ac536f6d89f5c6d56 ] + @@ -41 +42,0 @@ -Cc: stable@dpdk.org @@ -52 +53 @@ -index 3126548fcd..06672fd04e 100644 +index 7c90457cd3..a8b53b89cf 100644 @@ -55 +56 @@ -@@ -7087,5 +7087,5 @@ cmd_priority_flow_ctrl_set_parsed(void *parsed_resul= t, +@@ -6900,5 +6900,5 @@ cmd_priority_flow_ctrl_set_parsed(void *parsed_resul= t,