πŸ“šBook Signing at KubeCon EU 2026Meet us at Booking.com HQ (Mon 18:30-21:00) & vCluster booth #521 (Tue 24 Mar, 12:30-1:30pm) β€” free book giveaway!RSVP Booking.com Event
Troubleshooting intermediate ⏱ 15 minutes K8s Any

Identify Mellanox Interface Models from Linux and PCI Data

Map interface names to PCI addresses and Mellanox model generations to build accurate SR-IOV policies and GPU networking configurations on Kubernetes.

By Luca Berton β€’ β€’ πŸ“– 5 min read

πŸ’‘ Quick Answer: Map each interface with readlink -f /sys/class/net/<iface>/device, then run lspci -nn -s <pci> and ethtool -i <iface> to identify model and firmware before writing SR-IOV selectors.

Correct NIC model mapping prevents wrong SR-IOV policy selectors.

Collect Interface-to-PCI Mapping

for iface in eno16995np0 eno17095np0 eno17195np0; do
  echo "=== $iface ==="
  pci=$(basename "$(readlink -f /sys/class/net/$iface/device)")
  echo "PCI: $pci"
  lspci -nn -s "$pci"
  ethtool -i "$iface" | grep -E 'driver|firmware-version|bus-info'
done

Build a Mapping Table

Capture at least:

  • Interface name
  • PCI address
  • Vendor/device ID (15b3:xxxx)
  • Driver (mlx5_core)
  • Firmware version

Use Mapping in Policies

Prefer rootDevices + deviceID selectors:

nicSelector:
  rootDevices:
    - "0000:b5:00.0"
  vendor: "15b3"
  deviceID: "1021"

Why This Matters

  • Prevents selecting bonded or unrelated interfaces.
  • Reduces webhook admission errors.
  • Makes policy behavior deterministic across reboots and renames.
#mellanox #connectx #pci #sriov #troubleshooting
Luca Berton
Written by Luca Berton

Principal Solutions Architect specializing in Kubernetes, AI/GPU infrastructure, and cloud-native platforms. Author of Kubernetes Recipes and creator of CopyPasteLearn courses.

Kubernetes Recipes book cover

Want More Kubernetes Recipes?

This recipe is from Kubernetes Recipes, our 750-page practical guide with hundreds of production-ready patterns.

Luca Berton Ansible Pilot Ansible by Example Open Empower K8s Recipes Terraform Pilot CopyPasteLearn ProteinLens