diff mbox

[net-next] ixgbe: Extend trust to allow guest to set unicast address

Message ID 1451669660-3628-1-git-send-email-3chas3@gmail.com
State Awaiting Upstream, archived
Delegated to: David Miller
Headers show

Commit Message

Chas Williams Jan. 1, 2016, 5:34 p.m. UTC
When running certain routing protocols like VRRP, VF guests need the
ability to set the unicast address of the interface.  Extend the new ndo
trust feature to let the hypervisor trust a guest to set/update its own
unicast address.

Signed-off-by: Chas Williams <3chas3@gmail.com>
---
 drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Phil Schmitt Jan. 13, 2016, 7 p.m. UTC | #1
> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces@lists.osuosl.org] On
> Behalf Of Chas Williams
> Sent: Friday, January 01, 2016 9:34 AM
> To: intel-wired-lan@lists.osuosl.org
> Cc: netdev@vger.kernel.org
> Subject: [Intel-wired-lan] [PATCH net-next] ixgbe: Extend trust to allow guest to
> set unicast address
> 
> When running certain routing protocols like VRRP, VF guests need the ability to
> set the unicast address of the interface.  Extend the new ndo trust feature to let
> the hypervisor trust a guest to set/update its own unicast address.
> 
> Signed-off-by: Chas Williams <3chas3@gmail.com>
> ---

Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
diff mbox

Patch

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
index eeff3d0..63cff17 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
@@ -887,7 +887,7 @@  static int ixgbe_set_vf_mac_addr(struct ixgbe_adapter *adapter,
 		return -1;
 	}
 
-	if (adapter->vfinfo[vf].pf_set_mac &&
+	if (adapter->vfinfo[vf].pf_set_mac && !adapter->vfinfo[vf].trusted &&
 	    !ether_addr_equal(adapter->vfinfo[vf].vf_mac_addresses, new_mac)) {
 		e_warn(drv,
 		       "VF %d attempted to override administratively set MAC address\n"