From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Mitch Williams <mitch.a.williams@intel.com>,
netdev@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com,
Andrew Bowers <andrewx.bowers@intel.com>,
Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next v2 08/15] iavf: allow permanent MAC address to change
Date: Mon, 9 Sep 2019 15:47:55 -0700 [thread overview]
Message-ID: <20190909224802.29595-9-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <20190909224802.29595-1-jeffrey.t.kirsher@intel.com>
From: Mitch Williams <mitch.a.williams@intel.com>
Allow the VF to override the "permanent" MAC address set by the host.
This allows bonding to work in the case where the administrator has set
the VF MAC.
Note that the VF must still be set to Trusted on the host if this change
is to be accepted by the PF driver.
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/iavf/iavf.h | 1 -
drivers/net/ethernet/intel/iavf/iavf_main.c | 4 ----
2 files changed, 5 deletions(-)
diff --git a/drivers/net/ethernet/intel/iavf/iavf.h b/drivers/net/ethernet/intel/iavf/iavf.h
index 9fc635d816d2..29de3ae96ef2 100644
--- a/drivers/net/ethernet/intel/iavf/iavf.h
+++ b/drivers/net/ethernet/intel/iavf/iavf.h
@@ -253,7 +253,6 @@ struct iavf_adapter {
#define IAVF_FLAG_RESET_PENDING BIT(4)
#define IAVF_FLAG_RESET_NEEDED BIT(5)
#define IAVF_FLAG_WB_ON_ITR_CAPABLE BIT(6)
-#define IAVF_FLAG_ADDR_SET_BY_PF BIT(8)
#define IAVF_FLAG_SERVICE_CLIENT_REQUESTED BIT(9)
#define IAVF_FLAG_CLIENT_NEEDS_OPEN BIT(10)
#define IAVF_FLAG_CLIENT_NEEDS_CLOSE BIT(11)
diff --git a/drivers/net/ethernet/intel/iavf/iavf_main.c b/drivers/net/ethernet/intel/iavf/iavf_main.c
index 554aa619ff02..07f5541a0f01 100644
--- a/drivers/net/ethernet/intel/iavf/iavf_main.c
+++ b/drivers/net/ethernet/intel/iavf/iavf_main.c
@@ -790,9 +790,6 @@ static int iavf_set_mac(struct net_device *netdev, void *p)
if (ether_addr_equal(netdev->dev_addr, addr->sa_data))
return 0;
- if (adapter->flags & IAVF_FLAG_ADDR_SET_BY_PF)
- return -EPERM;
-
spin_lock_bh(&adapter->mac_vlan_list_lock);
f = iavf_find_filter(adapter, hw->mac.addr);
@@ -1811,7 +1808,6 @@ static int iavf_init_get_resources(struct iavf_adapter *adapter)
eth_hw_addr_random(netdev);
ether_addr_copy(adapter->hw.mac.addr, netdev->dev_addr);
} else {
- adapter->flags |= IAVF_FLAG_ADDR_SET_BY_PF;
ether_addr_copy(netdev->dev_addr, adapter->hw.mac.addr);
ether_addr_copy(netdev->perm_addr, adapter->hw.mac.addr);
}
--
2.21.0
next prev parent reply other threads:[~2019-09-09 22:48 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-09 22:47 [net-next v2 00/15][pull request] Intel Wired LAN Driver Updates 2019-09-09 Jeff Kirsher
2019-09-09 22:47 ` [net-next v2 01/15] iavf: remove unused debug function iavf_debug_d Jeff Kirsher
2019-09-09 22:47 ` [net-next v2 02/15] ixgbevf: Link lost in VM on ixgbevf when restoring from freeze or suspend Jeff Kirsher
2019-09-09 22:47 ` [net-next v2 03/15] e1000e: Make speed detection on hotplugging cable more reliable Jeff Kirsher
2019-09-09 22:47 ` [net-next v2 04/15] igc: Remove useless forward declaration Jeff Kirsher
2019-09-09 22:47 ` [net-next v2 05/15] Documentation: iavf: Update the Intel LAN driver doc for iavf Jeff Kirsher
2019-09-09 22:47 ` [net-next v2 06/15] fm10k: use a local variable for the frag pointer Jeff Kirsher
2019-09-09 22:47 ` [net-next v2 07/15] igc: Add NVM checksum validation Jeff Kirsher
2019-09-09 22:47 ` Jeff Kirsher [this message]
2019-09-09 22:47 ` [net-next v2 09/15] igc: Remove unneeded PCI bus defines Jeff Kirsher
2019-09-09 22:47 ` [net-next v2 10/15] i40e: fix hw_dbg usage in i40e_hmc_get_object_va Jeff Kirsher
2019-09-09 22:47 ` [net-next v2 11/15] i40e: Implement debug macro hw_dbg using dev_dbg Jeff Kirsher
2019-09-09 22:47 ` [net-next v2 12/15] i40e: Remove EMPR traces from debugfs facility Jeff Kirsher
2019-09-09 22:48 ` [net-next v2 13/15] ixgbe: sync the first fragment unconditionally Jeff Kirsher
2019-09-09 22:48 ` [net-next v2 14/15] igc: Add tx_csum offload functionality Jeff Kirsher
2019-09-09 22:48 ` [net-next v2 15/15] i40e: Add support for X710 device Jeff Kirsher
2019-09-10 7:45 ` [net-next v2 00/15][pull request] Intel Wired LAN Driver Updates 2019-09-09 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=20190909224802.29595-9-jeffrey.t.kirsher@intel.com \
--to=jeffrey.t.kirsher@intel.com \
--cc=andrewx.bowers@intel.com \
--cc=davem@davemloft.net \
--cc=mitch.a.williams@intel.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