Part 2 of my series on RDMA in Kubernetes pods used SR-IOV. Each pod got a virtual function (VF) on each rail. The first time I tested those VFs, 7 of the 16 rails failed between two nodes. The other 9 gave the full bandwidth. I left that out of part 2, because it was not about VFs. This post covers it.

The short version:

  • Both nodes had the same /etc/machine-id. It came from the node image.
  • udev gives a new VF a MAC address that is a hash of the machine ID and the device name. So the same VF got the same MAC on both nodes.
  • Only some VFs kept that MAC. The SR-IOV operator copies the current MAC of each VF and makes it permanent. For each VF, udev or the operator was first, by less than 60 ms.
  • A rail failed when its VF had the same MAC on both nodes.
  • With a new machine ID on one node, all 16 MACs differed and all 16 rails worked.
  • A udev link file for the VFs also fixed it, with the same machine ID on both nodes.

Every manifest and script in this post ran on the test cluster. Long files are collapsed, so click a file name to open it.

The setup#

The setup is the one of part 2:

  • 2 x BM.GPU.B4.8 on OKE v1.36.4, with Ubuntu 24.04 and systemd 255.4
  • Each node has 16 RoCE rails at 100 Gb/s, rdma0 to rdma15
  • DOCA-OFED 3.5.0 in the shared RDMA namespace mode
  • The NVIDIA Network Operator 26.7.1, with its SR-IOV Network Operator

I ran the tests for this post on a second cluster from the same image, on 2026-11-16 UTC. Node 1 is 10.140.74.242 and node 2 is 10.140.84.69.

These results are for a single plane network with IPv4 rails, like the one these nodes use. The same logic applies to Oracle Cloud shapes on the multiplanar network, but their configuration is different.

The Helm values and the policies are the same as in part 2, with one change. The node policy selects the nodes by a label that I set:

kubectl label node 10.140.74.242 10.140.84.69 rdma-pods-test=true

One node policy creates 1 VF on each physical function (PF):

values.yaml
nfd:
  # The cluster already runs Node Feature Discovery.
  enabled: false

sriovNetworkOperator:
  enabled: true

sriov-network-operator:
  sriovOperatorConfig:
    deploy: true
    disableDrain: false
    configurationMode: daemon
    # The OCI image already sets the NIC firmware for SR-IOV.
    disablePlugins:
      - mellanox

operator:
  resources:
    requests:
      cpu: 5m
      memory: 256Mi
    limits:
      cpu: 500m
      memory: 512Mi
nic-cluster-policy.yaml
apiVersion: mellanox.com/v1alpha1
kind: NicClusterPolicy
metadata:
  name: nic-cluster-policy
spec:
  # The OCI image supplies the DOCA-OFED driver, so no ofedDriver section.
  nvIpam:
    image: nvidia-k8s-ipam
    repository: nvcr.io/nvidia/mellanox
    version: network-operator-v26.7.1
    enableWebhook: false
  secondaryNetwork:
    cniPlugins:
      image: plugins
      repository: nvcr.io/nvidia/mellanox
      version: network-operator-v26.7.1
    multus:
      image: multus-cni
      repository: nvcr.io/nvidia/mellanox
      version: network-operator-v26.7.1
ip-pool.yaml
apiVersion: nv-ipam.nvidia.com/v1alpha1
kind: IPPool
metadata:
  name: sriov-pool
  namespace: nvidia-network-operator
spec:
  subnet: 192.168.0.0/16
  perNodeBlockSize: 100
  gateway: 192.168.0.1
sriov-network-pool-config.yaml
apiVersion: sriovnetwork.openshift.io/v1
kind: SriovNetworkPoolConfig
metadata:
  name: rdma-vf
  namespace: nvidia-network-operator
spec:
  # Configure one GPU node at a time.
  maxUnavailable: 1
  nodeSelector:
    matchExpressions:
      - key: node.kubernetes.io/instance-type
        operator: In
        values:
          - BM.GPU.B4.8
sriov-network-shared.yaml
# Shared RDMA mode: no RDMA CNI. It refuses to run unless the mode is exclusive.
apiVersion: sriovnetwork.openshift.io/v1
kind: SriovNetwork
metadata:
  name: rdma-vf
  namespace: nvidia-network-operator
spec:
  resourceName: rdma-vf
  networkNamespace: default
  ipam: |
    {
      "type": "nv-ipam",
      "poolName": "sriov-pool"
    }
  metaPlugins: |
    {
      "type": "tuning",
      "sysctl": {
        "net.ipv4.conf.all.rp_filter": "0",
        "net.ipv4.conf.IFNAME.arp_announce": "2",
        "net.ipv4.conf.IFNAME.arp_filter": "1",
        "net.ipv4.conf.IFNAME.arp_ignore": "1",
        "net.ipv4.conf.IFNAME.rp_filter": "0",
        "net.ipv4.conf.IFNAME.accept_local": "1"
      }
    },
    {
      "type": "sbr",
      "addSourceHints": true
    }
sriov-network-node-policy.yaml
apiVersion: sriovnetwork.openshift.io/v1
kind: SriovNetworkNodePolicy
metadata:
  name: bm-gpu-b4-8
  namespace: nvidia-network-operator
