Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
biosdevname reports duplicate onboard decices
Handle 0x0073, DMI type 41, 11 bytes
Onboard Device
Reference Designation: i350#1
Type: Ethernet
Status: Enabled
Type Instance: 1
Bus Address: 0000:02:00.0
Handle 0x0074, DMI type 41, 11 bytes
Onboard Device
Reference Designation: i350#2
Type: Ethernet
Status: Enabled
Type Instance: 2
Bus Address: 0000:02:00.1
Handle 0x0075, DMI type 41, 11 bytes
Onboard Device
Reference Designation: Mellanox IB
Type: Other
Status: Enabled
Type Instance: 1
Bus Address: 0000:06:00.0
based on the code this is somewhat expected as the tool looks at type instance
field and assignes name based on that
if (dev->port)
portnum = dev->port->port;
else if (vf->uses_sysfs & HAS_SYSFS_INDEX)
portnum = vf->sysfs_index;
else if (vf->uses_smbios & HAS_SMBIOS_INSTANCE && is_pci_smbios_type_ethernet(vf))
portnum = vf->smbios_instance;
else if (vf->embedded_index_valid)
portnum = vf->embedded_index;
if (portnum != INT_MAX) {
snprintf(location, sizeof(location), "%s%u", prefix, portnum);
known=1;
}
in this case second branch is used as HAS_SYSFS_INDEX flag is set since kernel
sets up /sys/bus/pci/devices/%s/index and populates it with smbios data
so kernel does not assign these numbers but instead read it from
dmi data
static struct device_attribute smbios_attr_instance = {
.attr = {.name = "index", .mode = 0444},
.show = smbiosinstance_show,
};
static ssize_t smbiosinstance_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
...
return find_smbios_instance_string(pdev, buf,
SMBIOS_ATTR_INSTANCE_SHOW);
}
static size_t find_smbios_instance_string(struct pci_dev *pdev, char *buf,
enum smbios_attr_enum attribute)
{
...
dmi = NULL;
while ((dmi = dmi_find_device(DMI_DEV_TYPE_DEV_ONBOARD,
NULL, dmi)) != NULL) {
donboard = dmi->device_data;
if (donboard && donboard->bus == bus &&
donboard->devfn == devfn) {
if (buf) {
if (attribute == SMBIOS_ATTR_INSTANCE_SHOW)
return scnprintf(buf, PAGE_SIZE,
"%d\n",
donboard->instance);
else if (attribute == SMBIOS_ATTR_LABEL_SHOW)
return scnprintf(buf, PAGE_SIZE,
"%s\n",
dmi->name);
}
return strlen(dmi->name);
the thing here is that having multiple onboard devices and the type instance
field has to be unique only within the same type
"System Management BIOS (SMBIOS) Reference Specification" spécifie that Device
Type Instance must be unique within a given onboard device type
7.42.2 Onboard Device Types
Table 117 shows what the byte values mean for the Onboard Device Types field.
Table 117 – Onboard Device Types field
Byte Value Meaning
01h Other
02h Unknown
03h Video
04h SCSI Controller
05h Ethernet
06h Token Ring
07h Sound
08h PATA Controller
09h SATA Controller
0Ah SAS Controller
7.42.3 Device Type Instance
Device Type Instance is a unique value (within a given onboard device type) used
to indicate the order
the device is designated by the system. For example, a system with two identical
Ethernet NICs may
designate one NIC (with higher Bus/Device/Function=15/0/0) as the first onboard
NIC (instance 1) and
the other NIC (with lower Bus/Device/Function =3/0/0) as the second onboard NIC
(instance 2).
"
Version-Release number of selected component (if applicable):
any rhel7 version would do I guess (don't have exact version from customer)
How reproducible:
always
Steps to Reproduce:
1. run biosdevname -d
Actual results:
duplicate names ("Duplicate: True" appears)
Expected results:
unique names
biosdevname upstream recently merged this commit. Hence biosdevname will not assign any name to non-ethernet devices.
https://github.com/dell/biosdevname/commit/609f20c26f40ae4883f5e8c9b241470260722b3f
Since this bug was primarily about name clash between ethernet and IB device and non-ethernet devices are no longer supported I am closing this as CLOSED UPSTREAM.
Description of problem: biosdevname reports duplicate onboard decices Handle 0x0073, DMI type 41, 11 bytes Onboard Device Reference Designation: i350#1 Type: Ethernet Status: Enabled Type Instance: 1 Bus Address: 0000:02:00.0 Handle 0x0074, DMI type 41, 11 bytes Onboard Device Reference Designation: i350#2 Type: Ethernet Status: Enabled Type Instance: 2 Bus Address: 0000:02:00.1 Handle 0x0075, DMI type 41, 11 bytes Onboard Device Reference Designation: Mellanox IB Type: Other Status: Enabled Type Instance: 1 Bus Address: 0000:06:00.0 based on the code this is somewhat expected as the tool looks at type instance field and assignes name based on that if (dev->port) portnum = dev->port->port; else if (vf->uses_sysfs & HAS_SYSFS_INDEX) portnum = vf->sysfs_index; else if (vf->uses_smbios & HAS_SMBIOS_INSTANCE && is_pci_smbios_type_ethernet(vf)) portnum = vf->smbios_instance; else if (vf->embedded_index_valid) portnum = vf->embedded_index; if (portnum != INT_MAX) { snprintf(location, sizeof(location), "%s%u", prefix, portnum); known=1; } in this case second branch is used as HAS_SYSFS_INDEX flag is set since kernel sets up /sys/bus/pci/devices/%s/index and populates it with smbios data so kernel does not assign these numbers but instead read it from dmi data static struct device_attribute smbios_attr_instance = { .attr = {.name = "index", .mode = 0444}, .show = smbiosinstance_show, }; static ssize_t smbiosinstance_show(struct device *dev, struct device_attribute *attr, char *buf) { ... return find_smbios_instance_string(pdev, buf, SMBIOS_ATTR_INSTANCE_SHOW); } static size_t find_smbios_instance_string(struct pci_dev *pdev, char *buf, enum smbios_attr_enum attribute) { ... dmi = NULL; while ((dmi = dmi_find_device(DMI_DEV_TYPE_DEV_ONBOARD, NULL, dmi)) != NULL) { donboard = dmi->device_data; if (donboard && donboard->bus == bus && donboard->devfn == devfn) { if (buf) { if (attribute == SMBIOS_ATTR_INSTANCE_SHOW) return scnprintf(buf, PAGE_SIZE, "%d\n", donboard->instance); else if (attribute == SMBIOS_ATTR_LABEL_SHOW) return scnprintf(buf, PAGE_SIZE, "%s\n", dmi->name); } return strlen(dmi->name); the thing here is that having multiple onboard devices and the type instance field has to be unique only within the same type "System Management BIOS (SMBIOS) Reference Specification" spécifie that Device Type Instance must be unique within a given onboard device type 7.42.2 Onboard Device Types Table 117 shows what the byte values mean for the Onboard Device Types field. Table 117 – Onboard Device Types field Byte Value Meaning 01h Other 02h Unknown 03h Video 04h SCSI Controller 05h Ethernet 06h Token Ring 07h Sound 08h PATA Controller 09h SATA Controller 0Ah SAS Controller 7.42.3 Device Type Instance Device Type Instance is a unique value (within a given onboard device type) used to indicate the order the device is designated by the system. For example, a system with two identical Ethernet NICs may designate one NIC (with higher Bus/Device/Function=15/0/0) as the first onboard NIC (instance 1) and the other NIC (with lower Bus/Device/Function =3/0/0) as the second onboard NIC (instance 2). " Version-Release number of selected component (if applicable): any rhel7 version would do I guess (don't have exact version from customer) How reproducible: always Steps to Reproduce: 1. run biosdevname -d Actual results: duplicate names ("Duplicate: True" appears) Expected results: unique names