Skip to content

Commit 6456038

Browse files
mwilczyanguy11
authored andcommitted
iavf: Fix issue with MAC address of VF shown as zero
After reinitialization of iavf, ice driver gets VIRTCHNL_OP_ADD_ETH_ADDR message with incorrectly set type of MAC address. Hardware address should have is_primary flag set as true. This way ice driver knows what it has to set as a MAC address. Check if the address is primary in iavf_add_filter function and set flag accordingly. To test set all-zero MAC on a VF. This triggers iavf re-initialization and VIRTCHNL_OP_ADD_ETH_ADDR message gets sent to PF. For example: ip link set dev ens785 vf 0 mac 00:00:00:00:00:00 This triggers re-initialization of iavf. New MAC should be assigned. Now check if MAC is non-zero: ip link show dev ens785 Fixes: a3e839d ("iavf: Add usage of new virtchnl format to set default MAC") Signed-off-by: Michal Wilczynski <michal.wilczynski@intel.com> Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com> Tested-by: Konrad Jankowski <konrad0.jankowski@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
1 parent fd5855e commit 6456038

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/net/ethernet/intel/iavf/iavf_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -984,7 +984,7 @@ struct iavf_mac_filter *iavf_add_filter(struct iavf_adapter *adapter,
984984
list_add_tail(&f->list, &adapter->mac_filter_list);
985985
f->add = true;
986986
f->is_new_mac = true;
987-
f->is_primary = false;
987+
f->is_primary = ether_addr_equal(macaddr, adapter->hw.mac.addr);
988988
adapter->aq_required |= IAVF_FLAG_AQ_ADD_MAC_FILTER;
989989
} else {
990990
f->remove = false;

0 commit comments

Comments
 (0)