[dpdk-stable] patch 'app/testpmd: fix DCB config' has been queued to LTS release 16.11.8

luca.boccassi at gmail.com luca.boccassi at gmail.com
Mon Aug 6 12:56:11 CEST 2018


Hi,

FYI, your patch has been queued to LTS release 16.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/08/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From d79ab5481fa497535c23b89e0a9fa50aa8fd720b Mon Sep 17 00:00:00 2001
From: Konstantin Ananyev <konstantin.ananyev at intel.com>
Date: Tue, 31 Jul 2018 15:43:34 +0100
Subject: [PATCH] app/testpmd: fix DCB config

[ upstream commit ac7c491c3fecb835d637e867467dcf7cc8736828 ]

After adding RSS hash offload check, default rss_hf will fail on devices
that do not support all bits. This will lead to dcb config failure. The
patch fixes this issue by reading current valid rss_conf from the device.

Fixes: 8863a1fbfc66 ("ethdev: add supported hash function check")
Fixes: 1a572499beb6 ("app/testpmd: setup DCB forwarding based on traffic class")

Signed-off-by: Konstantin Ananyev <konstantin.ananyev at intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger at intel.com>
---
 app/test-pmd/testpmd.c | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 64e14cee2f..e48cf8a1ab 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -1905,12 +1905,14 @@ const uint16_t vlan_tags[] = {
 };
 
 static  int
-get_eth_dcb_conf(struct rte_eth_conf *eth_conf,
+get_eth_dcb_conf(portid_t pid, struct rte_eth_conf *eth_conf,
 		 enum dcb_mode_enable dcb_mode,
 		 enum rte_eth_nb_tcs num_tcs,
 		 uint8_t pfc_en)
 {
 	uint8_t i;
+	int32_t rc;
+	struct rte_eth_rss_conf rss_conf;
 
 	/*
 	 * Builds up the correct configuration for dcb+vt based on the vlan tags array
@@ -1950,6 +1952,10 @@ get_eth_dcb_conf(struct rte_eth_conf *eth_conf,
 		struct rte_eth_dcb_tx_conf *tx_conf =
 				&eth_conf->tx_adv_conf.dcb_tx_conf;
 
+		rc = rte_eth_dev_rss_hash_conf_get(pid, &rss_conf);
+		if (rc != 0)
+			return rc;
+
 		rx_conf->nb_tcs = num_tcs;
 		tx_conf->nb_tcs = num_tcs;
 
@@ -1957,8 +1963,9 @@ get_eth_dcb_conf(struct rte_eth_conf *eth_conf,
 			rx_conf->dcb_tc[i] = i % num_tcs;
 			tx_conf->dcb_tc[i] = i % num_tcs;
 		}
+
 		eth_conf->rxmode.mq_mode = ETH_MQ_RX_DCB_RSS;
-		eth_conf->rx_adv_conf.rss_conf.rss_hf = rss_hf;
+		eth_conf->rx_adv_conf.rss_conf = rss_conf;
 		eth_conf->txmode.mq_mode = ETH_MQ_TX_DCB;
 	}
 
@@ -1989,7 +1996,7 @@ init_port_dcb_config(portid_t pid,
 	dcb_config = 1;
 
 	/*set configuration of DCB in vt mode and DCB in non-vt mode*/
-	retval = get_eth_dcb_conf(&port_conf, dcb_mode, num_tcs, pfc_en);
+	retval = get_eth_dcb_conf(pid, &port_conf, dcb_mode, num_tcs, pfc_en);
 	if (retval < 0)
 		return retval;
 	port_conf.rxmode.hw_vlan_filter = 1;
-- 
2.18.0



More information about the stable mailing list