patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH 17.11 1/5] net/qede: fix for devargs
@ 2018-08-03  1:00 Rasesh Mody
  2018-08-03  1:00 ` [dpdk-stable] [PATCH 17.11 2/5] net/qede: fix default extended VLAN offload config Rasesh Mody
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Rasesh Mody @ 2018-08-03  1:00 UTC (permalink / raw)
  To: stable; +Cc: Rasesh Mody, yskoh, Dept-EngDPDKDev

[ upstream commit a16aef523c11b6e64a809242c77ff7f2c5e9a864]

Do not error out on invalid devarg, log the message and continue.
Move check for VF when disabling tx-switching to qede_args_check().
Rename args.

Fixes: e10fc775ce1a ("net/qede: replace config option with run-time arg")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
---
 drivers/net/qede/qede_ethdev.c |   22 ++++++++++------------
 1 file changed, 10 insertions(+), 12 deletions(-)

diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index cd66a88..96015cd 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -534,12 +534,9 @@ int qede_activate_vport(struct rte_eth_dev *eth_dev, bool flg)
 	params.update_vport_active_tx_flg = 1;
 	params.vport_active_rx_flg = flg;
 	params.vport_active_tx_flg = flg;
-	if (!qdev->enable_tx_switching) {
-		if (IS_VF(edev)) {
-			params.update_tx_switching_flg = 1;
-			params.tx_switching_flg = !flg;
-			DP_INFO(edev, "VF tx-switching is disabled\n");
-		}
+	if (~qdev->enable_tx_switching & flg) {
+		params.update_tx_switching_flg = 1;
+		params.tx_switching_flg = !flg;
 	}
 	for_each_hwfn(edev, i) {
 		p_hwfn = &edev->hwfns[i];
@@ -1241,10 +1238,10 @@ static void qede_dev_stop(struct rte_eth_dev *eth_dev)
 	DP_INFO(edev, "Device is stopped\n");
 }
 
-#define QEDE_TX_SWITCHING		"vf_txswitch"
+#define QEDE_VF_TX_SWITCHING		"vf_tx_switching"
 
 const char *valid_args[] = {
-	QEDE_TX_SWITCHING,
+	QEDE_VF_TX_SWITCHING,
 	NULL,
 };
 
@@ -1254,9 +1251,7 @@ static int qede_args_check(const char *key, const char *val, void *opaque)
 	int ret = 0;
 	struct rte_eth_dev *eth_dev = opaque;
 	struct qede_dev *qdev = QEDE_INIT_QDEV(eth_dev);
-#ifdef RTE_LIBRTE_QEDE_DEBUG_INFO
 	struct ecore_dev *edev = QEDE_INIT_EDEV(qdev);
-#endif
 
 	errno = 0;
 	tmp = strtoul(val, NULL, 0);
@@ -1265,8 +1260,10 @@ static int qede_args_check(const char *key, const char *val, void *opaque)
 		return errno;
 	}
 
-	if (strcmp(QEDE_TX_SWITCHING, key) == 0)
+	if (strcmp(QEDE_VF_TX_SWITCHING, key) == 0 && IS_VF(edev)) {
 		qdev->enable_tx_switching = !!tmp;
+		DP_INFO(edev, "Disabling VF tx-switching\n");
+	}
 
 	return ret;
 }
@@ -1341,7 +1338,8 @@ static int qede_dev_configure(struct rte_eth_dev *eth_dev)
 
 	/* Parse devargs and fix up rxmode */
 	if (qede_args(eth_dev))
-		return -ENOTSUP;
+		DP_NOTICE(edev, false,
+			  "Invalid devargs supplied, requested change will not take effect\n");
 
 	/* Sanity checks and throw warnings */
 	if (rxmode->enable_scatter)
-- 
1.7.10.3

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-08-03 17:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-03  1:00 [dpdk-stable] [PATCH 17.11 1/5] net/qede: fix for devargs Rasesh Mody
2018-08-03  1:00 ` [dpdk-stable] [PATCH 17.11 2/5] net/qede: fix default extended VLAN offload config Rasesh Mody
2018-08-03  1:00 ` [dpdk-stable] [PATCH 17.11 3/5] doc: update qede management firmware guide Rasesh Mody
2018-08-03  1:00 ` [dpdk-stable] [PATCH 17.11 4/5] net/qede: fix incorrect link status update Rasesh Mody
2018-08-03  1:00 ` [dpdk-stable] [PATCH 17.11 5/5] net/qede: fix unicast MAC address handling in VF Rasesh Mody
2018-08-03 17:33 ` [dpdk-stable] [PATCH 17.11 1/5] net/qede: fix for devargs Yongseok Koh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).