Discussion:
[dpdk-dev] Issue with binding NIC of type 82545EM to dpdk
Al Patel
2016-03-29 14:11:34 UTC
Permalink
Hi,

I am having an issue with binding a nic of type 82545EM to dpdk. I am using
a
fedoracore23 VM on MAC with VMFusion.

./dpdk_nic_bind.py -b uio_pci_generic 0000:02:02.0
Error: bind failed for 0000:02:02.0 - Cannot bind to driver uio_pci_generic
Error: unbind failed for 0000:02:02.0 - Cannot open
/sys/bus/pci/drivers//unbind

it is unbound from e1000, repeating the command:

./dpdk_nic_bind.py -b uio_pci_generic 0000:02:02.0
Error: bind failed for 0000:02:02.0 - Cannot bind to driver uio_pci_generic

I repeated the same test on a ubuntu vm running on Virtualbox with
NIC type 82450EM

In this case, the device is able to bind successfully to uio_pci_generic
driver.

There is a igb_uio module that present. The device cannot be bound to the
igb_uio
driver.

My question is that why is the device being able to be bound to
uio_pci_generic driver on ubuntu and not on fedoracore? (Albeit on fedora
device is 82545EM and on ubuntu it is 82540EM). Both these are reported as
tested by Intel:

• Emulated Intel® 82540EM Gigabit Ethernet Controller [8086:100e]
• Emulated Intel® 82545EM Gigabit Ethernet Controller [8086:100f]
http://www.intel.com/content/dam/www/public/us/en/documents/release-notes/dpdk-release-notes.pdf

Are there any debugs to collect that can shed some light?


Details:

# lspci -v -s 02:02.0
02:02.0 Ethernet controller: Intel Corporation 82545EM Gigabit Ethernet
Controller (Copper) (rev 01)
DeviceName: Ethernet1
Subsystem: VMware PRO/1000 MT Single Port Adapter
Physical Slot: 34
Flags: 66MHz, medium devsel
Memory at fd5a0000 (64-bit, non-prefetchable) [size=128K]
Memory at fdfe0000 (64-bit, non-prefetchable) [size=64K]
I/O ports at 2040 [size=64]
[virtual] Expansion ROM at fd510000 [disabled] [size=64K]
Capabilities: [dc] Power Management version 2
Capabilities: [e4] PCI-X non-bridge device
Kernel modules: e1000

Thx
-a
Ferruh Yigit
2016-03-29 16:26:53 UTC
Permalink
Post by Al Patel
Hi,
I am having an issue with binding a nic of type 82545EM to dpdk. I am using
a
fedoracore23 VM on MAC with VMFusion.
./dpdk_nic_bind.py -b uio_pci_generic 0000:02:02.0
Error: bind failed for 0000:02:02.0 - Cannot bind to driver uio_pci_generic
Error: unbind failed for 0000:02:02.0 - Cannot open
/sys/bus/pci/drivers//unbind
./dpdk_nic_bind.py -b uio_pci_generic 0000:02:02.0
Error: bind failed for 0000:02:02.0 - Cannot bind to driver uio_pci_generic
I repeated the same test on a ubuntu vm running on Virtualbox with
NIC type 82450EM
In this case, the device is able to bind successfully to uio_pci_generic
driver.
There is a igb_uio module that present. The device cannot be bound to the
igb_uio
driver.
Hi Al,

You are trying to bind to the driver "uio_pci_generic" not to the
"igb_uio", is it typo? If not, can you please double check if
"uio_pci_generic" module inserted.
Or bind device to "igb_uio":
"./dpdk_nic_bind.py -b igb_uio 0000:02:02.0"

Regards,
ferruh
Al Patel
2016-03-29 17:14:17 UTC
Permalink
Ferruh,

On my fedora23, I don't have igb_uio

# modprobe igb_uio
modprobe: FATAL: Module igb_uio not found in directory
/lib/modules/4.4.6-300.fc23.x86_64


I am trying to bind to uio_pci_generic module

thx
-a
Post by Al Patel
Post by Al Patel
Hi,
I am having an issue with binding a nic of type 82545EM to dpdk. I am
using
Post by Al Patel
a
fedoracore23 VM on MAC with VMFusion.
./dpdk_nic_bind.py -b uio_pci_generic 0000:02:02.0
Error: bind failed for 0000:02:02.0 - Cannot bind to driver
uio_pci_generic
Post by Al Patel
Error: unbind failed for 0000:02:02.0 - Cannot open
/sys/bus/pci/drivers//unbind
./dpdk_nic_bind.py -b uio_pci_generic 0000:02:02.0
Error: bind failed for 0000:02:02.0 - Cannot bind to driver
uio_pci_generic
Post by Al Patel
I repeated the same test on a ubuntu vm running on Virtualbox with
NIC type 82450EM
In this case, the device is able to bind successfully to uio_pci_generic
driver.
There is a igb_uio module that present. The device cannot be bound to the
igb_uio
driver.
Hi Al,
You are trying to bind to the driver "uio_pci_generic" not to the
"igb_uio", is it typo? If not, can you please double check if
"uio_pci_generic" module inserted.
"./dpdk_nic_bind.py -b igb_uio 0000:02:02.0"
Regards,
ferruh
Lu, Wenzhuo
2016-03-30 00:51:47 UTC
Permalink
Hi Al,
-----Original Message-----
Sent: Wednesday, March 30, 2016 1:14 AM
To: Yigit, Ferruh
Subject: Re: [dpdk-dev] Issue with binding NIC of type 82545EM to dpdk
Ferruh,
On my fedora23, I don't have igb_uio
# modprobe igb_uio
modprobe: FATAL: Module igb_uio not found in directory
/lib/modules/4.4.6-300.fc23.x86_64
After compiling dpdk, normally you can find igb_uio here, dpdk/x86_64-native-linuxapp-gcc/kmod/igb_uio.ko.
Please refer http:
Al Patel
2016-03-30 12:59:39 UTC
Permalink
Hi Lu,

I do see the module there, but seems it is built against incorrect kernel
version and thus it is not loading:

# insmod ./dpdk/kmod/igb_uio.ko
insmod: ERROR: could not insert module ./dpdk/kmod/igb_uio.ko: Invalid
module format


dmesg:

[54394.611703] igb_uio: version magic '4.2.3-300.fc23.x86_64 SMP mod_unload
' should be '4.4.6-300.fc23.x86_64 SMP mod_unload '

uname -a:

# uname -a
Linux kube-node1 4.4.6-300.fc23.x86_64 #1 SMP Wed Mar 16 22:10:37 UTC 2016
x86_64 x86_64 x86_64 GNU/Linux


I removed that kernel source and rebuild it - now it is loading and I am
able to find the device to igb_uio and
do see /dev/uio0 created.

I do see the device in dpdk now.

Thanks much.
-a
Post by Ferruh Yigit
Hi Al,
-----Original Message-----
Sent: Wednesday, March 30, 2016 1:14 AM
To: Yigit, Ferruh
Subject: Re: [dpdk-dev] Issue with binding NIC of type 82545EM to dpdk
Ferruh,
On my fedora23, I don't have igb_uio
# modprobe igb_uio
modprobe: FATAL: Module igb_uio not found in directory
/lib/modules/4.4.6-300.fc23.x86_64
After compiling dpdk, normally you can find igb_uio here,
dpdk/x86_64-native-linuxapp-gcc/kmod/igb_uio.ko.
Please refer http://www.dpdk.org/doc/guides/linux_gsg/build_dpdk.html.
Loading...