From: Yuval Mintz <Yuval.Mintz@qlogic.com>
To: <davem@davemloft.net>, <netdev@vger.kernel.org>
Cc: Yuval Mintz <Yuval.Mintz@qlogic.com>
Subject: [PATCH net 1/6] qede: Don't try removing unconfigured vlans
Date: Wed, 27 Jul 2016 14:45:19 +0300 [thread overview]
Message-ID: <1469619924-12806-2-git-send-email-Yuval.Mintz@qlogic.com> (raw)
In-Reply-To: <1469619924-12806-1-git-send-email-Yuval.Mintz@qlogic.com>
As part of ndo_vlan_rx_kill_vid() implementation,
qede is requesting firmware to remove the vlan filter.
This currently happens even if the vlan wasn't previously
added [In case device ran out of vlan credits].
For PFs this doesn't cause any issues as the firmware
would simply ignore the removal request. But for VFs their
parent PF is holding an accounting of the configured vlans,
and such a request would cause the PF to fail the VF's
removal request.
Simply fix this for both PFs & VFs and don't remove filters
that were not previously added.
Fixes: 7c1bfcad9f3c8 ("qede: Add vlan filtering offload support")
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
---
drivers/net/ethernet/qlogic/qede/qede_main.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/qlogic/qede/qede_main.c b/drivers/net/ethernet/qlogic/qede/qede_main.c
index f8e11f9..8fe3cc1 100644
--- a/drivers/net/ethernet/qlogic/qede/qede_main.c
+++ b/drivers/net/ethernet/qlogic/qede/qede_main.c
@@ -2050,10 +2050,13 @@ static int qede_vlan_rx_kill_vid(struct net_device *dev, __be16 proto, u16 vid)
}
/* Remove vlan */
- rc = qede_set_ucast_rx_vlan(edev, QED_FILTER_XCAST_TYPE_DEL, vid);
- if (rc) {
- DP_ERR(edev, "Failed to remove VLAN %d\n", vid);
- return -EINVAL;
+ if (vlan->configured) {
+ rc = qede_set_ucast_rx_vlan(edev, QED_FILTER_XCAST_TYPE_DEL,
+ vid);
+ if (rc) {
+ DP_ERR(edev, "Failed to remove VLAN %d\n", vid);
+ return -EINVAL;
+ }
}
qede_del_vlan_from_list(edev, vlan);
--
1.9.3
next prev parent reply other threads:[~2016-07-27 11:45 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-27 11:45 [PATCH net 0/6] qed*: Small fixes series Yuval Mintz
2016-07-27 11:45 ` Yuval Mintz [this message]
2016-07-27 11:45 ` [PATCH net 2/6] qed: Fix removal of spoof checking for VFs Yuval Mintz
2016-07-27 11:45 ` [PATCH net 3/6] qed: Don't over-do producer cleanup for Rx Yuval Mintz
2016-07-27 11:45 ` [PATCH net 4/6] qede: Reset statistics on explicit down Yuval Mintz
2016-07-27 11:45 ` [PATCH net 5/6] qed: Correct min bandwidth for 100g Yuval Mintz
2016-07-27 11:45 ` [PATCH net 6/6] qed: Prevent over-usage of vlan credits by PF Yuval Mintz
2016-07-31 3:34 ` [PATCH net 0/6] qed*: Small fixes series David Miller
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=1469619924-12806-2-git-send-email-Yuval.Mintz@qlogic.com \
--to=yuval.mintz@qlogic.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.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).