[dpdk-stable] patch 'app/testpmd: fix initial value when setting PFC' has been queued to LTS release 18.11.7

Kevin Traynor ktraynor at redhat.com
Fri Feb 14 18:03:22 CET 2020


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 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-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/0592a1a35d1f51c5d50dfd86ecc26f3484fe3ab0

Thanks.

Kevin.

---
>From 0592a1a35d1f51c5d50dfd86ecc26f3484fe3ab0 Mon Sep 17 00:00:00 2001
From: "Wei Hu (Xavier)" <xavier.huwei at huawei.com>
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:
	cmd_link_flow_ctrl_set_parsed
	cmd_priority_flow_ctrl_set_parsed
1) The code snippset in cmd_link_flow_ctrl_set_parsed function:
	static enum rte_eth_fc_mode rx_tx_onoff_2_lfc_mode[2][2] = {
	    {RTE_FC_NONE, RTE_FC_TX_PAUSE}, {RTE_FC_RX_PAUSE, RTE_FC_FULL}
	};

	if (!cmd || cmd == &cmd_link_flow_control_set_rx)
		rx_fc_en = (!strcmp(res->rx_lfc_mode, "on")) ? 1 : 0;
	if (!cmd || cmd == &cmd_link_flow_control_set_tx)
		tx_fc_en = (!strcmp(res->tx_lfc_mode, "on")) ? 1 : 0;

	fc_conf.mode = rx_tx_onoff_2_lfc_mode[rx_fc_en][tx_fc_en];
	<...>
	ret = rte_eth_dev_flow_ctrl_set(res->port_id, &fc_conf);
	<...>
2) The code snippset in cmd_priority_flow_ctrl_set_parsed function:
	static enum rte_eth_fc_mode rx_tx_onoff_2_pfc_mode[2][2] = {
	    {RTE_FC_NONE, RTE_FC_RX_PAUSE}, {RTE_FC_TX_PAUSE, RTE_FC_FULL}
	};

	rx_fc_enable = (!strncmp(res->rx_pfc_mode, "on",2)) ? 1 : 0;
	tx_fc_enable = (!strncmp(res->tx_pfc_mode, "on",2)) ? 1 : 0;
	pfc_conf.fc.mode =
		 rx_tx_onoff_2_pfc_mode[rx_fc_enable][tx_fc_enable];
	<...>
	ret = rte_eth_dev_priority_flow_ctrl_set(res->port_id, &pfc_conf);
	<...>
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 <lihuisong at huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei at huawei.com>
Signed-off-by: Xuan Li <lixuan47 at hisilicon.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit at intel.com>
---
 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,
 	 */
 	static enum rte_eth_fc_mode rx_tx_onoff_2_pfc_mode[2][2] = {
-			{RTE_FC_NONE, RTE_FC_RX_PAUSE}, {RTE_FC_TX_PAUSE, RTE_FC_FULL}
+		{RTE_FC_NONE, RTE_FC_TX_PAUSE}, {RTE_FC_RX_PAUSE, RTE_FC_FULL}
 	};
 
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-14 17:02:38.598875844 +0000
+++ 0028-app-testpmd-fix-initial-value-when-setting-PFC.patch	2020-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 at 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_result,
+@@ -6900,5 +6900,5 @@ cmd_priority_flow_ctrl_set_parsed(void *parsed_result,



More information about the stable mailing list