DPDK patches and discussions
 help / color / mirror / Atom feed
From: James Bensley <jwbensley@gmail.com>
To: dev@dpdk.org
Subject: [dpdk-dev] DPDK support for 82579
Date: Sun, 5 Nov 2017 12:05:07 +0000	[thread overview]
Message-ID: <CAAWx_pVRyB2fV2rUowSLd-mRSgpRi8qUi0cMhb7bUL7FYHEtWw@mail.gmail.com> (raw)

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

             reply	other threads:[~2017-11-05 12:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-05 12:05 James Bensley [this message]
2017-11-06  1:08 ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAAWx_pVRyB2fV2rUowSLd-mRSgpRi8qUi0cMhb7bUL7FYHEtWw@mail.gmail.com \
    --to=jwbensley@gmail.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).