From: Alexander Duyck <aduyck@mirantis.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [next PATCH 2/2] ixgbe: Avoid adding VLAN 0 twice to VLVF and VFTA
Date: Wed, 06 Jan 2016 22:48:50 -0800 [thread overview]
Message-ID: <20160107064850.12239.83914.stgit@localhost.localdomain> (raw)
In-Reply-To: <20160107064516.12239.98349.stgit@localhost.localdomain>
We were adding VLAN 0 twice each time we restored the VLAN configuration.
Instead of doing it twice we can just start working through the active
VLANs from ID 1 on and skip the double write.
Signed-off-by: Alexander Duyck <aduyck@mirantis.com>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index 1f2b039e71bd..77cdaed6de90 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -4169,11 +4169,11 @@ static void ixgbe_vlan_promisc_disable(struct ixgbe_adapter *adapter)
static void ixgbe_restore_vlan(struct ixgbe_adapter *adapter)
{
- u16 vid;
+ u16 vid = 1;
ixgbe_vlan_rx_add_vid(adapter->netdev, htons(ETH_P_8021Q), 0);
- for_each_set_bit(vid, adapter->active_vlans, VLAN_N_VID)
+ for_each_set_bit_from(vid, adapter->active_vlans, VLAN_N_VID)
ixgbe_vlan_rx_add_vid(adapter->netdev, htons(ETH_P_8021Q), vid);
}
next prev parent reply other threads:[~2016-01-07 6:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-07 6:48 [Intel-wired-lan] [next PATCH 0/2] Two clean-ups for recent ixgbe VLAN changes Alexander Duyck
2016-01-07 6:48 ` [Intel-wired-lan] [next PATCH 1/2] ixgbe: Do not allow PF to add VLVF entry unless it actually needs it Alexander Duyck
2016-01-15 16:20 ` Schmitt, Phillip J
2016-01-07 6:48 ` Alexander Duyck [this message]
2016-01-15 16:20 ` [Intel-wired-lan] [next PATCH 2/2] ixgbe: Avoid adding VLAN 0 twice to VLVF and VFTA Schmitt, Phillip J
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=20160107064850.12239.83914.stgit@localhost.localdomain \
--to=aduyck@mirantis.com \
--cc=intel-wired-lan@osuosl.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