[dpdk-dev] [PATCH] app/testpmd: fix crash when using set fwd tx_first with NUMA

2014-05-01 Thread Thomas Monjalon
> From: Adrien Mazarguil > > When NUMA is enabled, the per-core fwd_lcore structure mbuf pool pointer > is not set, causing a crash. > > Initialize fwd_lcore after allocating NUMA memory pools. > > Signed-off-by: Adrien Mazarguil Acked-by: Thomas Monjalon Applied for version 1.6.0r2.

[dpdk-dev] [PATCH] eal: fix vdev allocation on non-0 numa socket

2014-05-01 Thread Thomas Monjalon
> From: Maxime Leroy > > vdev ethdev can not be allocated on a numa socket that is not socket 0. > The reason comes from rte_eth_dev_allocate() which uses rte_socket_id() to > identify the socket on which vdev driver data should be allocated. > However, at this initialization step,

[dpdk-dev] [PATCH v2 0/4] recipes for RPM packages

2014-05-01 Thread Neil Horman
On Thu, May 01, 2014 at 08:53:02AM +0200, Thomas Monjalon wrote: > 2014-04-30 11:22, Neil Horman: > > On Wed, Apr 30, 2014 at 01:09:38PM +0200, Thomas Monjalon wrote: > > > The 4 spec files are used to build 4 different git trees with their own > > > versioning: > > > http://dpdk.org/browse > >

[dpdk-dev] [PATCH 00/16] [RFC] [VFIO] Add VFIO support to DPDK

2014-05-01 Thread Burakov, Anatoly
This patchset adds support for using VFIO instead of IGB_UIO to map the device BARs. VFIO is a kernel 3.6+ driver allowing secure DMA from userspace by means of using IOMMU instead of working directly with physical memory like igb_uio does. Short summary: * Adding support for VFIO in EAL PCI

[dpdk-dev] [PATCH 02/16] [RFC] [VFIO] Distinguish between legitimate failures and non-fatal errors

2014-05-01 Thread Burakov, Anatoly
Currently, EAL does not distinguish between actual failures and expected initialization errors. E.g. sometimes the driver fails to initialize because it was not supposed to be initialized in the first place, such as device not being managed by said driver. This patch makes EAL fail on actual

[dpdk-dev] [PATCH 03/16] [RFC] [VFIO] Rename RTE_PCI_DRV_NEED_IGB_UIO to RTE_PCI_DRV_NEED_MAPPING

2014-05-01 Thread Burakov, Anatoly
Rename the RTE_PCI_DRV_NEED_IGB_UIO to be more generic, retain old macro for backwards compatibility. Probably should be removed in one of the next releases. Signed-off-by: Anatoly Burakov diff --git a/app/test/test_pci.c b/app/test/test_pci.c index 445cf57..e13f635 100644 ---

[dpdk-dev] [PATCH 01/16] [RFC] [VFIO] Separate igb_uio mapping into a separate file

2014-05-01 Thread Burakov, Anatoly
In order to make the code a bit more clean while using multiple drivers, IGB_UIO mapping has been separated into its own file. Signed-off-by: Anatoly Burakov create mode 100644 lib/librte_eal/linuxapp/eal/eal_pci_uio.c create mode 100644 lib/librte_eal/linuxapp/eal/include/eal_pci_init.h

[dpdk-dev] [PATCH 05/16] [RFC] [VFIO] Moved interrupt type out of igb_uio

2014-05-01 Thread Burakov, Anatoly
Moving interrupt type enum out of igb_uio and renaming it to be more generic. Such a strange header naming and separation is done mostly to make coming virtio patches easier to port to dpdk.org tree. Signed-off-by: Anatoly Burakov create mode 100644

[dpdk-dev] [PATCH 06/16] [RFC] [VFIO] Add support for VFIO in Linuxapp targets

2014-05-01 Thread Burakov, Anatoly
Make VFIO compilation optional for all configs. Signed-off-by: Anatoly Burakov diff --git a/config/defconfig_i686-default-linuxapp-gcc b/config/defconfig_i686-default-linuxapp-gcc index ea90f12..5410f57 100644 --- a/config/defconfig_i686-default-linuxapp-gcc +++

