DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] DPDK support for 82579
@ 2017-11-05 12:05 James Bensley
  2017-11-06  1:08 ` Thomas Monjalon
  0 siblings, 1 reply; 2+ messages in thread
From: James Bensley @ 2017-11-05 12:05 UTC (permalink / raw)
  To: dev

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@ubuntu-laptop:~$ lspci -nn | grep Ether
00:19.0 Ethernet controller [0200]: Intel Corporation 82579LM Gigabit
Network Connection [8086:1502] (rev 04)

bensley@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@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@ubuntu-laptop:/opt/dpdk$ diff -ru dpdk-17.08-original/
dpdk-17.08/ > DPDK-82579LM.patch


bensley@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@networkplumber.org>
Date: 2 November 2017 at 07:31
Subject: Re: [dpdk-users] DPDK support for 82579
To: James Bensley <jwbensley@gmail.com>
Cc: users <users@dpdk.org>

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

On 31 October 2017 at 21:50, Stephen Hemminger
<stephen@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@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@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@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@dpdk.org

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] DPDK support for 82579
  2017-11-05 12:05 [dpdk-dev] DPDK support for 82579 James Bensley
@ 2017-11-06  1:08 ` Thomas Monjalon
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Monjalon @ 2017-11-06  1:08 UTC (permalink / raw)
  To: James Bensley; +Cc: dev

Hi,

05/11/2017 13:05, James Bensley:
> 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:

Thank you for your contribution.
If you have a bit of time, you can try to send a well formatted patch
which will be better handled by the maintainers.
You just need to use some git commands as described here:
	http://dpdk.org/dev#send

Probably the first step to become a regular contributor :)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-11-06  1:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-05 12:05 [dpdk-dev] DPDK support for 82579 James Bensley
2017-11-06  1:08 ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).