Bug 662905 - Both network ifaces going to be called pci1#0
Summary: Both network ifaces going to be called pci1#0
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: biosdevname
Version: rawhide
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: ---
Assignee: Matt Domsch
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: AcceptedNTH
Depends On:
Blocks: F15Alpha-accepted, F15AlphaFreezeExcept
TreeView+ depends on / blocked
 
Reported: 2010-12-14 06:23 UTC by Tomasz Torcz
Modified: 2011-02-19 03:50 UTC (History)
4 users (show)

Fixed In Version: biosdevname-0.3.7-1.fc15
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-02-19 03:50:28 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
dump_pirq.txt (1.13 KB, text/plain)
2010-12-15 10:12 UTC, Tomasz Torcz
no flags Details
lspci -v (8.24 KB, text/plain)
2010-12-15 10:13 UTC, Tomasz Torcz
no flags Details
dmidecode.txt (10.64 KB, text/plain)
2010-12-15 10:13 UTC, Tomasz Torcz
no flags Details

Description Tomasz Torcz 2010-12-14 06:23:44 UTC
Description of problem:
I've installed biosdevname from rawhide on my F14 computer for tests. This is desktop form factor, one network card bultin (nvidia nforce2 ethernet), second add-in Intel gigabit card.
Biosdevname would like to call both of them pci1#0:

# biosdevname -d
BIOS device: pci1#0
Kernel name: ep0
Permanant MAC: 00:07:E9:15:0E:CB
Assigned MAC : 00:07:E9:15:0E:CB
Driver: e1000
Driver version: 7.3.21-k6-NAPI
Firmware version: N/A
Bus Info: 0000:01:08.0
PCI name      : 0000:01:08.0
PCI Slot      : 1
Index in slot: 0

BIOS device: pci1#0
Kernel name: nf
Permanant MAC: 00:50:8D:E9:EC:C1
Assigned MAC : 00:50:8D:E9:EC:C1
Driver: forcedeth
Driver version: 0.64
Firmware version: 
Bus Info: 0000:00:04.0
PCI name      : 0000:00:04.0
PCI Slot      : Unknown
Index in slot: 0


Version-Release number of selected component (if applicable):
biosdevname-0.3.3-1.fc15.i686


Expected results:
nf card should be called "em0".

Comment 1 Matt Domsch 2010-12-14 22:09:48 UTC
Tomasz: can you send me the output of lspci -v, dmidecode, and dump_pirq?

you can build dump_pirq by:
git clone git://linux.dell.com/biosdevname.git
cd biosdevname/src
gcc -DUNIT_TEST_PIRQ -o dump_pirq pirq.c
sudo ./dump_pirq

Thanks!

Comment 2 Matt Domsch 2010-12-15 03:25:38 UTC
Tomasz, would you mind building biosdevname from git?  I found a bug in biosdevname, which I've just fixed. It should not try to assign a name to the embedded NIC as it does not know that it's embedded.

git clone git://linux.dell.com/biosdevname.git
cd biosdevname
autoreconf
./configure
make
sudo src/biosdevname -d

Thanks,
Matt

Comment 3 Tomasz Torcz 2010-12-15 10:12:34 UTC
Created attachment 468823 [details]
dump_pirq.txt

I'm attaching requested files. 

Also, biosdevname from git has slightly different output:
[root@mother src]# ./biosdevname -d
BIOS device: pci1#0
Kernel name: ep0
Permanant MAC: 00:07:E9:15:0E:CB
Assigned MAC : 00:07:E9:15:0E:CB
Driver: e1000
Driver version: 7.3.21-k6-NAPI
Firmware version: N/A
Bus Info: 0000:01:08.0
PCI name      : 0000:01:08.0
PCI Slot      : 1
Index in slot: 0

BIOS device: 
Kernel name: nf
Permanant MAC: 00:50:8D:E9:EC:C1
Assigned MAC : 00:50:8D:E9:EC:C1
Driver: forcedeth
Driver version: 0.64
Firmware version: 
Bus Info: 0000:00:04.0
PCI name      : 0000:00:04.0
PCI Slot      : Unknown
Index in slot: 0

(BIOS device name missing from forcedeth card, should be em0)

Comment 4 Tomasz Torcz 2010-12-15 10:13:02 UTC
Created attachment 468824 [details]
lspci -v

Comment 5 Tomasz Torcz 2010-12-15 10:13:29 UTC
Created attachment 468825 [details]
dmidecode.txt

Comment 6 Matt Domsch 2010-12-15 15:57:44 UTC
Tomasz, thanks much for the requested output.

This is working as designed now, with the bug fix from git last night.

Your BIOS does not provide any information about the onboard NIC, either in an SMBIOS Type 41 record, or in the PCI IRQ Routing Table.  So, biosdevname has nothing to go on to name it.  In this case, biosdevname will, as you see, not return a name for this device, so the kernel's name will continue to be used.  The bug fix was to not incorrectly re-use the name that was determined for the add-in card.  This patch is in upstream git, and I'll push a new release before F15 I'm sure.

commit 2d623d47777d329670e4fcf172b6abcae99661c9
Author: Matt Domsch <Matt_Domsch>
Date:   Tue Dec 14 21:21:39 2010 -0600

    Don't assign names to unknown devices
    
    Just because we know the names of some devices, doesn't mean we know
    the names of all.  In the case shown here:
      https://bugzilla.redhat.com/show_bug.cgi?id=662905
    we know the name of the add-in card, but should not know the name of
    the embedded NIC because it's not represented in SMBIOS or PIRQ. Don't
    assign a name we don't know to be good.

diff --git a/src/naming_policy.c b/src/naming_policy.c
index 34a56f7..0bb9395 100644
--- a/src/naming_policy.c
+++ b/src/naming_policy.c
@@ -44,6 +44,7 @@ static void use_physical(const struct libbiosdevname_state *state, const char *p
        memset(interface, 0, sizeof(interface));
 
        list_for_each_entry(dev, &state->bios_devices, node) {
+               known = 0;
                if (is_pci(dev)) {
                        if (dev->pcidev->physical_slot == 0) { /* embedded devices only */
                                if (dev->pcidev->uses_sysfs & HAS_SYSFS_INDEX) {

Comment 7 Fedora Update System 2011-02-17 16:23:11 UTC
biosdevname-0.3.7-1.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/biosdevname-0.3.7-1.fc15

Comment 8 Matt Domsch 2011-02-17 20:18:24 UTC
Proposing blocking F15 Alpha Nice-to-Have

Comment 9 Fedora Update System 2011-02-17 22:24:46 UTC
biosdevname-0.3.7-1.fc15 has been pushed to the Fedora 15 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update biosdevname'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/biosdevname-0.3.7-1.fc15

Comment 10 James Laska 2011-02-18 20:07:17 UTC
From the 2011-02-18 Alpha blocker review meeting
(http://meetbot.fedoraproject.org/fedora-bugzappers/2011-02-18/f15-alpha-bug-review.2011-02-18-17.00.html)

AGREED: 662905 - AcceptedNTH, updated koji build available

Comment 11 Fedora Update System 2011-02-19 03:49:59 UTC
biosdevname-0.3.7-1.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.