diff -rup systemd-232/src/udev/udev-builtin-net_id.c systemd-232-new/src/udev/udev-builtin-net_id.c --- systemd-232/src/udev/udev-builtin-net_id.c 2016-11-03 10:16:42.000000000 -0700 +++ systemd-232-new/src/udev/udev-builtin-net_id.c 2016-11-17 18:04:09.560612381 -0800 @@ -153,6 +153,20 @@ static int dev_pci_onboard(struct udev_d idx = strtoul(attr, NULL, 0); if (idx <= 0) return -EINVAL; + if (idx >> 24) { + unsigned domain, bus, slot, func; + /* + * VMware acpi_index format: + * |31 instance 24|23 16|15 8|7 3|2 0| + * | number | domain? | bus | slot | func | + * + * Let's use instance number to get enoX human readable + */ + if (sscanf(udev_device_get_sysname(names->pcidev), "%x:%x:%x.%u", &domain, &bus, &slot, &func) != 4) + return -ENOENT; + if ((idx & 0xffff) == ((bus << 8) | (slot << 3) | func)) + idx >>= 24; + } /* Some BIOSes report rubbish indexes that are excessively high (2^24-1 is an index VMware likes to report for * example). Let's define a cut-off where we don't consider the index reliable anymore. We pick some arbitrary