From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt0-f194.google.com (mail-qt0-f194.google.com [209.85.216.194]) by dpdk.org (Postfix) with ESMTP id 893B21B2A0 for ; Sun, 5 Nov 2017 13:05:39 +0100 (CET) Received: by mail-qt0-f194.google.com with SMTP id p1so7979477qtg.2 for ; Sun, 05 Nov 2017 04:05:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=+yc8Of6VWRw+JzJ9UfCOPfQVBir0K95oAIZyZR2ordk=; b=lXNRo/aPXoxZ3meMi38JijbQ7AE7BPB6BpqdZwsRPxU4+xSurrFb5VQPpPCHTyO8pn yrwAzn4ttYp4fV/+DzfkFticNFQfqQw4l5GYRIJCPdViWIBQQstdWVhlD+qT3NPBGhQX ekn5XE5QwlWARVExGlWCuIYfF2JqajPXCbdnNqoDwlrUMlo2p+/1x1gFoHnDARflBL0d c2c9L61a71scMDK7YOI+BnZd+OvSIGJsbTclnXSf9J/bcEkZb0H06z3A+guVjpgEsvKl Cms4OkbfJHqnD0T+/WpigXuQawMjrqZoSBhL9kMojWLe6f++xQveyho9tQ+UtxL75nbE Kcxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=+yc8Of6VWRw+JzJ9UfCOPfQVBir0K95oAIZyZR2ordk=; b=k6w/845YJYkiJiYlz9BS0v34UDUjWPghynmW+69BX/Q+WsqhYOfGSnbbQzCPJMQPvb xhTJN69v4HMYzER6D2ooki90Hb083QNvr2SMJwmM7rzyx+7R5D3CIavdcCRu2OZOVFSc phdKpYusSB+hE9oM/gAmGX9cLD8jEEKeMmoZs9zFr+JAvemd5jc72P06cCSJ5A/Cky8f Yx1v9213scufPxjg3HS11cO2D5wyECDF2TP25whXYpB7IeF7uxmapdSy3HB8H4TO0gtU i9Odv2qOIbWVNlWaC1cwRMjaAq0O/ZbeFd2p3ho+6JgYaZ16JVWf18sinBMIvwaaVpR4 78Pw== X-Gm-Message-State: AMCzsaVRpl3EY2s7hPVjVjwyxRgBbWERynvhAB1VO5K13a1rFF+ZRU2O /D10+A8NynJadrItceaZlLYMbp0oSukE/flZLX3lGQ== X-Google-Smtp-Source: ABhQp+RB1djDu8gYh/hFFhzHCqX2UNzdum9hUBKDZ3X21F/3JxJ+STjk+ndzjERffQLh4KQ1H7lpzVAyeWPcH32Ypys= X-Received: by 10.200.14.139 with SMTP id v11mr16921276qti.166.1509883538543; Sun, 05 Nov 2017 04:05:38 -0800 (PST) MIME-Version: 1.0 Received: by 10.140.106.71 with HTTP; Sun, 5 Nov 2017 04:05:07 -0800 (PST) From: James Bensley Date: Sun, 5 Nov 2017 12:05:07 +0000 Message-ID: To: dev@dpdk.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [dpdk-dev] DPDK support for 82579 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Nov 2017 12:05:39 -0000 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 Date: 2 November 2017 at 07:31 Subject: Re: [dpdk-users] DPDK support for 82579 To: James Bensley Cc: users On Nov 1, 2017 22:11, "James Bensley" wrote: On 31 October 2017 at 21:50, Stephen Hemminger 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