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.

Bug 611418

Summary: [SR-IOV] network configuration will be messed up after 'modprobe igbvf'
Product: Red Hat Enterprise Linux 6 Reporter: dyuan
Component: kernelAssignee: Stefan Assmann <sassmann>
Status: CLOSED DUPLICATE QA Contact: Red Hat Kernel QE team <kernel-qe>
Severity: high Docs Contact:
Priority: low    
Version: 6.0CC: alex.williamson, chrisw, ddutile, eblake, jolsa, juzhang, llim, nhorman, sassmann, tburke, tgraf, tyan, xen-maint, yoyzhang
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-07-27 06:51:10 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 614786    
Bug Blocks:    

Description dyuan 2010-07-05 07:46:58 UTC
Description of problem:

After 'modprobe igb', the network configuration will be messed up in '# ifconfig' and '# ip link'. it will affect the 'pci passthrough/hotplug' with VF.

When passthrough/hotplug VF to guest, log in guest, lspci will show the device, but it cannot get ip address with no link error, but the device is carried actually.

 Determining IP information for eth1... failed; no link present.  Check cable?
                                                           [FAILED]


Version-Release number of selected component (if applicable):
libvirt-0.8.1-13.el6
kernel-2.6.32-42.el6
qemu-kvm-0.12.1.2-2.90.el6


How reproducible:
80%

Steps to Reproduce:
1. check the network configure 
# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state **UP** qlen 1000
    link/ether **00:1b:21:39:8b:18** brd ff:ff:ff:ff:ff:ff
3: eth2: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN qlen 1000
    link/ether **00:1b:21:39:8b:19** brd ff:ff:ff:ff:ff:ff
4: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
    link/ether d8:d3:85:7e:61:9b brd ff:ff:ff:ff:ff:ff
5: virbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN 
    link/ether ea:85:5d:ac:6a:30 brd ff:ff:ff:ff:ff:ff


2.

# modprobe -r igb
[root@dhcp-66-70-6 ~]# lspci|grep 82576
03:00.0 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01)
03:00.1 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01)
# modprobe igbvf
# modprobe igb max_vfs=1


3.

# lspci|grep 82576
03:00.0 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01)
03:00.1 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01)
03:10.0 Ethernet controller: Intel Corporation 82576 Virtual Function (rev 01)
03:10.1 Ethernet controller: Intel Corporation 82576 Virtual Function (rev 01)

# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
4: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
    link/ether d8:d3:85:7e:61:9b brd ff:ff:ff:ff:ff:ff
5: virbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN 
    link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
7: eth1: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 1000
    link/ether aa:8b:d3:5d:19:c3 brd ff:ff:ff:ff:ff:ff
8: eth2_rename: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state **DOWN** qlen 1000
    link/ether **00:1b:21:39:8b:18** brd ff:ff:ff:ff:ff:ff
9: eth2: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 1000
    link/ether 2a:a2:dd:76:8e:d0 brd ff:ff:ff:ff:ff:ff
10: eth3_rename: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
    link/ether **00:1b:21:39:8b:19** brd ff:ff:ff:ff:ff:ff

  
Actual results:
passthrough/hotplug VF to guest, log in guest, lspci will show the device, but it cannot get ip address with no link error, but the device is carried actually.

Expected results:
Network configuration should list the right info after modprobe igb and could work well with VF passthrough/hotplug.

Additional info:

Comment 3 Alex Williamson 2010-07-08 16:09:17 UTC
(In reply to comment #0)
> Actual results:
> passthrough/hotplug VF to guest, log in guest, lspci will show the device, but
> it cannot get ip address with no link error, but the device is carried
> actually.

Is the ethX associated with the PF up?  I think you'll find the same is true on the host if you try to use an ethX associated with a VF and the ethX for the PF is down.  On my system with 82576 NICs, I have network entries like this to bring the PF interface up, but not assign an IP, then the VF NICs work fine:

# cat /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
HWADDR=00:1B:21:60:5C:34
ONBOOT=yes
BOOTPROTO=static
NM_CONTROLLED=no

> Expected results:
> Network configuration should list the right info after modprobe igb and could
> work well with VF passthrough/hotplug.

What is actually wrong with the network configuration between steps 1 & 3?

Comment 4 Alex Williamson 2010-07-08 17:47:05 UTC
FYI, I confirmed with an Intel contact that the PF NIC must be up in order for the VF NIC to receive packets.  AIUI, even numbered VFs are associated with PF 0, odd number VFs are associated with PF 1.  Please retest with PF NICs up and explain in more detail if there is still a problem with the ip link configuration.

Comment 5 dyuan 2010-07-09 02:30:35 UTC
Sorry for the uncertainty issue description.

step 1:
2: **eth1**: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state **UP** qlen
1000
    link/ether **00:1b:21:39:8b:18** brd ff:ff:ff:ff:ff:ff

--passthrough/hotplug PF to guest and get IP successfully. 

step 2: 
# modprobe -r igb
# modprobe igbvf
# modprobe igb max_vfs=1

--after step 2, the state changed from 'UP' to 'DOWN' and the 'eth1' changed to 'eth2_rename'.

step 3:
8: **eth2_rename**: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state **DOWN** qlen
1000
    link/ether **00:1b:21:39:8b:18** brd ff:ff:ff:ff:ff:ff

--No matter I passthrough/hotplug PF or VF, it cannot get ip address with no link error.

Comment 6 Alex Williamson 2010-07-09 04:11:33 UTC
Ok, thanks for the clarification.  It looks like there are some problems with VFs claiming names that we try to save for PFs via udev.  Adding Stefan Assmann to this bz since I saw a recent patch from him attempting to fix this.  Stefan, if this bz is a duplicate of one you're already working on, please let us know the number.

I can suggest a couple workarounds since this is marked as a test blocker:

1) You don't need to load igbvf if you only intend to use the VFs as pass through devices for KVM guests.  You can do this by blacklisting the driver:

