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

* [dpdk-stable] [PATCH 17.11 2/5] net/qede: fix default extended VLAN offload config
  2018-08-03  1:00 [dpdk-stable] [PATCH 17.11 1/5] net/qede: fix for devargs Rasesh Mody
@ 2018-08-03  1:00 ` Rasesh Mody
  2018-08-03  1:00 ` [dpdk-stable] [PATCH 17.11 3/5] doc: update qede management firmware guide Rasesh Mody
                   ` (3 subsequent siblings)
  4 siblings, 0 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 c6dd1eb8a55c1f66da8398508ea8a749799eef18 ]

This patch disables extended VLAN offload by default as PMD does not
support it.

Fixes: d87246a43759 ("net/qede: enable and disable VLAN filtering")

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

diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index 96015cd..687104f 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -1380,8 +1380,7 @@ static int qede_dev_configure(struct rte_eth_dev *eth_dev)
 
 	/* Enable VLAN offloads by default */
 	ret = qede_vlan_offload_set(eth_dev, ETH_VLAN_STRIP_MASK  |
-			ETH_VLAN_FILTER_MASK |
-			ETH_VLAN_EXTEND_MASK);
+					     ETH_VLAN_FILTER_MASK);
 	if (ret)
 		return ret;
 
-- 
1.7.10.3

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

* [dpdk-stable] [PATCH 17.11 3/5] doc: update qede management firmware guide
  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 ` Rasesh Mody
  2018-08-03  1:00 ` [dpdk-stable] [PATCH 17.11 4/5] net/qede: fix incorrect link status update Rasesh Mody
                   ` (2 subsequent siblings)
  4 siblings, 0 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 1fc3afdf7886eaf65ff61ed57d62e1438adcbe53 ]

Fixes: db86fbe54d90 ("doc: update qede PMD NIC guide")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
---
 doc/guides/nics/qede.rst |   13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/doc/guides/nics/qede.rst b/doc/guides/nics/qede.rst
index 84becc9..19802f4 100644
--- a/doc/guides/nics/qede.rst
+++ b/doc/guides/nics/qede.rst
@@ -86,12 +86,13 @@ Prerequisites
   `QLogic Driver Download Center <http://driverdownloads.qlogic.com/QLogicDriverDownloads_UI/DefaultNewSearch.aspx>`_.
   For downloading firmware file, select adapter category, model and DPDK Poll Mode Driver.
 
-- Requires management firmware (MFW) version **8.30.x.x** or higher to be
-  flashed on to the adapter. If the required management firmware is not
-  available then download from
-  `QLogic Driver Download Center <http://driverdownloads.qlogic.com/QLogicDriverDownloads_UI/DefaultNewSearch.aspx>`_.
-  For downloading firmware upgrade utility, select adapter category, model and Linux distro.
-  To flash the management firmware refer to the instructions in the QLogic Firmware Upgrade Utility Readme document.
+- Requires the NIC be updated minimally with **8.30.x.x** Management firmware(MFW) version supported for that NIC.
+  It is highly recommended that the NIC be updated with the latest available management firmware version to get latest feature  set.
+  Management Firmware and Firmware Upgrade Utility for Cavium FastLinQ(r) branded adapters can be downloaded from
+  `Driver Download Center <http://driverdownloads.qlogic.com/QLogicDriverDownloads_UI/DefaultNewSearch.aspx>`_.
+  For downloading Firmware Upgrade Utility, select NIC category, model and Linux distro.
+  To update the management firmware, refer to the instructions in the Firmware Upgrade Utility Readme document.
+  For OEM branded adapters please follow the instruction provided by the OEM to update the Management Firmware on the NIC.
 
 - SR-IOV requires Linux PF driver version **8.20.x.x** or higher.
   If the required PF driver is not available then download it from
-- 
1.7.10.3

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

* [dpdk-stable] [PATCH 17.11 4/5] net/qede: fix incorrect link status update
  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 ` 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
  4 siblings, 0 replies; 6+ messages in thread
From: Rasesh Mody @ 2018-08-03  1:00 UTC (permalink / raw)
  To: stable; +Cc: Shahed Shaikh, yskoh, Dept-EngDPDKDev

From: Shahed Shaikh <shahed.shaikh@cavium.com>

[ upstream commit c6034a20d9e221dc6125db57e4378520af3a515d ]

qede_link_update() always returns -1 i.e. link not changed,
because it compares the variables which always hold same value.

Fix this function by caching old link state and comparing it with
new one.

Fixes: 2ea6f76aff40 ("qede: add core driver")

Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com>
---
 drivers/net/qede/qede_ethdev.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index 687104f..73947fc 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -1478,7 +1478,7 @@ static int qede_dev_configure(struct rte_eth_dev *eth_dev)
 {
 	struct qede_dev *qdev = eth_dev->data->dev_private;
 	struct ecore_dev *edev = &qdev->edev;
-	uint16_t link_duplex;
+	uint16_t link_duplex, old_link_status;
 	struct qed_link_output link;
 	struct rte_eth_link *curr = &eth_dev->data->dev_link;
 
@@ -1503,6 +1503,7 @@ static int qede_dev_configure(struct rte_eth_dev *eth_dev)
 	curr->link_duplex = link_duplex;
 
 	/* Link Status */
+	old_link_status = curr->link_status;
 	curr->link_status = (link.link_up) ? ETH_LINK_UP : ETH_LINK_DOWN;
 
 	/* AN */
@@ -1514,7 +1515,7 @@ static int qede_dev_configure(struct rte_eth_dev *eth_dev)
 		curr->link_autoneg, curr->link_status);
 
 	/* return 0 means link status changed, -1 means not changed */
-	return ((curr->link_status == link.link_up) ? -1 : 0);
+	return ((curr->link_status == old_link_status) ? -1 : 0);
 }
 
 static void qede_promiscuous_enable(struct rte_eth_dev *eth_dev)
-- 
1.7.10.3

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

* [dpdk-stable] [PATCH 17.11 5/5] net/qede: fix unicast MAC address handling in VF
  2018-08-03  1:00 [dpdk-stable] [PATCH 17.11 1/5] net/qede: fix for devargs Rasesh Mody
                   ` (2 preceding siblings ...)
  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 ` Rasesh Mody
  2018-08-03 17:33 ` [dpdk-stable] [PATCH 17.11 1/5] net/qede: fix for devargs Yongseok Koh
  4 siblings, 0 replies; 6+ messages in thread
