summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
diff options
context:
space:
mode:
authorGreg Rose <gregory.v.rose@intel.com>2013-12-07 10:36:54 +0000
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2014-01-07 21:49:30 -0800
commit5017c2a8afec40d2d78411525dc1518b9f6276ca (patch)
tree0987b15460755b23132e9db3d890b412fe6fb4dd /drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
parent6bbac866ce2e39d2f059240409f4018a153e1a1a (diff)
downloadlwn-5017c2a8afec40d2d78411525dc1518b9f6276ca.tar.gz
lwn-5017c2a8afec40d2d78411525dc1518b9f6276ca.zip
i40e: Allow VF to set already assigned MAC address
The VF is allowed to request the PF to set its already assigned MAC address without generating an error. Change-Id: I8dfdf353396995dbbb26cafab4e42b451911da3d Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Acked-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c')
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
index fee368a7e75e..5c99164e6cf0 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
@@ -1348,10 +1348,13 @@ static inline int i40e_check_vf_permission(struct i40e_vf *vf, u8 *macaddr)
is_zero_ether_addr(macaddr)) {
dev_err(&pf->pdev->dev, "invalid VF MAC addr %pM\n", macaddr);
ret = I40E_ERR_INVALID_MAC_ADDR;
- } else if (vf->pf_set_mac && !is_multicast_ether_addr(macaddr)) {
+ } else if (vf->pf_set_mac && !is_multicast_ether_addr(macaddr) &&
+ !ether_addr_equal(macaddr, vf->default_lan_addr.addr)) {
/* If the host VMM administrator has set the VF MAC address
* administratively via the ndo_set_vf_mac command then deny
* permission to the VF to add or delete unicast MAC addresses.
+ * The VF may request to set the MAC address filter already
+ * assigned to it so do not return an error in that case.
*/
dev_err(&pf->pdev->dev,
"VF attempting to override administratively set MAC address\nPlease reload the VF driver to resume normal operation\n");