Need sysadmin to set MAC address manually for VF

Bug #1835018 reported by ChenjieXu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Invalid
Low
Steven Webster

Bug Description

Brief Description
-----------------
After allocating VFs by system command, sysadmin still needs to set MAC address for each VF by ip link command. If a lot of VFs are allocated such as 64 VFs, it will be tedious to set the MAC address or sysadmin needs to write a script. It will be better that StarlingX can set the MAC address automatically for the VFs.

Severity
--------
Mayjor

Steps to Reproduce
------------------
1.Set up StarlingX AIO Simplex
2. system host-lock controller-0
   system host-if-modify -m 1500 -n sriov1 -d datanet1 -c pci-sriov -N 64 --vf-driver=vfio controller-0 ens801f1
   system host-unlock controller-0
   ip link show ens801f1
3. sysadmin needs to use ip link command to set the MAC address
   sudo ip link set ens801f1 vf 0 mac 9e:fd:e6:dd:c1:01
   sudo ip link set ens801f1 vf 1 mac 9e:fd:e6:dd:c1:02
   ……
   sudo ip link set ens801f1 vf 63 mac 9e:fd:e6:dd:c1:64

Expected Behavior
------------------
It will be better that StarlingX set the MAC address automatically.

Actual Behavior
----------------
sysadmin needs to set the MAC address manually.

Reproducibility
---------------
100%

System Configuration
--------------------
AIO Simplex

Branch/Pull Time/Commit
-----------------------
stx master as of 20190611T160613Z

Last Pass
---------
No

Timestamp/Logs
--------------
enp24s0f0: <BROADCAST,MULTICAST> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000
    link/ether 3c:fd:fe:da:e8:84 brd ff:ff:ff:ff:ff:ff
    vf 0 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 1 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 2 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 3 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 4 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 5 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 6 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 7 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 8 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 9 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 10 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 11 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 12 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 13 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 14 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 15 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 16 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 17 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 18 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 19 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 20 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 21 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 22 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 23 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 24 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 25 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 26 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 27 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 28 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 29 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 30 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 31 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 32 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 33 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 34 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 35 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 36 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 37 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 38 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 39 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 40 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 41 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 42 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 43 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 44 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 45 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 46 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 47 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 48 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 49 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 50 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 51 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 52 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 53 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 54 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 55 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 56 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 57 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 58 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 59 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 60 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 61 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 62 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 63 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off

Test Activity
-------------
Developer Testing

ChenjieXu (midone)
description: updated
description: updated
Revision history for this message
Ghada Khalil (gkhalil) wrote :

By default, the mac address is first set to 0, but it will be assigned automatically by the system once the VF is instantiated.

tags: added: stx.networking
Changed in starlingx:
importance: Undecided → Low
status: New → Invalid
assignee: nobody → Steven Webster (swebster-wr)
Revision history for this message
ChenjieXu (midone) wrote :

Hi Ghada/Steven,

The user also needs to know the MAC address of the allocated VF. For now, user can get the PCI addresses of the allocated VFs by env as following:

[root@testpmd /]# env
```
PCIDEVICE_INTEL_COM_PCI_SRIOV_NET_PHYSNET1=0000:41:02.0,0000:41:02.1
```

Maybe StarlingX can also put the MAC address of the allocated VF in the env.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.