spec:
  deviceType: netdevice
  mtu: 4220
  nicSelector:
    vendor: "15b3"
    rootDevices:
      - "0000:0c:00.0"
      - "0000:0c:00.1"
      - "0000:16:00.0"
      - "0000:16:00.1"
      - "0000:47:00.0"
      - "0000:47:00.1"
      - "0000:4b:00.0"
      - "0000:4b:00.1"
      - "0000:89:00.0"
      - "0000:89:00.1"
      - "0000:93:00.0"
      - "0000:93:00.1"
      - "0000:c3:00.0"
      - "0000:c3:00.1"
      - "0000:d1:00.0"
      - "0000:d1:00.1"
  nodeSelector:
    # Only the 2 test nodes have this label.
    rdma-pods-test: "true"
  isRdma: true
  numVfs: 1
  priority: 90
  resourceName: rdma-vf
  # The operator creates the VFs. Nothing else may write sriov_numvfs.
  externallyManaged: false

Two pods, one on each node, take all 16 VFs of their node:

vf-pods.yaml
# Two pods with 16 VFs each, one per GPU node, for the per-rail ib_write_bw test.
---
apiVersion: v1
kind: Pod
metadata:
  name: vf-n1
  namespace: default
  annotations:
    k8s.v1.cni.cncf.io/networks: rdma-vf,rdma-vf,rdma-vf,rdma-vf,rdma-vf,rdma-vf,rdma-vf,rdma-vf,rdma-vf,rdma-vf,rdma-vf,rdma-vf,rdma-vf,rdma-vf,rdma-vf,rdma-vf
spec:
  nodeSelector:
    kubernetes.io/hostname: "10.140.74.242"
  tolerations:
    - { key: nvidia.com/gpu, operator: Exists, effect: NoSchedule }
  containers:
    - name: rdma
      image: iad.ocir.io/idxzjcdglx2s/nccl-tests:cuda-13.4.1-ubuntu-24.04-nccl-2.32.3-100526.0
      command: ["sleep", "infinity"]
      securityContext:
        capabilities:
          add: ["IPC_LOCK"]
      resources:
        limits:
          nvidia.com/rdma-vf: 16
---
apiVersion: v1
kind: Pod
metadata:
  name: vf-n2
  namespace: default
  annotations:
    k8s.v1.cni.cncf.io/networks: rdma-vf,rdma-vf,rdma-vf,rdma-vf,rdma-vf,rdma-vf,rdma-vf,rdma-vf,rdma-vf,rdma-vf,rdma-vf,rdma-vf,rdma-vf,rdma-vf,rdma-vf,rdma-vf
spec:
  nodeSelector:
    kubernetes.io/hostname: "10.140.84.69"
  tolerations:
    - { key: nvidia.com/gpu, operator: Exists, effect: NoSchedule }
  containers:
    - name: rdma
      image: iad.ocir.io/idxzjcdglx2s/nccl-tests:cuda-13.4.1-ubuntu-24.04-nccl-2.32.3-100526.0
      command: ["sleep", "infinity"]
      securityContext:
        capabilities:
          add: ["IPC_LOCK"]
      resources:
        limits:
          nvidia.com/rdma-vf: 16

Seven rails fail#

I ran ib_write_bw on each rail. It ran from the VF of one pod to the VF of the other pod on the same rail:

vf-map.sh
#!/bin/bash
# Print "<PF PCI address> <interface> <ip> <rdma device>" for each VF interface of a pod.
# Usage: vf-map.sh <pod>
set -u
# shellcheck disable=SC2016
kubectl exec "$1" -- bash -c 'for n in /sys/class/net/net*; do i=${n##*/}; ip=$(ip -4 -o addr show dev "$i" | awk "NR == 1 { split(\$4, a, \"/\"); print a[1] }"); pf=$(readlink -f "$n/device/physfn"); echo "${pf##*/} $i $ip $(ls "$n/device/infiniband")"; done | sort'
rails-vf.sh
#!/bin/bash
# ib_write_bw on each rail, from the VF of one pod to the VF of another pod on the same PF, one rail at a time.
# Usage: rails-vf.sh [client pod] [server pod]
set -u
cli=${1:-vf-n1}
srv=${2:-vf-n2}
# The rail PFs in rail order (rdma0 to rdma15).
pfs="0c:00.0 0c:00.1 16:00.0 16:00.1 47:00.0 47:00.1 4b:00.0 4b:00.1 89:00.0 89:00.1 93:00.0 93:00.1 c3:00.0 c3:00.1 d1:00.0 d1:00.1"
smap=$(./vf-map.sh "$srv")
cmap=$(./vf-map.sh "$cli")
port=18515
r=0
for pf in $pfs; do
  read -r _ _ sip sdev < <(awk -v pf="0000:$pf" '$1 == pf' <<<"$smap")
  read -r _ cif _ cdev < <(awk -v pf="0000:$pf" '$1 == pf' <<<"$cmap")
  kubectl exec "$srv" -- ib_write_bw -d "$sdev" -x 3 -F --report_gbits -D 5 --tclass=41 -p $port >/dev/null 2>&1 &
  sleep 2
  out=$(kubectl exec "$cli" -- ib_write_bw -d "$cdev" -x 3 -F --report_gbits -D 5 --tclass=41 -p $port "$sip" 2>&1)
  wait
  res=$(echo "$out" | awk '/^ 65536/ {print $4" Gb/s"}')
  [ -z "$res" ] && res="FAILED: $(echo "$out" | grep -m1 -E 'Failed status|Couldn|error' )"
  echo "rdma$r $pf $cif $cdev -> $sip $res"
  printf '%s\n' "$out" >&2
  port=$((port + 1))
  r=$((r + 1))
