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.
π‘ Quick Answer: Map each interface with
readlink -f /sys/class/net/<iface>/device, then runlspci -nn -s <pci>andethtool -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'
doneBuild 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.

Recommended
Kubernetes Recipes β The Complete Book100+ production-ready patterns with detailed explanations, best practices, and copy-paste YAML. Everything in one place.
Get the Book βLearn by Doing
CopyPasteLearn β Hands-on Cloud & DevOps CoursesMaster Kubernetes, Ansible, Terraform, and MLOps with interactive, copy-paste-run lessons. Start free.
Browse Courses β