Using vpdinfo
Use the vpdinfo tool to read MAC addresses of the SmartNIC. For
example:
./vpdinfo -a0 -r --mask=0x00020000An output example:
ADAPTER #0, MAC address : 00:0D:E9:07:82:50The output shows the MAC address of port 0 of the SmartNIC. Add 1 to get the MAC address of the port 1.
Note: The vfio kernel driver must be unloaded to be able to run the
vpdinfo tool. If the vfio kernel driver is running, execute the
following
command.
DEV=$(lspci -Dd 18f4: | cut -d' ' -f1 | head -1) echo $DEV > /sys/bus/pci/devices/$DEV/driver/unbind