done
rdma0 0c:00.0 net1 mlx5_18 -> 192.168.0.201 FAILED:  Completion with error at client
rdma1 0c:00.1 net2 mlx5_19 -> 192.168.0.202 FAILED:  Completion with error at client
rdma2 16:00.0 net3 mlx5_20 -> 192.168.0.203 FAILED:  Completion with error at client
rdma3 16:00.1 net4 mlx5_21 -> 192.168.0.204 FAILED:  Completion with error at client
rdma4 47:00.0 net5 mlx5_22 -> 192.168.0.205 96.88 Gb/s
rdma5 47:00.1 net6 mlx5_23 -> 192.168.0.206 FAILED:  Completion with error at client
rdma6 4b:00.0 net7 mlx5_24 -> 192.168.0.207 FAILED:  Completion with error at client
rdma7 4b:00.1 net8 mlx5_25 -> 192.168.0.208 96.88 Gb/s
rdma8 89:00.0 net9 mlx5_26 -> 192.168.0.209 FAILED:  Completion with error at client
rdma9 89:00.1 net10 mlx5_27 -> 192.168.0.210 96.88 Gb/s
rdma10 93:00.0 net11 mlx5_28 -> 192.168.0.211 96.87 Gb/s
rdma11 93:00.1 net12 mlx5_29 -> 192.168.0.212 96.87 Gb/s
rdma12 c3:00.0 net13 mlx5_30 -> 192.168.0.213 96.88 Gb/s
rdma13 c3:00.1 net14 mlx5_31 -> 192.168.0.214 98.61 Gb/s
rdma14 d1:00.0 net15 mlx5_32 -> 192.168.0.215 96.88 Gb/s
rdma15 d1:00.1 net16 mlx5_33 -> 192.168.0.216 96.88 Gb/s

Each failed rail gave the same error on the client:

 Completion with error at client
 Failed status-transport retry counter exceeded (12): wr_id 0 syndrom 0x81
 scnt=128, ccnt=0

The client posted 128 sends and none completed (scnt=128, ccnt=0). The other 9 VFs worked. So the cause had to be something that only some VFs had.

The same MAC on both nodes#

This script prints the MAC of each VF on a node. It also prints the random MAC that the kernel gave the VF first:

