From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>,
netdev@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com,
jogreene@redhat.com, Jacob Keller <jacob.e.keller@intel.com>
Subject: [net-next 20/25] fm10k: update xcast mode before synchronizing multicast addresses
Date: Tue, 14 Apr 2015 16:51:06 -0700 [thread overview]
Message-ID: <1429055471-401-21-git-send-email-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <1429055471-401-1-git-send-email-jeffrey.t.kirsher@intel.com>
When the PF receives a request to update a multicast address for the VF,
it checks the enabled multicast mode first. Fix a bug where the VF tried
to set a multicast address before requesting the required xcast mode.
This ensures the multicast addresses are honored as long as the xcast
mode was allowed.
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Acked-by: Matthew Vick <matthew.vick@intel.com>
Tested-by: Krishneil Singh <krishneil.k.singh@intel.com>
---
drivers/net/ethernet/intel/fm10k/fm10k_netdev.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c b/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c
index 6981964..2f4f41b 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c
@@ -970,14 +970,7 @@ static void fm10k_set_rx_mode(struct net_device *dev)
fm10k_mbx_lock(interface);
- /* synchronize all of the addresses */
- if (xcast_mode != FM10K_XCAST_MODE_PROMISC) {
- __dev_uc_sync(dev, fm10k_uc_sync, fm10k_uc_unsync);
- if (xcast_mode != FM10K_XCAST_MODE_ALLMULTI)
- __dev_mc_sync(dev, fm10k_mc_sync, fm10k_mc_unsync);
- }
-
- /* if we aren't changing modes there is nothing to do */
+ /* update xcast mode first, but only if it changed */
if (interface->xcast_mode != xcast_mode) {
/* update VLAN table */
if (xcast_mode == FM10K_XCAST_MODE_PROMISC)
@@ -992,6 +985,13 @@ static void fm10k_set_rx_mode(struct net_device *dev)
interface->xcast_mode = xcast_mode;
}
+ /* synchronize all of the addresses */
+ if (xcast_mode != FM10K_XCAST_MODE_PROMISC) {
+ __dev_uc_sync(dev, fm10k_uc_sync, fm10k_uc_unsync);
+ if (xcast_mode != FM10K_XCAST_MODE_ALLMULTI)
+ __dev_mc_sync(dev, fm10k_mc_sync, fm10k_mc_unsync);
+ }
+
fm10k_mbx_unlock(interface);
}
@@ -1051,6 +1051,9 @@ void fm10k_restore_rx_state(struct fm10k_intfc *interface)
vid, true, 0);
}
+ /* update xcast mode before syncronizing addresses */
+ hw->mac.ops.update_xcast_mode(hw, glort, xcast_mode);
+
/* synchronize all of the addresses */
if (xcast_mode != FM10K_XCAST_MODE_PROMISC) {
__dev_uc_sync(netdev, fm10k_uc_sync, fm10k_uc_unsync);
@@ -1058,9 +1061,6 @@ void fm10k_restore_rx_state(struct fm10k_intfc *interface)
__dev_mc_sync(netdev, fm10k_mc_sync, fm10k_mc_unsync);
}
- /* update xcast mode */
- hw->mac.ops.update_xcast_mode(hw, glort, xcast_mode);
-
fm10k_mbx_unlock(interface);
/* record updated xcast mode state */
--
1.9.3
next prev parent reply other threads:[~2015-04-14 23:51 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-14 23:50 [net-next 00/25][pull request] Intel Wired LAN Driver Updates 2015-04-14 Jeff Kirsher
2015-04-14 23:50 ` [net-next 01/25] fm10k: Corrected an error in Tx statistics Jeff Kirsher
2015-04-14 23:50 ` [net-next 02/25] fm10k: Remove redundant rx_errors in ethtool Jeff Kirsher
2015-04-14 23:50 ` [net-next 03/25] fm10k: Correct spelling mistake Jeff Kirsher
2015-04-14 23:50 ` [net-next 04/25] fm10k: Have the VF get the default VLAN during init Jeff Kirsher
2015-04-14 23:50 ` [net-next 05/25] fm10k: Add netconsole support Jeff Kirsher
2015-04-14 23:50 ` [net-next 06/25] fm10k: fix unused warnings Jeff Kirsher
2015-04-14 23:50 ` [net-next 07/25] fm10k: allow creation of VLAN on default vid Jeff Kirsher
2015-04-14 23:50 ` [net-next 08/25] fm10k: only show actual queues, not the maximum in hardware Jeff Kirsher
2015-04-14 23:50 ` [net-next 09/25] fm10k: use hw->mac.max_queues for stats Jeff Kirsher
2015-04-14 23:50 ` [net-next 10/25] fm10k: separate PF only stats so that VF does not display them Jeff Kirsher
2015-04-14 23:50 ` [net-next 11/25] fm10k: remove extraneous "Reset interface" message Jeff Kirsher
2015-04-14 23:50 ` [net-next 12/25] fm10k: only increment tx_timeout_count in Tx hang path Jeff Kirsher
2015-04-14 23:50 ` [net-next 13/25] fm10k: expose tx_timeout_count as an ethtool stat Jeff Kirsher
2015-04-14 23:51 ` [net-next 14/25] fm10k: Set PF queues to unlimited bandwidth during virtualization Jeff Kirsher
2015-04-14 23:51 ` [net-next 15/25] fm10k: use separate workqueue for fm10k driver Jeff Kirsher
2015-04-14 23:51 ` [net-next 16/25] fm10k: don't handle mailbox events in iov_event path and always process mailbox Jeff Kirsher
2015-04-14 23:51 ` [net-next 17/25] fm10k: comment next_vf_mbx flow Jeff Kirsher
2015-04-14 23:51 ` [net-next 18/25] fm10k: fix function header comment Jeff Kirsher
2015-04-14 23:51 ` [net-next 19/25] fm10k: start service timer on probe Jeff Kirsher
2015-04-14 23:51 ` Jeff Kirsher [this message]
2015-04-14 23:51 ` [net-next 21/25] fm10k: renamed mbx_tx_dropped to mbx_tx_oversized Jeff Kirsher
2015-04-14 23:51 ` [net-next 22/25] fm10k: reset head instead of calling update_max_size Jeff Kirsher
2015-04-14 23:51 ` [net-next 23/25] fm10k: mbx_update_max_size does not drop all oversized messages Jeff Kirsher
2015-04-14 23:51 ` [net-next 24/25] fm10k: corrected VF multicast update Jeff Kirsher
2015-04-14 23:51 ` [net-next 25/25] fm10k: Bump driver version to 0.15.2 Jeff Kirsher
2015-04-15 2:38 ` [net-next 00/25][pull request] Intel Wired LAN Driver Updates 2015-04-14 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=1429055471-401-21-git-send-email-jeffrey.t.kirsher@intel.com \
--to=jeffrey.t.kirsher@intel.com \
--cc=davem@davemloft.net \
--cc=jacob.e.keller@intel.com \
--cc=jogreene@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=nhorman@redhat.com \
--cc=sassmann@redhat.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).