Message ID | CAMHMu0MzwExcOOqK51Z6kt=XJzWQ2J+jWZaJcCVb2_OZmtZhzw@mail.gmail.com (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 8337CFA3B; Fri, 25 Nov 2016 20:38:30 +0100 (CET) Received: from mail-qt0-f193.google.com (mail-qt0-f193.google.com [209.85.216.193]) by dpdk.org (Postfix) with ESMTP id C3006FA3A for <dev@dpdk.org>; Fri, 25 Nov 2016 20:38:28 +0100 (CET) Received: by mail-qt0-f193.google.com with SMTP id n34so5018048qtb.3 for <dev@dpdk.org>; Fri, 25 Nov 2016 11:38:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=e5bLl34fZA3BwGULPiJqQ+vSaLxe7IwmuKpfQR/2sCY=; b=ltGFS8hTaMfsadqm2nMq5jMFnJYfFIToUETF8nAvcDLE/t+ppLLeLoMyBn+p3hvu2F 02WWacL8QyQANEkOzw0+hy47EBc3o3Y9t9XNa3UYFRJ/msaSpJNlBVgUlxV+9XoUg1Hl o5y46fv75GP5YzWm2lcIgxvjcCFbFt83OekPtv5ia913Y8tOxQqMHWWnP1u8QHavTBc2 68pKNKMQm4joysxw1qDagpxcSl/F3lS23iIh/q/aN+Atl3tyB0QZp9IJLr01I6bR+siJ KTSLgTTXoMHeNgbknViHrFq/rgeCZpXpjwYmjlQDKnSl9mClnKlLaYaU2miz8VMZ0MYx 68Tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=e5bLl34fZA3BwGULPiJqQ+vSaLxe7IwmuKpfQR/2sCY=; b=jrQJU+JbBKvvojxourjfzQpPVPxZk1gn/dVlVEnSEOKEGOgzDUiwWbPibxFswvzVj9 x/t+7DvTO+W5iKRNVtjVDSF49Af2qRE5PsxTtRzPw8yXHEHBWNfaUIRRhaljlyY9mYa3 vzskS1oetoX92e+O9ho4Eiw6AhfQdjylLaNLV+mE+x2y/WTHZfGDMtYHidVZxV0AfSot xt/qMvq6gvASMRn5Z6B8EA4BgLjFT5Xcji2VYHlzEPHetQbVnGptl6yMp98DGJSqwxnj qFdUlbMMGIFLEo0d9mdhvIQJTzZin1Zquveer8GlbuxNmqLZtSN9MrrhGTCjn23BqDfQ GjEQ== X-Gm-Message-State: AKaTC02I4ycP4XWUhL/1QkqTO8DDpSZYiiiso7TtTQxbrz/7znASiC1K9JaTmUWg5UlbmYNn7LAm18Vtg62z3Q== X-Received: by 10.200.37.76 with SMTP id 12mr8231483qtn.129.1480102708286; Fri, 25 Nov 2016 11:38:28 -0800 (PST) MIME-Version: 1.0 Received: by 10.140.85.244 with HTTP; Fri, 25 Nov 2016 11:38:07 -0800 (PST) In-Reply-To: <d6672d14-6740-0737-0f82-ac9978a06c32@intel.com> References: <1474423220-10207-1-git-send-email-keith.wiles@intel.com> <1476396234-44694-1-git-send-email-keith.wiles@intel.com> <d6672d14-6740-0737-0f82-ac9978a06c32@intel.com> From: Aws Ismail <aws.ismail@gmail.com> Date: Fri, 25 Nov 2016 14:38:07 -0500 Message-ID: <CAMHMu0MzwExcOOqK51Z6kt=XJzWQ2J+jWZaJcCVb2_OZmtZhzw@mail.gmail.com> To: Ferruh Yigit <ferruh.yigit@intel.com> Cc: Keith Wiles <keith.wiles@intel.com>, DPDK <dev@dpdk.org>, pmatilai@redhat.com, yuanhan.liu@linux.intel.com Content-Type: text/plain; charset=UTF-8 Subject: Re: [dpdk-dev] [PATCH v9] drivers/net:new PMD using tun/tap host interface X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK <dev.dpdk.org> List-Unsubscribe: <http://dpdk.org/ml/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://dpdk.org/ml/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <http://dpdk.org/ml/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Commit Message
Aws Ismail
Nov. 25, 2016, 7:38 p.m. UTC
Keith, This won't build when integrated with v16.11. The register macro prefix has been renamed. a v10 is needed. On Mon, Nov 21, 2016 at 7:56 AM, Ferruh Yigit <ferruh.yigit@intel.com> wrote: > On 10/13/2016 11:03 PM, Keith Wiles wrote: >> The rte_eth_tap.c PMD creates a device using TUN/TAP interfaces >> on the local host. The PMD allows for DPDK and the host to >> communicate using a raw device interface on the host and in >> the DPDK application. The device created is a Tap device with >> a L2 packet header. >> >> v9 - Fix up the docs to use correct syntax >> v8 - Fix issue with tap_tx_queue_setup() not return zero on success. >> v7 - Reword the comment in common_base and fix the data->name issue >> v6 - fixed the checkpatch issues >> v5 - merge in changes from list review see related emails >> fixed many minor edits >> v4 - merge with latest driver changes >> v3 - fix includes by removing ifdef for other type besides Linux >> Fix the copyright notice in the Makefile >> v2 - merge all of the patches into one patch >> Fix a typo on naming the tap device >> Update the maintainers list >> >> Signed-off-by: Keith Wiles <keith.wiles@intel.com> >> --- > > Just a reminder, this is a new PMD and waiting for community review.
Comments
I have verified that adding just a single tap device works with testpmd. But as soon as I try more than one tap device, I would get a coredump, e.g.: root@ localhost :~# testpmd -c f -n 4 --socket-mem 512 --vdev=net_tap ,iface=tap0 --vdev=net_tap ,iface=tap1 -- -i EAL: Detected 16 lcore(s) EAL: Probing VFIO support... EAL: VFIO support initialized EAL: cannot open /proc/self/numa_maps, consider that all memory is in socket_id 0 PMD: Initializing pmd_tap for net_tap as dtap0 PMD: net_tap: Create TAP Ethernet device with 32 queues on numa 0 PMD: Initializing pmd_tap for net_tap as dtap1 PMD: net_tap: Create TAP Ethernet device with 32 queues on numa 0 EAL: failed to initialize net_tap device PANIC in rte_eal_init(): Cannot init pmd devices 6: [testpmd() [0x409149]] 5: [/lib/libc.so.6(__libc_start_main+0xf0) [0x7f3e65fa8740]] 4: [testpmd() [0x408b21]] 3: [/usr/lib/librte_eal.so.3.1(rte_eal_init+0xe09) [0x7f3e68ceaea9]] 2: [/usr/lib/librte_eal.so.3.1(__rte_panic+0xc0) [0x7f3e68ce9b5a]] 1: [/usr/lib/librte_eal.so.3.1(rte_dump_stack+0x18) [0x7f3e68cf2078]] Aborted (core dumped) root@ localhost :~# On Fri, Nov 25, 2016 at 2:38 PM, Aws Ismail <aws.ismail@gmail.com> wrote: > Keith, > > This won't build when integrated with v16.11. The register macro > prefix has been renamed. a v10 is needed. > > diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c > index 7f303db..297d4b6 100644 > --- a/drivers/net/tap/rte_eth_tap.c > +++ b/drivers/net/tap/rte_eth_tap.c > @@ -752,5 +752,6 @@ static struct rte_vdev_driver pmd_tap_drv = { > .remove = rte_pmd_tap_remove, > }; > > -DRIVER_REGISTER_VDEV(net_tap, pmd_tap_drv); > -DRIVER_REGISTER_PARAM_STRING(net_tap, "iface=<string>,speed=N"); > +RTE_PMD_REGISTER_VDEV(net_tap, pmd_tap_drv); > +RTE_PMD_REGISTER_ALIAS(net_tap, eth_tap); > +RTE_PMD_REGISTER_PARAM_STRING(net_tap, "iface=<string>,speed=N"); > > On Mon, Nov 21, 2016 at 7:56 AM, Ferruh Yigit <ferruh.yigit@intel.com> > wrote: > > On 10/13/2016 11:03 PM, Keith Wiles wrote: > >> The rte_eth_tap.c PMD creates a device using TUN/TAP interfaces > >> on the local host. The PMD allows for DPDK and the host to > >> communicate using a raw device interface on the host and in > >> the DPDK application. The device created is a Tap device with > >> a L2 packet header. > >> > >> v9 - Fix up the docs to use correct syntax > >> v8 - Fix issue with tap_tx_queue_setup() not return zero on success. > >> v7 - Reword the comment in common_base and fix the data->name issue > >> v6 - fixed the checkpatch issues > >> v5 - merge in changes from list review see related emails > >> fixed many minor edits > >> v4 - merge with latest driver changes > >> v3 - fix includes by removing ifdef for other type besides Linux > >> Fix the copyright notice in the Makefile > >> v2 - merge all of the patches into one patch > >> Fix a typo on naming the tap device > >> Update the maintainers list > >> > >> Signed-off-by: Keith Wiles <keith.wiles@intel.com> > >> --- > > > > Just a reminder, this is a new PMD and waiting for community review. >
> On Nov 29, 2016, at 3:36 PM, Aws Ismail <aws.ismail@gmail.com> wrote: > > I have verified that adding just a single tap device works with testpmd. But as soon as I try more than one tap device, I would get a coredump, e.g.: > > root@localhost:~# testpmd -c f -n 4 --socket-mem 512 --vdev=net_tap,iface=tap0 --vdev=net_tap,iface=tap1 -- -i > EAL: Detected 16 lcore(s) > EAL: Probing VFIO support... > EAL: VFIO support initialized > EAL: cannot open /proc/self/numa_maps, consider that all memory is in socket_id 0 > PMD: Initializing pmd_tap for net_tap as dtap0 > PMD: net_tap: Create TAP Ethernet device with 32 queues on numa 0 > PMD: Initializing pmd_tap for net_tap as dtap1 > PMD: net_tap: Create TAP Ethernet device with 32 queues on numa 0 > EAL: failed to initialize net_tap device > PANIC in rte_eal_init(): > Cannot init pmd devices > 6: [testpmd() [0x409149]] > 5: [/lib/libc.so.6(__libc_start_main+0xf0) [0x7f3e65fa8740]] > 4: [testpmd() [0x408b21]] > 3: [/usr/lib/librte_eal.so.3.1(rte_eal_init+0xe09) [0x7f3e68ceaea9]] > 2: [/usr/lib/librte_eal.so.3.1(__rte_panic+0xc0) [0x7f3e68ce9b5a]] > 1: [/usr/lib/librte_eal.so.3.1(rte_dump_stack+0x18) [0x7f3e68cf2078]] It appears the call to rte_eth_dev_allocate() in the code is wrong. I did pass in the variable called tap_name created in the function, but I was told I needed to pass in ‘name’ that was passed into the function. The rte_eth_dev_allocate() needs a unique name for each call and name is all was the same. Need to change that line to use tap_name instead or tell me the real way to handle this problem. If you want a new patch I can try to get it done, but I am working on something else at this time and it could be a few days before I can get the patch out. > Aborted (core dumped) > > root@localhost:~# > > > On Fri, Nov 25, 2016 at 2:38 PM, Aws Ismail <aws.ismail@gmail.com> wrote: > Keith, > > This won't build when integrated with v16.11. The register macro > prefix has been renamed. a v10 is needed. > > diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c > index 7f303db..297d4b6 100644 > --- a/drivers/net/tap/rte_eth_tap.c > +++ b/drivers/net/tap/rte_eth_tap.c > @@ -752,5 +752,6 @@ static struct rte_vdev_driver pmd_tap_drv = { > .remove = rte_pmd_tap_remove, > }; > > -DRIVER_REGISTER_VDEV(net_tap, pmd_tap_drv); > -DRIVER_REGISTER_PARAM_STRING(net_tap, "iface=<string>,speed=N"); > +RTE_PMD_REGISTER_VDEV(net_tap, pmd_tap_drv); > +RTE_PMD_REGISTER_ALIAS(net_tap, eth_tap); > +RTE_PMD_REGISTER_PARAM_STRING(net_tap, "iface=<string>,speed=N"); > > On Mon, Nov 21, 2016 at 7:56 AM, Ferruh Yigit <ferruh.yigit@intel.com> wrote: > > On 10/13/2016 11:03 PM, Keith Wiles wrote: > >> The rte_eth_tap.c PMD creates a device using TUN/TAP interfaces > >> on the local host. The PMD allows for DPDK and the host to > >> communicate using a raw device interface on the host and in > >> the DPDK application. The device created is a Tap device with > >> a L2 packet header. > >> > >> v9 - Fix up the docs to use correct syntax > >> v8 - Fix issue with tap_tx_queue_setup() not return zero on success. > >> v7 - Reword the comment in common_base and fix the data->name issue > >> v6 - fixed the checkpatch issues > >> v5 - merge in changes from list review see related emails > >> fixed many minor edits > >> v4 - merge with latest driver changes > >> v3 - fix includes by removing ifdef for other type besides Linux > >> Fix the copyright notice in the Makefile > >> v2 - merge all of the patches into one patch > >> Fix a typo on naming the tap device > >> Update the maintainers list > >> > >> Signed-off-by: Keith Wiles <keith.wiles@intel.com> > >> --- > > > > Just a reminder, this is a new PMD and waiting for community review. > Regards, Keith
diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c index 7f303db..297d4b6 100644 --- a/drivers/net/tap/rte_eth_tap.c +++ b/drivers/net/tap/rte_eth_tap.c @@ -752,5 +752,6 @@ static struct rte_vdev_driver pmd_tap_drv = { .remove = rte_pmd_tap_remove, }; -DRIVER_REGISTER_VDEV(net_tap, pmd_tap_drv); -DRIVER_REGISTER_PARAM_STRING(net_tap, "iface=<string>,speed=N"); +RTE_PMD_REGISTER_VDEV(net_tap, pmd_tap_drv); +RTE_PMD_REGISTER_ALIAS(net_tap, eth_tap); +RTE_PMD_REGISTER_PARAM_STRING(net_tap, "iface=<string>,speed=N");