vf-macs.sh
#!/bin/bash
# Print each VF of this node: rail, PCI address, interface, MAC, addr_assign_type, and the random MAC the kernel gave it first.
# Runs on a GPU node. addr_assign_type: 0 permanent, 1 random, 3 set by user space.
set -u
for i in $(seq 0 15); do
  for v in /sys/class/net/rdma"$i"/device/virtfn*; do
    [ -e "$v" ] || continue
    pci=$(basename "$(readlink -f "$v")")
    dev=none mac=none typ=none
    for d in "$v"/net/*; do
      [ -e "$d" ] || continue
      dev=$(basename "$d")
      mac=$(cat "$d/address")
      typ=$(cat "$d/addr_assign_type")
    done
    first=$(sudo dmesg | grep "mlx5_core $pci: Assigned random MAC address" | tail -1 | awk '{print $NF}')
    echo "rdma$i $pci $dev $mac type=$typ kernel_random=${first:-none}"
  done
done

I tidied this script after the first runs, and its output did not change. I compared the two nodes:

RailVF MAC on node 1VF MAC on node 2ib_write_bw
rdma05a:56:7b:14:dc:7f5a:56:7b:14:dc:7fFailed
rdma102:7c:85:6b:b0:c802:7c:85:6b:b0:c8Failed
rdma24a:2c:da:bf:53:cd4a:2c:da:bf:53:cdFailed
rdma3fa:b6:e7:9d:d0:ddfa:b6:e7:9d:d0:ddFailed
rdma4ee:00:15:0d:08:111e:cd:6f:4e:2c:6a96.88 Gb/s
rdma53e:8e:bc:01:52:e03e:8e:bc:01:52:e0Failed
rdma602:05:f9:27:36:b902:05:f9:27:36:b9Failed
rdma79e:15:73:f9:fd:1766:d2:b6:41:c3:d596.88 Gb/s
rdma84a:f8:07:36:46:ad4a:f8:07:36:46:adFailed
rdma9c6:41:95:ad:32:01ae:25:0b:b1:e3:cd96.88 Gb/s
rdma10c2:67:60:9d:6b:9476:c9:e5:9d:4a:c896.87 Gb/s
rdma11fe:47:b4:01:cb:9c06:cb:7f:9b:16:9996.87 Gb/s
rdma12b2:d9:1e:17:45:82c2:28:37:47:45:8296.88 Gb/s
rdma1336:d9:f5:48:f2:787e:88:bd:12:4e:fe98.61 Gb/s
rdma1452:4b:39:e7:e5:8296:27:16:15:66:8396.88 Gb/s
rdma153e:ac:33:60:6c:748a:26:80:68:c1:8596.88 Gb/s

The 7 rails that failed are the 7 rails where both VFs have the same MAC. Both ends of such a rail are on the same network with the same MAC.

Later, after the fix below, I traced a failed rail. For that run, node 2 had the old machine ID again and a fresh boot. Node 1 was not rebooted, so its VFs came back with the MACs of the first run. This time 5 rails had the same MAC on both nodes, and those 5 failed. For these later runs, I used a copy of rails-vf.sh with a 60 second timeout on each command. Without it, the script hung on a failed rail. This script runs tcpdump in both pods during a ping:

trace-rail.sh
#!/bin/bash
# Trace one rail between the two VF pods: ARP and ping with tcpdump on both ends, then ib_write_bw with the VF counters before and after.
# Usage: trace-rail.sh <interface> <RDMA device> <client IP> <server IP>
set -u
if=$1 dev=$2 cip=$3 sip=$4
cli=vf-n1 srv=vf-n2
ctr() { kubectl exec "$1" -- bash -c "ethtool -S $if | grep -E 'vport_(rdma_)?unicast_packets|vport_broadcast_packets'" | sed "s/^ */$1 $2 /"; }
echo "##### $(date -u +%T) $if $dev client $cip server $sip"
for p in $cli $srv; do echo "$p $if MAC $(kubectl exec $p -- cat /sys/class/net/"$if"/address)"; done
echo "##### ping with tcpdump on both ends"
for p in $cli $srv; do kubectl exec $p -- bash -c "timeout 12 tcpdump -e -n -i $if 'arp or icmp' >/tmp/trace-$if.txt 2>&1" & done
sleep 3
kubectl exec $cli -- bash -c "ip neigh flush dev $if; ping -I $if -c 3 -W 1 $sip; echo '--- client neighbors on $if'; ip neigh show dev $if"
wait
for p in $cli $srv; do echo "--- tcpdump on $p $if"; kubectl exec $p -- cat /tmp/trace-"$if".txt; done
echo "##### ib_write_bw with VF counters"
for p in $cli $srv; do ctr $p before; done
kubectl exec $srv -- timeout 40 ib_write_bw -d "$dev" -x 3 -F --report_gbits -D 5 --tclass=41 -p 18600 >/dev/null 2>&1 &
sleep 2
kubectl exec $cli -- timeout 40 ib_write_bw -d "$dev" -x 3 -F --report_gbits -D 5 --tclass=41 -p 18600 "$sip" 2>&1 | grep -E '^ 65536|Completion with error|Failed status|syndrom'
wait
for p in $cli $srv; do ctr $p after; done

I traced rdma1, which is net2 in the pods. The script tries to clear the neighbor entry first. The pods do not have the permission for that, so this step failed. The client asked for the MAC of the server with ARP. This is the capture in the server pod:

14:34:53.956073 02:7c:85:6b:b0:c8 > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 60: Request who-has 192.168.0.202 tell 192.168.0.102, length 46
14:34:53.956095 02:7c:85:6b:b0:c8 > 02:7c:85:6b:b0:c8, ethertype ARP (0x0806), length 42: Reply 192.168.0.202 is-at 02:7c:85:6b:b0:c8, length 28

The server got the request and answered. But the answer goes to the MAC of the client, and that is the MAC of the server too. The capture in the client pod has the 3 requests and no reply. The ping lost all 3 packets. On rdma0, which worked in this run, both pods saw the ping requests and the replies.

RDMA packets do not pass through the network stack of the kernel. So tcpdump on the interface does not show them, and I read the VF counters instead:

trace-rdma.sh
#!/bin/bash
# One ib_write_bw run on one rail, with the client output, the neighbor entries for the server IP and the VF counters before and after.
# Usage: trace-rdma.sh <interface> <RDMA device> <server IP>
set -u
if=$1 dev=$2 sip=$3
cli=vf-n1 srv=vf-n2
ctr() { kubectl exec "$1" -- bash -c "ethtool -S $if | grep -E 'vport_rdma_unicast_(packets|bytes)'" | sed "s/^ */$1 $2 /"; }
echo "##### $(date -u +%T) $if $dev server $sip"
echo "--- client neighbor entries for $sip before"; kubectl exec $cli -- bash -c "ip neigh show | grep -w $sip"
ctr $cli before; ctr $srv before
kubectl exec $srv -- timeout 40 ib_write_bw -d "$dev" -x 3 -F --report_gbits -D 5 --tclass=41 -p 18700 >/dev/null 2>&1 &
sleep 2
kubectl exec $cli -- timeout 40 ib_write_bw -d "$dev" -x 3 -F --report_gbits -D 5 --tclass=41 -p 18700 "$sip" 2>&1 | sed -n '/local address/,$p'
wait
echo "--- client neighbor entries for $sip after"; kubectl exec $cli -- bash -c "ip neigh show | grep -w $sip"
ctr $cli after; ctr $srv after

