From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f43.google.com (mail-wg0-f43.google.com [74.125.82.43]) by dpdk.org (Postfix) with ESMTP id B80072E88 for ; Fri, 21 Mar 2014 15:08:38 +0100 (CET) Received: by mail-wg0-f43.google.com with SMTP id x13so1617773wgg.26 for ; Fri, 21 Mar 2014 07:10:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=2n/nytEfD20yZITq+q2QS+sbJXr612iJ0NLxddMuaSo=; b=hpdU1R+wFcs+IK8TcBiwL45ih9LGhJ75EVGkSd0s6AsQ1MHSk6lVxsOUdPUKicScXB JniVnqXBcu/v0pYUUdgEOudmLaQK10iiddwHRE7IAxV9JgI64P4bMNztuvaa5wQMD7Oc qwdBmQQzqIlFvlWBPYc/tzB3nsCqqZ4zka5z1wEGN7tKRoVcyNEWAN8cXusEGD1XXSjX x0Pjkw5g0x4mKTuXlNPggxbT+Kt91Jv+81+qQxSak9GKM2pYYrZOrQI6Y/DxuHQFa/a7 Dta23BWL13d1fYONaeGOnLP2Z7+hv79PrveTH6mOhfV/xPoXEaHJlH+Xjnglw+2qw1vr dSTw== X-Gm-Message-State: ALoCoQn/Ku0nEhN2HYZxQHTO+0iEUB/cHi89rozN4ChJO6WJtyD+VmtTdGX50HJijViT3PxZR2FU X-Received: by 10.180.164.106 with SMTP id yp10mr2883977wib.48.1395411010559; Fri, 21 Mar 2014 07:10:10 -0700 (PDT) Received: from xps13.localnet (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id f7sm13566486wjb.7.2014.03.21.07.10.09 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 21 Mar 2014 07:10:09 -0700 (PDT) From: Thomas Monjalon To: Daniel Kan Date: Fri, 21 Mar 2014 15:10:08 +0100 Message-ID: <29690202.d2trYudiQU@xps13> Organization: 6WIND User-Agent: KMail/4.12.3 (Linux/3.13.6-1-ARCH; KDE/4.12.3; x86_64; ; ) In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] On vmxnet-pmd crash in DPDK 1.6.0r1 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 14:08:39 -0000 10/03/2014 23:29, Daniel Kan : > virtio-pmd has the same pattern. I wonder if vmxnet3-pmd just blindly= copied > the same paradigm. >=20 > 473 static struct eth_driver rte_virtio_pmd =3D { > 474 { > 475 .name =3D "rte_virtio_pmd", > 476 .id_table =3D pci_id_virtio_map, > 477 #ifdef RTE_EAL_UNBIND_PORTS > 478 .drv_flags =3D RTE_PCI_DRV_NEED_IGB_UIO, > 479 #endif [...] > > 266 static struct eth_driver rte_vmxnet3_pmd =3D { > > 267 { > > 268 .name =3D "rte_vmxnet3_pmd", > > 269 .id_table =3D pci_id_vmxnet3_map, > > 270 #ifdef RTE_EAL_UNBIND_PORTS > > 271 .drv_flags =3D RTE_PCI_DRV_NEED_IGB_UIO, > > 272 #endif It was the old way of configuring UIO PMD before this patch: =09pci: use igb_uio mapping only when needed =09http://dpdk.org/browse/dpdk/commit/?id=3D10ed99419b12b8 The goal of this patch was to fix usage of the extensions virtio-net-pm= d and=20 vmxnet3-usermap. You can see in this patch that em/igb/ixgbe drivers are updated accordi= ngly. Then virtio_uio and vmxnet3_uio were released without this patch in min= d. So=20 they were broken. > > lib/librte_eal/linuxapp/eal/eal_pci.c > > 1039 #ifdef RTE_EAL_UNBIND_PORTS > > 1040 if (dr->drv_flags & RTE_PCI_DRV_NEED_IGB_UIO) { > > 1041 /* unbind driver and load uio resources for Intel = NICs */ > > 1042 if (pci_switch_module(dr, dev, 1, IGB_UIO_NAME) < = 0) > > ... > > 1050 #else > > 1051 if (dr->drv_flags & RTE_PCI_DRV_NEED_IGB_UIO) > > 1052 /* just map resources for Intel NICs */ > > 1053 if (pci_uio_map_resource(dev) < 0) > > 1054 return -1; > > 1055 #endif > >=20 > > If RTE_EAL_UNBIND_PORTS is defined, pci_switch_module will call > > pci_uio_map_resource. > >=20 > > I then looked at the bsdapp=E2=80=99s version, it simply has: > > lib/librte_eal/bsdapp/eal/eal_pci.c > > 479 /* just map the NIC resources */ > > 480 if (pci_uio_map_resource(dev) < 0) > > 481 return -1; > >=20 > > I don=E2=80=99t know the history behind why .drv_flags =3D RTE_PCI_= DRV_NEED_IGB_UIO > > only for RTE_EAL_UNBIND_PORTS. Can we just ensure pci_uio_map_resou= rce is > > called in linux just like bsd version? One way is to ensure drv_fla= gs is > > always set to RTE_PCI_DRV_NEED_IGB_UIO, but I don=E2=80=99t know if= this fix will > > break other parts. I've just sent another patch to update and fix virtio_uio and vmxnet3_u= io: =09http://dpdk.org/ml/archives/dev/2014-March/001647.html Feel free to ack it. Thanks for reporting --=20 Thomas