[dpdk-dev] [PATCH 04/16] [RFC] [VFIO] Make igb_uio compilation optional

2014-05-01 Thread Burakov, Anatoly
Currently, igb_uio is always compiled. Since no Linux distribution would want to include igb_uio by default or even with DPDK, we need to make sure that igb_uio compilation can be optional (i.e. some distributions could ship DPDK with VFIO support only). Signed-off-by: Anatoly Burakov diff

[dpdk-dev] [PATCH 10/16] [RFC] [VFIO] Added support for selecting VFIO interrupt type from EAL command-line

2014-05-01 Thread Burakov, Anatoly
Unlike igb_uio, VFIO interrupt type is not set by kernel module parameters but is set up via ioctl() calls at runtime. This warrants a new EAL command-line parameter. It will have no effect if VFIO is not compiled, but will set VFIO interrupt type to either "legacy" or "msix" if VFIO support is

[dpdk-dev] [PATCH 13/16] [RFC] [VFIO] Removed PCI ID table from igb_uio

2014-05-01 Thread Burakov, Anatoly
Note that since igb_uio no longer has a PCI ID list, it can now be bound to any device, not just those explicitly supported by DPDK. In other words, it now behaves similar to PCI stub, VFIO and other generic PCI drivers. Therefore to bind a new device to igb_uio, the user will now have to first

[dpdk-dev] [PATCH 11/16] [RFC] [VFIO] Make --no-huge use mmap instead of malloc

2014-05-01 Thread Burakov, Anatoly
This makes it possible to run DPDK without hugepage memory when VFIO is used, as VFIO uses virtual addresses to set up DMA mappings. Signed-off-by: Anatoly Burakov diff --git a/lib/librte_eal/linuxapp/eal/eal_memory.c b/lib/librte_eal/linuxapp/eal/eal_memory.c index 73a6394..b075145 100644 ---

[dpdk-dev] [PATCH 07/16] [RFC] [VFIO] Add support for VFIO interrupts, add VFIO header

2014-05-01 Thread Burakov, Anatoly
Creating code to handle VFIO interrupts in EAL interrupts, and also adding a header eal_vfio.h. This header checks two things: * checks if CONFIG_RTE_EAL_VFIO was enabled during build time * checks that kernel version is 3.6+ so that DPDK would still compile on older kernels despite VFIO

[dpdk-dev] [PATCH 12/16] [RFC] [VFIO] Adding unit tests for VFIO EAL command-line parameter

2014-05-01 Thread Burakov, Anatoly
Adding unit tests for VFIO interrupt type command-line parameter. We don't know if VFIO is compiled (eal_vfio.h header is internal to Linuxapp EAL), we check this flag regardless. Also, quick-fixed a bug in base_virtaddr parsing that prevented it from working (making unit test fail), will later

[dpdk-dev] [PATCH 15/16] [RFC] [VFIO] Added support for VFIO drivers in dpdk_nic_bind.py

2014-05-01 Thread Burakov, Anatoly
Since igb_uio no longer has a PCI ID list, the script will no longer distinguish between supported and unsupported NICs. There's a weird behaviour of sysfs when a new device ID is added to new_id. Subsequent writing to "bind" will result in IOError on closing the file. This error is harmless but

[dpdk-dev] [PATCH 16/16] [RFC] [VFIO] Adding support for VFIO to setup.sh

2014-05-01 Thread Burakov, Anatoly
Support for loading/unloading VFIO drivers, binding/unbinding devices to/from VFIO, also setting up correct userspace permissions. Signed-off-by: Anatoly Burakov diff --git a/tools/setup.sh b/tools/setup.sh index 39be8fc..2ffa55a 100755 --- a/tools/setup.sh +++ b/tools/setup.sh @@ -187,6

[dpdk-dev] [PATCH v2 0/4] recipes for RPM packages

2014-05-01 Thread Neil Horman
On Wed, Apr 30, 2014 at 02:46:41AM +0200, Thomas Monjalon wrote: > The goal of this patch serie is to be able to package DPDK > for RPM-based distributions. > > The file naming currently doesn't allow to install different DPDK versions. > But the packaging naming should be ready to manage