I ran it on rdma2 (net3), which had the same MAC on both nodes, and on rdma4 (net5). On rdma1, the client’s neighbor entry for the server was FAILED, and ib_write_bw printed nothing. On rdma2, the client had an entry, and it pointed to the client’s own MAC:

192.168.0.203 dev net3 lladdr 4a:2c:da:bf:53:cd STALE

The table shows how much each counter changed during one ib_write_bw run:

RailClient VF, RDMA packets sentClient VF, RDMA packets receivedServer VF, RDMA packets received
rdma2, same MAC022,5280
rdma4, different MACs14,784,384966,99814,784,384

On rdma2, the server VF received nothing. The client VF counted 22,528 packets as received and none as sent. These counters fit packets that the NIC hands straight back to the VF, because the destination MAC is its own. I did not capture the packets, so I cannot show that path.

A VF has no MAC of its own from the factory, so something on the node made these MACs. Two nodes do not make the same 7 random MACs by chance.

Where the MAC comes from#

When the operator creates a VF, the kernel gives it a random MAC:

[Mon Nov 16 01:10:55 2026] mlx5_core 0000:c3:10.1: Assigned random MAC address 36:d9:f5:48:f2:78

Then udev, the device manager of systemd, handles the new interface. On Ubuntu 24.04, the default link file applies to every interface that no other link file matches:

$ grep -v '^#' /usr/lib/systemd/network/99-default.link

[Match]
OriginalName=*

[Link]
NamePolicy=keep kernel database onboard slot path
AlternativeNamesPolicy=database onboard slot path
MACAddressPolicy=persistent

udevadm info showed that the VFs use this file. These are 3 of its lines:

E: ID_NET_NAME_PATH=enp12s0f0v0
E: ID_NET_LINK_FILE=/usr/lib/systemd/network/99-default.link
E: ID_NET_NAME=rdma0v0

With MACAddressPolicy=persistent, udev replaces a random MAC with a generated one. The MAC must stay the same across boots, so udev cannot use a random number. The systemd source at v255 shows what it uses. It hashes the machine ID and a stable name of the device:

        /* Fetch some persistent data unique to this machine */
        r = sd_id128_get_machine((sd_id128_t*) v);
        if (r < 0)
                 return r;

        memcpy(v + sizeof(sd_id128_t), name, l);

        /* Let's hash the machine ID plus the device name. We use
         * a fixed, but originally randomly created hash key here. */
        *ret = htole64(siphash24(v, sz, key->bytes));

The stable name is the first of ID_NET_NAME_ONBOARD, ID_NET_NAME_SLOT, ID_NET_NAME_PATH and ID_NET_NAME_MAC that the device has. For these VFs it is the path name, like enp12s0f0v0. The path name comes from the PCI address of the PF and the number of the VF. The two nodes are the same shape, so the same VF has the same path name on both.

That leaves the machine ID as the only input that should differ between nodes. It did not. Both nodes had the machine ID acf46b908b704612acf6f9788245a413. The same machine ID and the same path name give the same hash, and so the same MAC.

I turned on debug logs in udev with udevadm control --log-level=debug and created the VFs. The kernel records where a MAC came from in addr_assign_type. 0 is a permanent MAC, 1 is a random one, and 3 is one that software set. A new VF shows up as eth2 before it gets its name. udev logged the change on both nodes. I cut the host name from the log lines in this post:

Nov 16 01:10:26.455286 (udev-worker)[2804861]: eth2: addr_assign_type=1, MAC address is not permanent.
Nov 16 01:10:26.458389 (udev-worker)[2804861]: eth2: Applying persistent MAC address: 5a:56:7b:14:dc:7f

I first saw this problem a week earlier, on two nodes of another cluster from the same image. The VF on rdma0 had the MAC 5a:56:7b:14:dc:7f there too. So 4 nodes in 2 clusters made the same MAC for the same VF.

Why only some VFs#

If udev gives every VF a hashed MAC, all 16 rails should fail. Only 7 did. On each node, some VFs kept the random MAC from the kernel.

The reason is in the SR-IOV operator. After it creates a VF, it reads the MAC of the VF. It sets that MAC as the admin MAC of the VF on the PF. The admin MAC is the MAC that the PF assigns to the VF. This is SetVfAdminMac in the operator’s config daemon, which runs on each node:

	if err := s.netlinkLib.LinkSetVfHardwareAddr(pfLink, vfID, vfLink.Attrs().HardwareAddr); err != nil {
		return err
	}

Then it unbinds the VF from its driver and binds it again, for a policy with isRdma: true like this one. After that, the VF has the admin MAC as its permanent MAC. udev leaves it alone from then on:

Nov 16 01:10:50.468861 (udev-worker)[2809816]: rdma10v0: Device has addr_assign_type=0
Nov 16 01:10:50.469010 (udev-worker)[2809816]: rdma10v0: MAC address on the device already matches policy "persistent".

So udev and the operator both act on a new VF at almost the same time. The MAC that the operator reads is the one that stays. I put the two logs of node 1 next to each other:

