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>,
	yliu@fridaylinux.org, Dept-EngDPDKDev@cavium.com
Subject: [dpdk-stable] [PATCH 17.11 2/5] net/qede: fix device stop to remove primary MAC
Date: Thu,  7 Jun 2018 17:51:11 -0700	[thread overview]
Message-ID: <1528419074-18954-2-git-send-email-rasesh.mody@cavium.com> (raw)
In-Reply-To: <1528419074-18954-1-git-send-email-rasesh.mody@cavium.com>

[ upstream commit 83ade1ebdbfc8211d3cb5c2bc282c3fa396e4a34 ]

This fix is to remove primary MAC filter during dev stop. Without the
fix device start attempt to add the primary MAC fails. Perform MAC set
remove under IS_PF() check.

Fixes: dd28bc8c6ef4 ("net/qede: fix VF port creation sequence")

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

diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index 15b6c27..d266fff 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -905,7 +905,7 @@ static int qede_del_mcast_filters(struct rte_eth_dev *eth_dev)
 	ether_addr_copy(&eth_dev->data->mac_addrs[index],
 			(struct ether_addr *)&ucast.mac);
 
-	ecore_filter_ucast_cmd(edev, &ucast, ECORE_SPQ_MODE_CB, NULL);
+	qede_mac_int_ops(eth_dev, &ucast, false);
 }
 
 static void
@@ -1245,6 +1245,9 @@ static void qede_dev_stop(struct rte_eth_dev *eth_dev)
 	/* Disable traffic */
 	ecore_hw_stop_fastpath(edev); /* TBD - loop */
 
+	if (IS_PF(edev))
+		qede_mac_addr_remove(eth_dev, 0);
+
 	DP_INFO(edev, "Device is stopped\n");
 }
 
@@ -2329,6 +2332,9 @@ static int qede_set_mtu(struct rte_eth_dev *dev, uint16_t mtu)
 		dev->data->dev_started = 0;
 		qede_dev_stop(dev);
 		restart = true;
+	} else {
+		if (IS_PF(edev))
+			qede_mac_addr_remove(dev, 0);
 	}
 	rte_delay_ms(1000);
 	qede_start_vport(qdev, mtu); /* Recreate vport */
@@ -2356,7 +2362,9 @@ static int qede_set_mtu(struct rte_eth_dev *dev, uint16_t mtu)
 		dev->data->dev_conf.rxmode.jumbo_frame = 0;
 
 	/* Restore config lost due to vport stop */
-	qede_mac_addr_set(dev, &qdev->primary_mac);
+	if (IS_PF(edev))
+		qede_mac_addr_set(dev, &qdev->primary_mac);
+
 	if (dev->data->promiscuous)
 		qede_promiscuous_enable(dev);
 	else
-- 
1.7.10.3

  reply	other threads:[~2018-06-08  0:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-08  0:51 [dpdk-stable] [PATCH 17.11 1/5] net/qede: fix VF port creation sequence Rasesh Mody
2018-06-08  0:51 ` Rasesh Mody [this message]
2018-06-08  0:51 ` [dpdk-stable] [PATCH 17.11 3/5] net/qede: fix to prevent overwriting packet type Rasesh Mody
2018-06-08  0:51 ` [dpdk-stable] [PATCH 17.11 4/5] net/qede/base: fix to support OVLAN mode Rasesh Mody
2018-06-08  0:51 ` [dpdk-stable] [PATCH 17.11 5/5] net/qede: fix L2-handles used for RSS hash update Rasesh Mody
2018-06-08 14:45   ` Yuanhan Liu
2018-06-08 23:10     ` Mody, Rasesh
2018-06-15 14:33       ` Yuanhan Liu
2018-06-15 16:54         ` Mody, Rasesh

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=1528419074-18954-2-git-send-email-rasesh.mody@cavium.com \
    --to=rasesh.mody@cavium.com \
    --cc=Dept-EngDPDKDev@cavium.com \
    --cc=stable@dpdk.org \
    --cc=yliu@fridaylinux.org \
    /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).