'Intel 82540EM is not getting bind with DPDK driver

I am using dpdk library to enhance packet capturing. To use dpdk, we need to bind at least one NIC to dpdk driver. As written in dpdk documentation, I can either use uio_pci_generic or igb_ko driver.

To bind with dpdk driver, they have provided a python script: http://www.dpdk.org/browse/dpdk/plain/tools/dpdk_nic_bind.py

I have two intel NIC's in my system, Intel 82579LM and Intel 82540EM. As given at http://dpdk.org/doc/nics , Intel 82540EM is a supported NIC with driver e1000.

Now, the problem is that I am unable to bind Intel 82540EM with dpdk drivers. I did the following steps:

  1. ifdown INTERFACE_NAME
  2. modprobe uio_pci_generic (or insmod igb_ko)
  3. dpdk_nic_bind.py --bind=uio_pci_generic PCI_ID_OF_NIC

This prints an error 'Error: bind failed for PCI_ID_OF_NIC - Cannot bind to driver uio_pci_generic'. So I tried to bind it manually. I did the following steps to bind NIC manually:

  1. ifdown INTERFACE_NAME
  2. modprobe uio_pci_generic (or insmod igb_ko)
  3. echo "PCI_ID_OF_NIC" > /sys/bus/pci/drivers/e1000/unbind
  4. echo "PCI_ID_OF_NIC" > /sys/bus/pci/drivers/uio_pci_generic/bind

Even then I get 'bash: echo: write error: No such device' error. I tried the same steps with Intel 82579LM, and it binded perfectly, but unfortunately it ain't a supported NIC.

What am I doing wrong?

[EDIT update based on the comment request for Output of lspci -vnnk 01:02.0]

Ethernet controller [0200]: Intel Corporation 82540EM Gigabit Ethernet Controller [8086:100e] (rev 02) 
Subsystem: Intel Corporation PRO/1000 MT Desktop Adapter [8086:002e] 
Kernel driver in use: e1000 
Kernel modules: e1000 

00:19.0 Ethernet controller [0200]: Intel Corporation 82579LM Gigabit Network Connection [8086:1502] (rev 04) 
Subsystem: Dell Device [1028:052c] Kernel driver in use: e1000e 
Kernel modules: e1000e


Solution 1:[1]

I have success in using emulated NIC with DPDK using igb_uio and uio_pci_generic. Details shared below.

  • NIC with igb_uio: Sucess
  • NIC with uio_pci_generic: Sucess
  • Intel 82540EM: emulated NIC in Virtual machine
  • DPDK version: stable-18.11.6
  • test application: l2fwd
  • cmd: ./build/l2fwd -w [pcie bdf of the NIC in VM] -- -p 0x1 -T 1

By using full PCIe [S:B:D:F] ie echo "0000:00:19.0" > /sys/bus/pci/drivers/e1000/unbind works for me

Solution 2:[2]

DPDK provides 3 different drivers for userspace networking. Some NICs won't work with the igb_uio_generic or the vfio-pci and might only be supported by the igb_uio driver.

This driver is no longer in the DPDK main tree, so you'll need to grab it from http://git.dpdk.org/dpdk-kmods/ instead

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2 caconym