VF onudev logs the hashed MACOperator logs SetVfAdminMac()FirstMAC that stays
rdma001:10:26.45838901:10:26.509638udev, by 51 msHashed
rdma301:10:33.16408201:10:33.193010udev, by 29 msHashed
rdma401:10:35.42227001:10:35.398948Operator, by 23 msRandom
rdma801:10:44.27368301:10:44.274408udev, by 0.7 msHashed
rdma1001:10:48.70819701:10:48.699754Operator, by 8 msRandom

Both times are log lines, not the events themselves. udev writes its line just before it sets the MAC. The operator reads the MAC in VFIsReady(), shortly before its SetVfAdminMac() line. For rdma8, the VFIsReady() line is 0.2 ms earlier, so udev was first by 0.5 ms. The logs cover rdma0 to rdma11 on both nodes, and all 24 VFs fit this pattern. The journal dropped the udev debug lines after that, because there were too many. The VFs on rdma12 to rdma15 kept their random MACs on both nodes.

Later I turned off the rate limit of the journal with this script. Then I ran the test again. Node 2 had the old machine ID and a fresh boot, as in the trace above:

journald-no-ratelimit.sh
#!/bin/bash
# Turn off the journald rate limit, so udev debug lines are not dropped. Runs on a GPU node.
set -eu
sudo mkdir -p /etc/systemd/journald.conf.d
printf '[Journal]\nRateLimitIntervalSec=0\nRateLimitBurst=0\n' | sudo tee /etc/systemd/journald.conf.d/no-ratelimit.conf
sudo systemctl restart systemd-journald

That run logged all 16 VFs, and the journal dropped no lines. The hashed MAC stayed on 6 VFs. udev was first for all 6, by 14 to 55 ms. The random MAC stayed on the other 10. The operator was first for 8 of those, by 4 to 34 ms. For rdma0, udev found that the interface was already gone. For rdma11, udev’s line came 0.1 ms before the SetVfAdminMac() line. But the VFIsReady() line came 0.1 ms before udev’s line, and that is where the operator reads the MAC. So the operator was first there too.

In the first run, 8 VFs on each node kept the hashed MAC and 8 kept the random one. udev was first on both nodes for 7 rails. Those are the 7 that failed. In the later run, node 2 had 6 hashed MACs, and 5 of them matched node 1. rdma4 had a random MAC on node 1.

A hashed MAC on one node only does no harm. rdma4 on node 2 and rdma9 on node 1 had one, and both rails worked.

The MACs stay#

I deleted the node policy, so the operator removed the VFs. Then I applied it again. I did this twice:

recreate-vfs.sh
#!/bin/bash
# Remove the VFs by deleting the node policy, then create them again. Runs on the operator host in ~/vfmac.
set -u
nodes="10.140.74.242 10.140.84.69"
wait_vfs() {
  for _ in $(seq 1 90); do
    # shellcheck disable=SC2086
    a=$(kubectl get node $nodes -o jsonpath='{range .items[*]}{.status.allocatable.nvidia\.com/rdma-vf} {end}')
    # shellcheck disable=SC2086
    s=$(kubectl -n nvidia-network-operator get sriovnetworknodestates $nodes -o jsonpath='{range .items[*]}{.status.syncStatus} {end}')
    [ "$a" = "$1" ] && [ "$s" = "Succeeded Succeeded " ] && break
    sleep 5
  done
  echo "### $(date -u +%T) allocatable '$a' sync '$s'"
}
echo "### $(date -u +%T) delete pods and the node policy"
kubectl delete -f vf-pods.yaml --ignore-not-found --wait=true
kubectl delete -f sriov-network-node-policy.yaml --wait=true
wait_vfs "0 0 "
echo "### $(date -u +%T) apply the node policy"
kubectl apply -f sriov-network-node-policy.yaml
sleep 10
wait_vfs "16 16 "

Every VF came back with the MAC it had before, on both nodes and in both rounds. The kernel log had no new “Assigned random MAC address” lines. The admin MAC stays on the PF when the VF goes away, so a new VF starts with it. In the first round on node 1, udev logged this for each VF in its log:

Nov 16 01:18:14.361106 (udev-worker)[2859676]: eth2: Device has addr_assign_type=0
Nov 16 01:18:14.361258 (udev-worker)[2859676]: eth2: MAC address on the device already matches policy "persistent".

So the first creation after a boot decides the MACs. Creating the VFs again does not fix a pair of nodes that got the same ones.

Where the machine ID came from#

/etc/machine-id on the nodes is older than the nodes:

$ stat -c '%y %n' /etc/machine-id
2026-10-29 13:20:08.239000000 +0000 /etc/machine-id

I created this cluster on 2026-11-13. The file is from 2026-10-29, so it was in the node image. The image still had its machine ID in it, and every node from it starts with that ID.

systemd makes a new ID when the file is missing or empty at boot. It first looks for a D-Bus ID in /var/lib/dbus/machine-id. On these nodes that file is a symlink to /etc/machine-id, so nothing brings the old ID back. The machine-id man page describes this. So an image should have an empty /etc/machine-id and no separate D-Bus ID. Each new node then gets its own.

The fix#

I gave node 2 a new machine ID and rebooted it:

