patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Rasesh Mody <rasesh.mody@cavium.com>
To: stable@dpdk.org
Cc: Rasesh Mody <rasesh.mody@cavium.com>,
	yskoh@mellanox.com, Dept-EngDPDKDev@cavium.com
Subject: [dpdk-stable] [PATCH 17.11 1/5] net/qede: fix for devargs
Date: Thu,  2 Aug 2018 18:00:28 -0700	[thread overview]
Message-ID: <1533258032-11551-1-git-send-email-rasesh.mody@cavium.com> (raw)

[ 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

             reply	other threads:[~2018-08-03  1:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-03  1:00 Rasesh Mody [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1533258032-11551-1-git-send-email-rasesh.mody@cavium.com \
    --to=rasesh.mody@cavium.com \
    --cc=Dept-EngDPDKDev@cavium.com \
    --cc=stable@dpdk.org \
    --cc=yskoh@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).