From: Rasesh Mody @ 2018-08-03  1:00 UTC (permalink / raw)
  To: stable; +Cc: Shahed Shaikh, yskoh, Dept-EngDPDKDev

From: Shahed Shaikh <shahed.shaikh@cavium.com>

[ upstream commit c7641841af2aaf05bca987a5a0eff5a7fe96caeb ]

We did not register unicast mac configuration handlers
for VF causing failure in bonding of VFs.

Also, mac_addr_set operation requires mac_remove followed
by mac_add.

Fixes: 86a2265e59d7 ("qede: add SRIOV support")

Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com>
---
 drivers/net/qede/qede_ethdev.c |   13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index 73947fc..89f6ce0 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -859,7 +859,11 @@ static int qede_del_mcast_filters(struct rte_eth_dev *eth_dev)
 	struct ecore_filter_ucast ucast;
 	int re;
 
+	if (!is_valid_assigned_ether_addr(mac_addr))
+		return -EINVAL;
+
 	qede_set_ucast_cmn_params(&ucast);
+	ucast.opcode = ECORE_FILTER_ADD;
 	ucast.type = ECORE_FILTER_MAC;
 	ether_addr_copy(mac_addr, (struct ether_addr *)&ucast.mac);
 	re = (int)qede_mac_int_ops(eth_dev, &ucast, 1);
@@ -881,6 +885,9 @@ static int qede_del_mcast_filters(struct rte_eth_dev *eth_dev)
 		return;
 	}
 
+	if (!is_valid_assigned_ether_addr(&eth_dev->data->mac_addrs[index]))
+		return;
+
 	qede_set_ucast_cmn_params(&ucast);
 	ucast.opcode = ECORE_FILTER_REMOVE;
 	ucast.type = ECORE_FILTER_MAC;
@@ -906,6 +913,7 @@ static int qede_del_mcast_filters(struct rte_eth_dev *eth_dev)
 		return;
 	}
 
+	qede_mac_addr_remove(eth_dev, 0);
 	qede_mac_addr_add(eth_dev, mac_addr, 0, 0);
 }
 
@@ -2824,6 +2832,9 @@ int qede_dev_filter_ctrl(struct rte_eth_dev *eth_dev,
 	.mtu_set = qede_set_mtu,
 	.udp_tunnel_port_add = qede_udp_dst_port_add,
 	.udp_tunnel_port_del = qede_udp_dst_port_del,
+	.mac_addr_add = qede_mac_addr_add,
+	.mac_addr_remove = qede_mac_addr_remove,
+	.mac_addr_set = qede_mac_addr_set,
 };
 
 static void qede_update_pf_params(struct ecore_dev *edev)
@@ -3004,7 +3015,7 @@ static int qede_common_dev_init(struct rte_eth_dev *eth_dev, bool is_vf)
 						ECORE_LEADING_HWFN(edev),
 						vf_mac,
 						&is_mac_forced);
-			if (is_mac_exist && is_mac_forced) {
+			if (is_mac_exist) {
 				DP_INFO(edev, "VF macaddr received from PF\n");
 				ether_addr_copy((struct ether_addr *)&vf_mac,
 						&eth_dev->data->mac_addrs[0]);
-- 
1.7.10.3

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

* Re: [dpdk-stable] [PATCH 17.11 1/5] net/qede: fix for devargs
  2018-08-03  1:00 [dpdk-stable] [PATCH 17.11 1/5] net/qede: fix for devargs Rasesh Mody
                   ` (3 preceding siblings ...)
  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 ` Yongseok Koh
  4 siblings, 0 replies; 6+ messages in thread
From: Yongseok Koh @ 2018-08-03 17:33 UTC (permalink / raw)
  To: Rasesh Mody; +Cc: dpdk stable, Dept-EngDPDKDev


> On Aug 2, 2018, at 6:00 PM, Rasesh Mody <rasesh.mody@cavium.com> wrote:
> 
> [ 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>
> ---

Series applied to stable/17.11.

Thanks,
Yongseok

^ 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).