[dpdk-dev] veth interfaces

2014-06-03 Thread Ivano Cerrato
Hello, thanks for the answer. Using the KNI API, I create a new interface, and then I "push it into the container". At this point, from the container, I send traffic and it is received in the KNI example program. Instead, in my understanding, it is not possible to attach KNI to an already

[dpdk-dev] [PATCH v3 2/5] distributor: new packet distributor library

2014-06-03 Thread Neil Horman
On Tue, Jun 03, 2014 at 07:04:12PM +0100, Bruce Richardson wrote: > This adds the code for a new Intel DPDK library for packet distribution. > The distributor is a component which is designed to pass packets > one-at-a-time to workers, with dynamic load balancing. Using the RSS > field in the mbuf

[dpdk-dev] [PATCH v2 2/5] distributor: new packet distributor library

2014-06-03 Thread Richardson, Bruce
> -Original Message- > From: Neil Horman [mailto:nhorman at tuxdriver.com] > Sent: Tuesday, June 03, 2014 4:01 AM > To: Richardson, Bruce > Cc: dev at dpdk.org > Subject: Re: [dpdk-dev] [PATCH v2 2/5] distributor: new packet distributor > library > > On Mon, Jun 02, 2014 at 09:40:04PM

[dpdk-dev] [PATCH v4 20/20] setup script: adding support for VFIO to setup.sh

2014-06-03 Thread Anatoly Burakov
Support for loading/unloading VFIO drivers, binding/unbinding devices to/from VFIO, also setting up correct userspace permissions. Signed-off-by: Anatoly Burakov --- tools/setup.sh | 156 +++-- 1 file changed, 141 insertions(+), 15

[dpdk-dev] [PATCH v4 19/20] binding script: Renamed igb_uio_bind to dpdk_nic_bind

2014-06-03 Thread Anatoly Burakov
Renaming the igb_uio_bind script to dpdk_nic_bind to have a generic name since we're now supporting two drivers. Signed-off-by: Anatoly Burakov --- tools/{igb_uio_bind.py => dpdk_nic_bind.py} | 47 - tools/setup.sh | 16 +- 2

[dpdk-dev] [PATCH v4 18/20] igb_uio: Removed PCI ID table from igb_uio

2014-06-03 Thread Anatoly Burakov
Removing PCI ID list to make igb_uio more similar to a generic driver like vfio-pci or pci_uio_generic. This is done to make it easier for the binding script to support multiple drivers. Note that since igb_uio no longer has a PCI ID list, it can now be bound to any device, not just those

[dpdk-dev] [PATCH v4 16/20] eal: make --no-huge use mmap instead of malloc

2014-06-03 Thread Anatoly Burakov
This makes it possible to run DPDK without hugepage memory when VFIO is used, as VFIO uses virtual addresses to set up DMA mappings. Technically, malloc is just fine, but we want to guarantee that memory will be page-aligned, so using mmap to be safe. Signed-off-by: Anatoly Burakov ---

[dpdk-dev] [PATCH v4 15/20] eal: added support for selecting VFIO interrupt type from EAL command-line

2014-06-03 Thread Anatoly Burakov
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", "msi" or "msix" if VFIO

[dpdk-dev] [PATCH v4 14/20] pci: enable VFIO device binding

2014-06-03 Thread Anatoly Burakov
Add support for binding VFIO devices if RTE_PCI_DRV_NEED_MAPPING is set for this driver. Try VFIO first, if not mapped then try IGB_UIO too. Signed-off-by: Anatoly Burakov --- lib/librte_eal/linuxapp/eal/eal_pci.c | 42 --- 1 file changed, 39 insertions(+), 3

[dpdk-dev] [PATCH v4 12/20] vfio: create mapping code for VFIO

