netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Greg Rose <gregory.v.rose@intel.com>,
	netdev@vger.kernel.org, gospo@redhat.com, sassmann@redhat.com,
	Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next 01/14] i40e: Stop the VF device after setting its MAC address
Date: Mon, 23 Jun 2014 17:47:25 -0700	[thread overview]
Message-ID: <1403570858-13548-2-git-send-email-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <1403570858-13548-1-git-send-email-jeffrey.t.kirsher@intel.com>

From: Greg Rose <gregory.v.rose@intel.com>

If the host VMM administrator has changed the VF device's MAC address then
the i40e driver needs to halt the VF device so that the administrator will
be forced to reload the VF driver.  This will cause the VF driver to start
using the newly assigned MAC address.  This brings the i40e driver into
conformance with operational characteristics of other Intel SR-IOV
featured drivers.

Change-ID: Ic7242cceb8287dd2cb72fb1f3166a032a28bf88a
Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
index f5b9d20..d2dabae 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
@@ -2077,6 +2077,8 @@ int i40e_ndo_set_vf_mac(struct net_device *netdev, int vf_id, u8 *mac)
 	}
 	ether_addr_copy(vf->default_lan_addr.addr, mac);
 	vf->pf_set_mac = true;
+	/* Force the VF driver stop so it has to reload with new MAC address */
+	i40e_vc_disable_vf(pf, vf);
 	dev_info(&pf->pdev->dev, "Reload the VF driver to make this change effective.\n");
 	ret = 0;
 
-- 
1.9.3

  reply	other threads:[~2014-06-24  0:47 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-24  0:47 [net-next 00/14][pull request] Intel Wired LAN Driver Updates 2014-06-23 Jeff Kirsher
2014-06-24  0:47 ` Jeff Kirsher [this message]
2014-06-24  0:47 ` [net-next 02/14] i40e: make prep_for_reset void Jeff Kirsher
2014-06-24 14:03   ` Sergei Shtylyov
2014-06-24  0:47 ` [net-next 03/14] i40e: Add PF reset when Malicious driver event for PF Jeff Kirsher
2014-06-24 14:11   ` Sergei Shtylyov
2014-06-24  0:47 ` [net-next 04/14] i40e: warn on newer/older firmware API rev Jeff Kirsher
2014-06-24  0:47 ` [net-next 05/14] i40e: fix a stray print message Jeff Kirsher
2014-06-24  0:47 ` [net-next 06/14] i40e: Fix ethtool coalesce settings Jeff Kirsher
2014-06-24  0:47 ` [net-next 07/14] i40e/i40evf: remove reserved type Jeff Kirsher
2014-06-24  0:47 ` [net-next 08/14] i40e: Add ablitity to enable/disable link from set_link_restart_an Jeff Kirsher
2014-06-24  0:47 ` [net-next 09/14] i40e: use WoL flag when setting LAA Jeff Kirsher
2014-06-24  0:47 ` [net-next 10/14] i40e: allow user to set LAA again Jeff Kirsher
2014-06-24  0:47 ` [net-next 11/14] i40e: reapply LAA after reset Jeff Kirsher
2014-06-24  0:47 ` [net-next 12/14] i40e: no pf reset at pci remove Jeff Kirsher
2014-06-24  0:47 ` [net-next 13/14] i40e: Bypass timeout recovery level 0 so as to not cause MDD Jeff Kirsher
2014-06-24  0:47 ` [net-next 14/14] i40e/i40evf: Bump i40e to 0.4.17 and i40evf to 0.9.36 Jeff Kirsher

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=1403570858-13548-2-git-send-email-jeffrey.t.kirsher@intel.com \
    --to=jeffrey.t.kirsher@intel.com \
    --cc=davem@davemloft.net \
    --cc=gospo@redhat.com \
    --cc=gregory.v.rose@intel.com \
    --cc=netdev@vger.kernel.org \
    --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).