Message ID | 20190702122259.79070-2-alice.michael@intel.com |
---|---|
State | Changes Requested |
Delegated to: | Jeff Kirsher |
Headers | show |
Series | [next,S7,1/9] i40e: fix incorrect ethtool statistics veb and veb.tc_ | expand |
> -----Original Message----- > From: Intel-wired-lan [mailto:intel-wired-lan-bounces@osuosl.org] On > Behalf Of Alice Michael > Sent: Tuesday, July 2, 2019 5:23 AM > To: Michael, Alice <alice.michael@intel.com>; intel-wired- > lan@lists.osuosl.org > Cc: Loktionov, Aleksandr <aleksandr.loktionov@intel.com> > Subject: [Intel-wired-lan] [next PATCH S7 2/9] i40e: make visible changed vf > mac on host > > From: Aleksandr Loktionov <aleksandr.loktionov@intel.com> > > This patch makes changed vm mac address visible on host via ip link show > command. This problem is fixed by copying last unicast mac filter to vf- > >default_lan_addr.addr. Without this patch if vf mac was not set from host > side and if you run ip link show $pf, on host side you'd always see a zero mac, > not the real vf mac that vf assigned to itself. > > Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com> > --- > drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 3 +++ > 1 file changed, 3 insertions(+) Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c index 02b09a8ad54c..21f7ac514d1f 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c +++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c @@ -2629,6 +2629,9 @@ static int i40e_vc_add_mac_addr_msg(struct i40e_vf *vf, u8 *msg) } else { vf->num_mac++; } + if (is_valid_ether_addr(al->list[i].addr)) + ether_addr_copy(vf->default_lan_addr.addr, + al->list[i].addr); } } spin_unlock_bh(&vsi->mac_filter_hash_lock);