new-machine-id.sh
#!/bin/bash
# Give one node a new machine ID, reboot it, and wait until its 16 RDMA rails have IP addresses.
# Usage: new-machine-id.sh <node>
set -u
n=$1
dbg() {
  kubectl debug "node/$n" --profile=sysadmin --image=busybox:1.37 -q --attach=true -- chroot /host bash -c "$1" 2>&1 | grep -v -e Warning -e 'falling back'
}
clean() {
  kubectl get pods -o name | grep node-debugger- | xargs -r kubectl delete --wait=true
}
echo "### $(date -u +%T) old ID"
dbg 'cat /etc/machine-id'
# systemd-machine-id-setup writes a random ID now, so the next boot is not a first boot.
dbg 'rm -f /etc/machine-id && systemd-machine-id-setup && ls -l /etc/machine-id /var/lib/dbus/machine-id'
clean
boot=$(kubectl get node "$n" -o jsonpath='{.status.nodeInfo.bootID}')
echo "### $(date -u +%T) drain, boot ID $boot"
kubectl drain "$n" --ignore-daemonsets --delete-emptydir-data --timeout=15m
dbg 'systemctl reboot'
until [ "$(kubectl get node "$n" -o jsonpath='{.status.nodeInfo.bootID}')" != "$boot" ]; do sleep 30; done
echo "### $(date -u +%T) new boot ID $(kubectl get node "$n" -o jsonpath='{.status.nodeInfo.bootID}')"
kubectl wait --for=condition=Ready "node/$n" --timeout=30m
kubectl uncordon "$n"
echo "### $(date -u +%T) Ready"
# shellcheck disable=SC2016
until [ "$(dbg 'ip -o addr show scope global | awk '"'"'$2 ~ /^rdma[0-9]+$/ {print $2}'"'"' | sort -u | wc -l')" = 16 ]; do sleep 60; done
echo "### $(date -u +%T) 16 RDMA rails have an IP address"
dbg 'cat /etc/machine-id'
kubectl get node "$n" -o jsonpath='{.status.nodeInfo.machineID}{"\n"}'
clean

These are the main lines of its output:

### 01:22:30 old ID
acf46b908b704612acf6f9788245a413
Initializing machine ID from random generator.
### 01:22:35 drain, boot ID de95546c-972c-4ac0-9052-1791ca3ae861
### 01:33:26 new boot ID 05e55965-11a9-4c0a-95fc-fc0dc3d45702
### 01:33:28 Ready
### 01:38:41 16 RDMA rails have an IP address
2eed4ab1a1fc4ac0942f781e07ffb47c

The node policy was still in place, so the operator created the VFs again after the reboot. The reboot also cleared the old admin MACs. All 16 VFs of node 2 got new MACs, and none matched node 1. Of these, 15 kept the random MAC from the kernel. rdma4 got another MAC, ba:80:ee:c7:16:a3. With the old ID, its hashed MAC was 1e:cd:6f:4e:2c:6a. I did not log udev and the operator for this boot.

Then I ran the rail test again:

rdma0 0c:00.0 net1 mlx5_18 -> 192.168.0.201 96.88 Gb/s
rdma1 0c:00.1 net2 mlx5_19 -> 192.168.0.202 96.88 Gb/s
rdma2 16:00.0 net3 mlx5_20 -> 192.168.0.203 96.88 Gb/s
rdma3 16:00.1 net4 mlx5_21 -> 192.168.0.204 96.88 Gb/s
rdma4 47:00.0 net5 mlx5_22 -> 192.168.0.205 96.87 Gb/s
rdma5 47:00.1 net6 mlx5_23 -> 192.168.0.206 96.88 Gb/s
rdma6 4b:00.0 net7 mlx5_24 -> 192.168.0.207 96.88 Gb/s
rdma7 4b:00.1 net8 mlx5_25 -> 192.168.0.208 96.88 Gb/s
rdma8 89:00.0 net9 mlx5_26 -> 192.168.0.209 96.87 Gb/s
rdma9 89:00.1 net10 mlx5_27 -> 192.168.0.210 96.88 Gb/s
rdma10 93:00.0 net11 mlx5_28 -> 192.168.0.211 96.87 Gb/s
rdma11 93:00.1 net12 mlx5_29 -> 192.168.0.212 96.87 Gb/s
rdma12 c3:00.0 net13 mlx5_30 -> 192.168.0.213 96.88 Gb/s
rdma13 c3:00.1 net14 mlx5_31 -> 192.168.0.214 96.87 Gb/s
rdma14 d1:00.0 net15 mlx5_32 -> 192.168.0.215 96.87 Gb/s
rdma15 d1:00.1 net16 mlx5_33 -> 192.168.0.216 96.88 Gb/s

All 16 rails gave 96.87 to 96.88 Gb/s.

This run has a weak point. The operator created the VFs during the boot, and 15 of 16 kept random MACs. Random MACs differ with any machine ID. So this run shows that the rails work when the MACs differ. The evidence that a new ID changes the hashed MACs is the source above and the new MAC of rdma4.

A new ID on each node fixes the nodes you have. The real fix is in the image, so that new nodes do not start with a shared ID.