echo blacklist igbvf >> /etc/modprobe.d/blacklist.conf

Now if you unload igbvf, all those extra ethX interfaces go away and won't come back if you reload igb.

2) You can create a udev rule to make sure the eth devices created for igbvf don't conflict with those for PF devices.  Here's one example, add this to /etc/udev/rules.d/70-persistent-net.rules:

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="igbvf", KERNEL=="eth*", NAME="eth%b"

Now your VF eth devices will show up with names that match the PCI function they're associated with.  ip link will show things like:

175: eth0000:01:10.0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP ioctl(SIOCGIFXQLEN) failed: No such device

    link/ether 62:7c:0c:8b:cf:9b brd ff:ff:ff:ff:ff:ff

Either of these should be a sufficient work around to test with, also remember to make sure the PF eth device is UP before expecting packets to be seen in a VF assigned to a guest.

Comment 7 Stefan Assmann 2010-07-09 07:51:31 UTC
Hi Alex,

thanks for letting me know. I had opened a bug for this problem against udev. But that got closed because it's not a really a udev bug. So let's use this bug to keep track of it.

Both your workarounds are fine for now. As you already mentioned I'm trying to get a fix accepted upstream.

link to the upstream discussion http://patchwork.ozlabs.org/patch/57383/

Comment 8 dyuan 2010-07-15 10:28:05 UTC
Test without modprobe igbvf, hotplug and passthrough can be done successfully.
So remove the TestBlocker.

Comment 10 Stefan Assmann 2010-07-16 13:56:48 UTC
This problem is currently being solved in bug #614786, I'm not going to close this as a dup to make sure it doesn't get lost. I'll update this bug as soon as we have agreed on a solution so that you can verify your problem has been addressed properly.

Comment 11 Stefan Assmann 2010-07-20 08:19:30 UTC
While I'm pushing a patch upstream could you try the following and see if it helps to solve your problem:

- install udev packages from
http://people.redhat.com/harald/downloads/udev/udev-147-2.21.0.hh.24.el6
- Remove /etc/udev/rules.d/70-persistent-net.rules
- try again
(Beware of bug 614943 and make sure DEVICE= has no "" in the ifcfg files.)

Comment 13 dyuan 2010-07-27 01:50:22 UTC
Upgrade udev from https://brewweb.devel.redhat.com/buildinfo?buildID=138203
udev-147-2.22.el6
kernel-2.6.32-44.2.el6
The network configuration is not messed up after 'modprobe igbvf'.

1. # mv 70-persistent-net.rules /tmp/

2. remove "" from ifcfg files
# cat ifcfg-eth0 
DEVICE=eth0
BOOTPROTO="dhcp"
HWADDR="00:1B:21:39:8B:18"
NM_CONTROLLED="yes"
ONBOOT="yes"

3. modprobe igbvf

ip link configuration looks fine and all eth* can get ip successfully.
#ip link
17: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
    link/ether 00:1b:21:39:8b:18 brd ff:ff:ff:ff:ff:ff
    vf 0 MAC c2:06:2d:2d:01:f9
18: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
    link/ether 00:1b:21:39:8b:19 brd ff:ff:ff:ff:ff:ff
    vf 0 MAC 3a:25:28:49:01:c3
19: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether c2:06:2d:2d:01:f9 brd ff:ff:ff:ff:ff:ff
20: eth3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 3a:25:28:49:01:c3 brd ff:ff:ff:ff:ff:ff


but I don't try it with "" in ifcfg files.
Maybe it should be supported, NM quote it by default.

Comment 14 Stefan Assmann 2010-07-27 06:48:00 UTC
The quote issue is already being addressed in bug #614943.

Comment 15 Stefan Assmann 2010-07-27 06:51:10 UTC
Finally marking as duplicate of #614786.

*** This bug has been marked as a duplicate of bug 614786 ***