linux-stable/drivers/net/ethernet/intel/iavf
Michal Wilczynski 6456038442 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: a3e839d539 ("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>
2022-06-09 08:58:15 -07:00
..
Makefile
iavf.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-03-10 17:16:56 -08:00
iavf_adminq.c
iavf_adminq.h
iavf_adminq_cmd.h
iavf_adv_rss.c
iavf_adv_rss.h
iavf_alloc.h
iavf_client.c
iavf_client.h
iavf_common.c iavf: Remove non-inclusive language 2022-03-01 08:50:11 -08:00
iavf_devids.h
iavf_ethtool.c
iavf_fdir.c
iavf_fdir.h
iavf_main.c iavf: Fix issue with MAC address of VF shown as zero 2022-06-09 08:58:15 -07:00
iavf_osdep.h
iavf_prototype.h
iavf_register.h
iavf_status.h iavf: Remove non-inclusive language 2022-03-01 08:50:11 -08:00
iavf_trace.h
iavf_txrx.c iavf: Add support for 50G/100G in AIM algorithm 2022-03-01 08:50:10 -08:00
iavf_txrx.h
iavf_type.h
iavf_virtchnl.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-03-10 17:16:56 -08:00