[dpdk-dev] DPDK support for 82579

James Bensley jwbensley at gmail.com
Sun Nov 5 13:05:07 CET 2017


Hi all,

Please see attached and below a patch which allowed Pktgen to run on
my laptop which has a built in Intel 82579LM 1G NIC:

bensley at ubuntu-laptop:~$ lspci -nn | grep Ether
00:19.0 Ethernet controller [0200]: Intel Corporation 82579LM Gigabit
Network Connection [8086:1502] (rev 04)

bensley at ubuntu-laptop:~$ uname -a
Linux ubuntu-laptop 4.11.0-041100-generic #201705041534 SMP Thu May 4
19:36:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

bensley at ubuntu-laptop:~$ lsb_release -a
No LSB modules are available.
Distributor ID:    Ubuntu
Description:    Ubuntu 16.04.3 LTS
Release:    16.04
Codename:    xenial

bensley at ubuntu-laptop:/opt/dpdk$ diff -ru dpdk-17.08-original/
dpdk-17.08/ > DPDK-82579LM.patch


bensley at ubuntu-laptop:/opt/dpdk$ cat DPDK-82579LM.patch
diff -ru dpdk-17.08-original/drivers/net/e1000/em_ethdev.c
dpdk-17.08/drivers/net/e1000/em_ethdev.c
--- dpdk-17.08-original/drivers/net/e1000/em_ethdev.c    2017-08-08
19:01:40.000000000 +0100
+++ dpdk-17.08/drivers/net/e1000/em_ethdev.c    2017-11-05
11:55:03.094608222 +0000
@@ -182,6 +182,7 @@
     { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_PCH_CNP_I219_V6) },
     { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_PCH_CNP_I219_LM7) },
     { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_PCH_CNP_I219_V7) },
+    { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_PCH2_LV_LM) },
     { .vendor_id = 0, /* sentinel */ },
 };

@@ -307,6 +308,7 @@
     case E1000_DEV_ID_PCH_CNP_I219_V6:
     case E1000_DEV_ID_PCH_CNP_I219_LM7:
     case E1000_DEV_ID_PCH_CNP_I219_V7:
+    case E1000_DEV_ID_PCH2_LV_LM:
         return 1;
     default:
         return 0;

Cheers,
James.

---------- Forwarded message ----------
From: Stephen Hemminger <stephen at networkplumber.org>
Date: 2 November 2017 at 07:31
Subject: Re: [dpdk-users] DPDK support for 82579
To: James Bensley <jwbensley at gmail.com>
Cc: users <users at dpdk.org>

On Nov 1, 2017 22:11, "James Bensley" <jwbensley at gmail.com> wrote:

On 31 October 2017 at 21:50, Stephen Hemminger
<stephen at networkplumber.org> wrote:
> First off, I assume the device works for normal Linux networking.
> Then check the PCI-id value for the device and see if it is present in drivers/net/e1000
> in DPDK. If not, then it maybe as simple as adding the necessary ID value to the
> table. Also, check current git.
>
> It maybe more complex where some PHY code has to be backported from
> BSD into DPDK. Unfortunately, the device support in DPDK lags behind Linux
> and BSD. There are many variants and even Intel doesn't have resources to
> keep DPDK up to all the current PCI id values.

Hi Stephen,

That has worked! Yes this is a working NIC built into a laptop.

bensley at ubuntu-laptop:/opt/dpdk/dpdk-17.08/drivers/net/e1000$ lspci
-nn | grep Eth
00:19.0 Ethernet controller [0200]: Intel Corporation 82579LM Gigabit
Network Connection [8086:1502] (rev 04)

bensley at ubuntu-laptop:/opt/dpdk/dpdk-17.08/drivers/net/e1000$ grep -r 1502 *
base/e1000_hw.h:#define E1000_DEV_ID_PCH2_LV_LM         0x1502

^ This PCI-id is alread "known" but not mapped to the driver so I just
added the two lines to em_ethdev.c below, recompiled DPDK and Pktgen
and it works...

bensley at ubuntu-laptop:/opt/dpdk/dpdk-17.08/drivers/net/e1000$ grep -r
E1000_DEV_ID_PCH2_LV_LM *
base/e1000_hw.h:#define E1000_DEV_ID_PCH2_LV_LM         0x1502
base/e1000_api.c:   case E1000_DEV_ID_PCH2_LV_LM:
em_ethdev.c:        { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID,
E1000_DEV_ID_PCH2_LV_LM) },
em_ethdev.c:        case E1000_DEV_ID_PCH2_LV_LM:


Thanks very much for your help!

Cheers,
James.


It would be good if you could send a full patch to dev at dpdk.org


More information about the dev mailing list