2014-06-03 Thread Anatoly Burakov
Adding code to support VFIO mapping (primary processes only). Most of the things are done via ioctl() calls on either /dev/vfio/vfio (the container) or a /dev/vfio/$GROUP_NR (IOMMU group). In a nutshell, the code does the following: 1. creates a VFIO container (an entity that allows sharing IOMMU

[dpdk-dev] [PATCH v4 11/20] eal: remove -Wno-return-type for non-existent eal_hpet.c

2014-06-03 Thread Anatoly Burakov
eal_hpet.c was renamed to eal_timer.c and, thanks to code changes, does not need the -Wno-return-type any more. Signed-off-by: Anatoly Burakov --- lib/librte_eal/linuxapp/eal/Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/librte_eal/linuxapp/eal/Makefile

[dpdk-dev] [PATCH v4 10/20] interrupts: Add support for VFIO interrupts

2014-06-03 Thread Anatoly Burakov
Creating code to handle VFIO interrupts in EAL interrupts (supports all types of interrupts). Signed-off-by: Anatoly Burakov --- lib/librte_eal/linuxapp/eal/eal_interrupts.c | 285 - .../linuxapp/eal/include/exec-env/rte_interrupts.h | 4 + 2 files changed, 284

[dpdk-dev] [PATCH v4 09/20] vfio: add VFIO header

2014-06-03 Thread Anatoly Burakov
Adding a header that will determine if VFIO support should be compiled in. If VFIO is enabled in config (and it's enabled by default), then the header will also check for kernel version. If VFIO is enabled in config and if the kernel version is 3.6+, then VFIO_PRESENT will be defined. This is the

[dpdk-dev] [PATCH v4 08/20] vfio: add support for VFIO in Linuxapp targets

2014-06-03 Thread Anatoly Burakov
Add VFIO compilation option to common Linuxapp config. Signed-off-by: Anatoly Burakov --- config/common_linuxapp | 1 + 1 file changed, 1 insertion(+) diff --git a/config/common_linuxapp b/config/common_linuxapp index b17e37e..2ed4b7e 100644 --- a/config/common_linuxapp +++

[dpdk-dev] [PATCH v4 07/20] igb_uio: Moved interrupt type out of igb_uio

2014-06-03 Thread Anatoly Burakov
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 --- lib/librte_eal/common/Makefile | 1 +

[dpdk-dev] [PATCH v4 06/20] igb_uio: make igb_uio compilation optional

2014-06-03 Thread Anatoly Burakov
Currently, igb_uio is always compiled. Some Linux distributions may not want to include igb_uio with DPDK, so we need to make sure that igb_uio compilation for Linuxapp targets can be optional. Signed-off-by: Anatoly Burakov --- config/common_linuxapp | 1 +

[dpdk-dev] [PATCH v4 04/20] pci: distinguish between legitimate failures and non-fatal errors

2014-06-03 Thread Anatoly Burakov
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 v4 01/20] pci: move open() out of pci_map_resource, rename structs

2014-06-03 Thread Anatoly Burakov
Separating mapping code and calls to open. This is a preparatory work for VFIO patch since it'll need to map BARs too but it doesn't use path in mapped_pci_resource. Also, renaming structs to be more generic. Signed-off-by: Anatoly Burakov --- lib/librte_eal/linuxapp/eal/eal_pci.c | 125

[dpdk-dev] [PATCH v4 00/20] Add VFIO support to DPDK

2014-06-03 Thread Anatoly Burakov
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 v2 2/5] distributor: new packet distributor library

2014-06-03 Thread Neil Horman
On Tue, Jun 03, 2014 at 02:33:16PM +, Richardson, Bruce wrote: > > > > -Original Message- > > From: Neil Horman [mailto:nhorman at tuxdriver.com] > > Sent: Tuesday, June 03, 2014 4:01 AM > > To: Richardson, Bruce > > Cc: dev at dpdk.org > > Subject: Re: [dpdk-dev] [PATCH v2 2/5]

[dpdk-dev] Ethtool support in DPDK pmd

2014-06-03 Thread Vincent JARDIN
On 02/06/2014 22:37, Chris Wright wrote: > If drivers stayed in kernel and kernel drivers exposed a mechansim for > registering application dma buffers for dpdk apps, then ethtool would > simply work as-is. Yes, that's the right way to go. Currently, the kernel does not provide a generic