There is a second way that leaves the machine ID alone. A link file can tell udev to keep the MAC that a VF already has. udev uses the first link file that matches an interface, so this file must sort before 99-default.link. The file also repeats the two name policy lines of 99-default.link, because udev applies only one link file:

70-sriov-vf.link
# Keep the MAC that the kernel or the PF gives a VF. Without this file, 99-default.link applies MACAddressPolicy=persistent.
# 0x101a is the PCI device ID of the ConnectX-5 Ex Virtual Function.
[Match]
Driver=mlx5_core
Property=ID_MODEL_ID=0x101a

[Link]
NamePolicy=keep kernel database onboard slot path
AlternativeNamesPolicy=database onboard slot path
MACAddressPolicy=none

The file matches the VFs by their PCI device ID. 0x101a is the ID of the VFs of the NICs in these nodes. Other NICs have another ID. udevadm info on a VF shows it as ID_MODEL_ID.

Node 2 already had the old machine ID again for the later runs, so both nodes shared one ID. This is the script that set it:

set-machine-id.sh
#!/bin/bash
# Write a given machine ID to this node and reboot it. Runs on a GPU node.
# Usage: set-machine-id.sh <32 hex characters>
set -eu
id=$1
[[ $id =~ ^[0-9a-f]{32}$ ]] || { echo "bad machine ID"; exit 1; }
echo "old: $(cat /etc/machine-id)"
ls -l /etc/machine-id /var/lib/dbus/machine-id
echo "$id" | sudo tee /etc/machine-id
sudo systemctl reboot

Then I installed the link file on both nodes. The script also reboots the node, and the reboot clears the admin MACs from the earlier runs:

install-link-file.sh
#!/bin/bash
# Install the VF link file from stdin, keep udev debug logging across the reboot, and reboot. Runs on a GPU node.
set -eu
sudo tee /etc/systemd/network/70-sriov-vf.link
sudo udevadm control --reload
sudo sed -i '/^udev_log=/d' /etc/udev/udev.conf
echo 'udev_log=debug' | sudo tee -a /etc/udev/udev.conf
sudo pkill -f 'udevadm monitor' || true
sudo pkill -f 'ip -ts monitor' || true
sudo mkdir -p /var/tmp/vfmac
date -u '+%Y-%m-%d %H:%M:%S' | sudo tee /var/tmp/vfmac/start
cat /etc/machine-id
sudo systemctl reboot

In my first try, the node policy was still in place, so the operator created the VFs during the boot. All 32 VFs kept their random MACs. That proves little. In the previous section, 15 of 16 VFs created during a boot kept their random MACs without this file.

So I deleted the node policy and rebooted both nodes again. I applied the policy only after both nodes were up. That is the case where udev had set hashed MACs before.

udev now used the new file for each VF, and it left the MAC alone:

Nov 16 16:09:50.528846 (udev-worker)[154091]: eth2: Device has addr_assign_type=1
Nov 16 16:09:50.529048 (udev-worker)[154091]: eth2: Config file /etc/systemd/network/70-sriov-vf.link is applied
Nov 16 16:09:50.529053 (udev-worker)[154091]: eth2: Using static MAC address.

The udev logs of both nodes have no “Applying persistent MAC address” line for a VF in this run. All 32 VFs kept the random MAC from the kernel. All 16 rails had different MACs on the two nodes. The rail test gave 96.87 to 97.82 Gb/s on all 16 rails, with the same machine ID on both nodes. After each reboot, the test pod on that node did not start until I restarted its nv-ipam-node pod.

I would still fix the machine ID. The link file only covers the VF MACs, and other software can use the machine ID too.

How to check your nodes#

One command shows it. This is my cluster after the machine ID fix, before the link file test:

$ kubectl get nodes -o custom-columns='NODE:.metadata.name,MACHINE-ID:.status.nodeInfo.machineID'
NODE            MACHINE-ID
10.140.66.243   acf46b908b704612acf6f9788245a413
10.140.74.242   acf46b908b704612acf6f9788245a413
10.140.84.69    2eed4ab1a1fc4ac0942f781e07ffb47c
10.140.85.10    acf46b908b704612acf6f9788245a413
10.140.86.84    acf46b908b704612acf6f9788245a413
10.140.89.190   73235e6213cc4f31950f2265e6b7f976
10.140.93.198   acf46b908b704612acf6f9788245a413

Two nodes have a new ID, and the other 5 still share the ID of the image. Node 10.140.89.190 got its ID the same way, in the tests for part 2. Every node should have its own ID. If two nodes share one, anything that derives a value from the machine ID can collide. The VF MAC is the case I hit. A node needs a reboot after its ID changes, because its VFs keep their MACs until then. vf-macs.sh above prints the VF MACs of a node, so you can compare two nodes.

The limits of these tests:

  • Two nodes of one shape, one image, and one version of systemd and of the operator.
  • I read the systemd source at the v255 tag. The nodes run the Ubuntu build 255.4.
  • The link file matches one PCI device ID. I tested it with two creations of the VFs on each node, one during a boot and one after.
  • The new machine ID test created the VFs during a boot, and 15 of 16 MACs were random.
  • I did not capture the RDMA packets of a failed rail. That part comes from the VF counters.