[dpdk-dev] [PATCH 1/7] pci: fix potential mem leak

2014-05-01 Thread Burakov, Anatoly
Hi David, > Looking at bsd implementation, we can see that there is a potential mem > leak in linux implementation. Fix this. > > Signed-off-by: David Marchand > --- > lib/librte_eal/linuxapp/eal/eal_pci.c |1 + > 1 file changed, 1 insertion(+) > > diff --git

[dpdk-dev] [PATCH v2 0/4] recipes for RPM packages

2014-05-01 Thread Thomas Monjalon
2014-05-01 06:28, Neil Horman: > On Thu, May 01, 2014 at 08:53:02AM +0200, Thomas Monjalon wrote: > > 2014-04-30 11:22, Neil Horman: > > > On Wed, Apr 30, 2014 at 01:09:38PM +0200, Thomas Monjalon wrote: > > > > The 4 spec files are used to build 4 different git trees with their > > > > own > > >

[dpdk-dev] [Xen-devel] dpdk kernel module when calling xen_create_contiguous_region

2014-05-01 Thread Samuel Monderer
> -Original Message- > From: Konrad Rzeszutek Wilk [mailto:konrad.wilk at oracle.com] > Sent: Thursday, May 01, 2014 6:07 PM > To: Samuel Monderer > Cc: xen-devel at lists.xen.org; Shimon Zadok; Eyal Ben Saadon; Andrew > Sergeev > Subject: Re: [Xen-devel] dpdk kernel module when calling

[dpdk-dev] [PATCH RFC] eal: change core mask input format

2014-05-01 Thread Burakov, Anatoly
> From: Didier Pallard > > In current version, coremask can only be specified using a bitmask. > It will now be possible to specify core masks in 2 different ways: > - Using a bitmask (-c 0xnnn): bitmask must be in hex format and start with 0x > - Using a core set description in following

[dpdk-dev] [PATCH RFC] eal: change default per socket memory allocation

2014-05-01 Thread Burakov, Anatoly
Hi David, Didier, > + /* Set memory amount per socket; round up to be sure that > sum of all */ > + /* sockets allocation is greater than requested memory size > */ > + for (socket_id=0 ; socket_id socket_id++) { > +

[dpdk-dev] [PATCH 00/16] [RFC] [VFIO] Add VFIO support to DPDK

2014-05-01 Thread Stephen Hemminger
On Thu, 1 May 2014 11:05:38 + "Burakov, Anatoly" wrote: > This patchset adds support for using VFIO instead of IGB_UIO to > map the device BARs. > > VFIO is a kernel 3.6+ driver allowing secure DMA from userspace > by means of using IOMMU instead of working directly with physical > memory

[dpdk-dev] [PATCH v2] mk: fix build ignoring other installed versions

2014-05-01 Thread Neil Horman
On Wed, Apr 30, 2014 at 10:57:00PM +0200, Thomas Monjalon wrote: > If some DPDK libraries are installed on the system, the linker was trying > to use them before searching in -L path. > The obscure reason is that we were prefixing -L with -Wl, to pass it > directly to the linker. > But -L is also

[dpdk-dev] [PATCH 16/16] [RFC] [VFIO] Adding support for VFIO to setup.sh

2014-05-01 Thread Stephen Hemminger
On Thu, 1 May 2014 11:06:12 + "Burakov, Anatoly" wrote: > > # > +# Unloads VFIO modules. > +# > +remove_vfio_module() > +{ > + echo "Unloading any existing VFIO module" > + /sbin/lsmod | grep -s vfio > /dev/null > + if [ $? -eq 0 ] ; then > + sudo /sbin/rmmod

[dpdk-dev] [PATCH v2 0/4] recipes for RPM packages

2014-05-01 Thread Thomas Monjalon
2014-04-30 11:22, Neil Horman: > On Wed, Apr 30, 2014 at 01:09:38PM +0200, Thomas Monjalon wrote: > > The 4 spec files are used to build 4 different git trees with their own > > versioning: > > http://dpdk.org/browse > > > > So I think it's saner to keep them in their repository. [...] > >