[dpdk-dev] [PATCH 1/2] rte_tailq.h: Fix compilation under FreeBSD

2014-06-10 Thread Cao, Waterman
Tested-by: Waterman Cao This patch is to fix compilation error in the FreeBSD 10.0 like the followings: .. /include/rte_tailq.h:177:21: error: unknown type name 'FILE' void rte_dump_tailq(FILE *f); ../include/rte_memory.h:146:30: error: unknown type name 'FILE' void

[dpdk-dev] [PATCH] kni: fix compile errors on Oracle Linux6.4 and RHEL6.5

2014-06-10 Thread Thomas Monjalon
Hi Helin, 2014-06-09 16:38, Helin Zhang: > #if ( LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0) ) > #define skb_tx_timestamp(skb) do {} while (0) > -#if !(RHEL_RELEASE_CODE && RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(6,4)) > -static inline bool ether_addr_equal(const u8 *addr1, const u8 *addr2) >

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

2014-06-10 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 v5 05/20] pci: Rename RTE_PCI_DRV_NEED_IGB_UIO to RTE_PCI_DRV_NEED_MAPPING

2014-06-10 Thread Anatoly Burakov
Rename the RTE_PCI_DRV_NEED_IGB_UIO to be more generic. Signed-off-by: Anatoly Burakov --- app/test/test_pci.c | 4 ++-- lib/librte_eal/bsdapp/eal/eal_pci.c | 2 +- lib/librte_eal/common/include/rte_pci.h | 4 ++-- lib/librte_eal/linuxapp/eal/eal_pci.c | 2 +-

[dpdk-dev] [PATCH v5 01/20] pci: move open() out of pci_map_resource, rename structs

2014-06-10 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 v5 06/20] igb_uio: make igb_uio compilation optional

2014-06-10 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 v5 09/20] vfio: add VFIO header

2014-06-10 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 v5 11/20] eal: remove -Wno-return-type for non-existent eal_hpet.c

2014-06-10 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 v5 08/20] vfio: add support for VFIO in Linuxapp targets

2014-06-10 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 v5 14/20] pci: enable VFIO device binding

2014-06-10 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 v5 16/20] eal: make --no-huge use mmap instead of malloc

2014-06-10 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 v5 15/20] eal: added support for selecting VFIO interrupt type from EAL command-line

2014-06-10 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 v5 07/20] igb_uio: Moved interrupt type out of igb_uio

2014-06-10 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 v5 10/20] interrupts: Add support for VFIO interrupts

2014-06-10 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 | 287 - .../linuxapp/eal/include/exec-env/rte_interrupts.h | 4 + 2 files changed, 286

[dpdk-dev] [PATCH v5 17/20] test app: adding unit tests for VFIO EAL command-line parameter

2014-06-10 Thread Anatoly Burakov
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), so we check this flag regardless. Signed-off-by: Anatoly Burakov --- app/test/test_eal_flags.c | 36 1 file

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

2014-06-10 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 v5 13/20] vfio: add multiprocess support.

2014-06-10 Thread Anatoly Burakov
Since VFIO cannot be used to map the same device twice, secondary processes receive the device/group fd's by means of communicating over a local socket. Only group and container fd's should be sent, as device fd's can be obtained via ioctl() calls' on the group fd. For multiprocess, VFIO

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

2014-06-10 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 v5 12/20] vfio: create mapping code for VFIO

2014-06-10 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 v5 02/20] pci: move uio mapping code to a separate file

2014-06-10 Thread Anatoly Burakov
Signed-off-by: Anatoly Burakov --- lib/librte_eal/linuxapp/eal/Makefile | 1 + lib/librte_eal/linuxapp/eal/eal_pci.c | 403 + lib/librte_eal/linuxapp/eal/eal_pci_uio.c | 403 +

[dpdk-dev] [PATCH] kni: fix compile errors on Oracle Linux6.4 and RHEL6.5

2014-06-10 Thread Neil Horman
On Mon, Jun 09, 2014 at 04:38:55PM +0800, Helin Zhang wrote: > From: HELIN ZHANG > > The compile errors are as follows. The fixes came from standard > Linux drivers of ixgbe-3.21.2 and igb-5.1.2. > > * Oracle Linux6.4 > lib/librte_eal/linuxapp/kni/ethtool/ixgbe/kcompat.h:3111: > error:

[dpdk-dev] [PATCH] fix for eth_pcap_tx() can cause mbuf corruption

2014-06-10 Thread Thomas Monjalon
> If pcap_sendpacket() fails, then eth_pcap_tx shouldn't silently free that > mbuf and continue. > > Signed-off-by: Konstantin Ananyev Acked-by: Pablo de Lara Guarch Tested-by: Waterman Cao Applied for version 1.7.0. Thanks -- Thomas

[dpdk-dev] using hash table in a MP environment

2014-06-10 Thread Neil Horman
On Tue, Jun 10, 2014 at 11:02:03AM +0300, Uri Sidler wrote: > Hi, > I am currently using a hash table in a multi-process environment. > the master process creates the hash table which is later used by other > secondary processes. > but the secondary processes fail to use the hash table since the

[dpdk-dev] [PATCH] mk: fix link with gcc

2014-06-10 Thread Thomas Monjalon
2014-06-02 09:40, Olivier MATZ: > Hi Thomas, > > On 05/29/2014 08:48 AM, Thomas Monjalon wrote: > > You're right, title should be: > > mk: fix 32-bit link with gcc > > > > And I should add some details in the commit log: > > > > I didn't see any error with -z muldefs but it isn't documented

[dpdk-dev] sharing rte_malloc() address between processes.

2014-06-10 Thread Uri Sidler
How can I share the addresses between processes? Is there a simple way of doing so? thanks, Shirley.

[dpdk-dev] using hash table in a MP environment

2014-06-10 Thread Venkat Thummala
Hi Shirley, Please refer the section 20.3 [Multi-Process Limitations] in DPDK Programmers Guide. The use of function pointers between multiple processes running based of different compiled binaries is not supported, since the location of a given function in one process may be different to its

[dpdk-dev] sharing rte_malloc() address between processes.

2014-06-10 Thread Venkat Thummala
Hi, Yo ? The multi-process feature requires that the exact same hugepage memory mappings be present in all applications. The Linux security feature - Address-Space Layout Randomization (ASLR) can interfere with this mapping, so it may be necessary to disable this feature in order to reliably run

[dpdk-dev] sharing rte_malloc() address between processes.

2014-06-10 Thread Venkat Thummala
Hi, You can refer section 20.3 [Multi-Process Limitations] in DPDK Programmer's Guide. It says, ? The multi-process feature requires that the exact same hugepage memory mappings be present in all applications. The Linux security feature - Address-Space Layout Randomization (ASLR) can interfere

[dpdk-dev] using rte_malloc() in a secondary process.

2014-06-10 Thread Uri Sidler
Hi, I have 2 processes without fork(). can the secondary process use rte_malloc()? is there a limitation for using rte_malloc on a secondary process? do I have to allocate a memzone in order to use the rte_malloc()? Thanks.

[dpdk-dev] [PATCH v3] mk: allow updates to build config on make install

2014-06-10 Thread Thomas Monjalon
From: Bruce Richardson When running "make config", an additional config.orig file is also generated, which is intended to hold the original, clean configuration from the template. When running make install, we first check if there is no existing .config file, and run

[dpdk-dev] [PATCH] mk: factorize config rules

2014-06-10 Thread Thomas Monjalon
Error message for missing template is factorized in notemplate rule. RTE_OUTPUT directory is marked as order-only prerequisite. Signed-off-by: Thomas Monjalon --- mk/rte.sdkconfig.mk | 25 - 1 file changed, 12 insertions(+), 13 deletions(-) diff --git

[dpdk-dev] [PATCH v2] mk: factorize config rules

2014-06-10 Thread Thomas Monjalon
Error message for missing template is factorized in notemplate rule. RTE_OUTPUT directory is marked as order-only prerequisite. RTE_OUTPUT is always created after having been cleaned for rte_config.h. Signed-off-by: Thomas Monjalon --- mk/rte.sdkconfig.mk | 26 +- 1

[dpdk-dev] [PATCH v3] mk: factorize config rules

2014-06-10 Thread Thomas Monjalon
Error message for missing template is factorized in notemplate rule. RTE_OUTPUT directory is marked as order-only prerequisite. RTE_OUTPUT is always created after having been cleaned for rte_config.h. Signed-off-by: Thomas Monjalon --- mk/rte.sdkconfig.mk | 26 +- 1

[dpdk-dev] [PATCH] kni: fix compile errors on Oracle Linux6.4 and RHEL6.5

2014-06-10 Thread Zhang, Helin
Hi Thomas Were you talking about the "#ifndef ether_addr_equal "? The compile errors I copied in that patch shows that the function has already been defined in include/linux/etherdevice.h on Oracle Linux6.4. In this case, it seems not always true as you said. The method came from the standard

[dpdk-dev] [PATCH] ixgbe: Fix for 82599 Bypass NIC, getting incorrect media type

2014-06-10 Thread Pablo de Lara
From: Pablo de Lara Function ixgbe_get_media_type_82599 returns media_type = ixgbe_media_type_unknown, when using an 82599 Bypass NIC, so that causes link status interrupt not to work properly. Signed-off-by: Pablo de Lara ---

[dpdk-dev] [PATCH 00/10] igb_uio patches

2014-06-10 Thread Carew, Alan
-Original Message- From: Stephen Hemminger [mailto:step...@networkplumber.org] Sent: Friday, June 06, 2014 10:27 PM To: Carew, Alan Cc: dev at dpkd.org Subject: [PATCH 00/10] igb_uio patches These apply to the current DPDK tree, and are an alternative to the patches from Alan. It

[dpdk-dev] [PATCH 00/10] igb_uio patches

2014-06-10 Thread Burakov, Anatoly
> These apply to the current DPDK tree, and are an alternative to the patches > from Alan. It provides indication of IRQ mode via sysfs attribute. They > include > cleanups and fixes to allow use of MSI and do proper fallback for the case > where MSI-X vectors are exhausted. > > Hi Stephen, > >

[dpdk-dev] [PATCH v3] mk: allow updates to build config on make install

2014-06-10 Thread Olivier MATZ
Hi Thomas, On 06/10/2014 03:51 PM, Thomas Monjalon wrote: > + if [ -f $(BUILD_DIR)/$*/.config.orig ] ; then \ > + tmp_build=/tmp/dpdk-$*-; \ > + $(MAKE) config T=$* O=$$(tmp_build); \ > + if ! cmp -s

[dpdk-dev] [PATCH v3] mk: factorize config rules

2014-06-10 Thread Olivier MATZ
On 06/10/2014 04:39 PM, Thomas Monjalon wrote: > Error message for missing template is factorized in notemplate rule. > > RTE_OUTPUT directory is marked as order-only prerequisite. > > RTE_OUTPUT is always created after having been cleaned for rte_config.h. > > Signed-off-by: Thomas Monjalon

[dpdk-dev] [PATCH v3] mk: allow updates to build config on make install

2014-06-10 Thread Richardson, Bruce
Yes, good point. I'll try and redraft a v3 of the patch (thanks Thomas for doing a V2), with that in it. I also think if we keep everything in the build dir we should not the rm afterwards. [In my previous tests when doing V1 patch, I found that deleting the directory each time seemed to slow

[dpdk-dev] [PATCH v4] mk: allow updates to build config on make install

2014-06-10 Thread Thomas Monjalon
From: Bruce Richardson When running "make config", an additional config.orig file is also generated, which is intended to hold the original, clean configuration from the template. When running make install, we first check if there is no existing .config file, and run

[dpdk-dev] [PATCH 3/5] ethdev: add mtu accessors

2014-06-10 Thread Ananyev, Konstantin
Hi David, >This patch adds two new functions in ethdev api to retrieve current MTU and >change MTU of a port. >These operations have been implemented for rte_em_pmd, rte_igb_pmd and >rte_ixgbe_pmd. >+ >+void ixgbe_dev_set_rx_scatter_mode(struct rte_eth_dev *dev) >+{ >+ if (dev->rx_pkt_burst

[dpdk-dev] [PATCH v4] mk: allow updates to build config on make install

2014-06-10 Thread Richardson, Bruce
> -Original Message- > From: Thomas Monjalon [mailto:thomas.monjalon at 6wind.com] > Sent: Tuesday, June 10, 2014 9:38 AM > To: dev at dpdk.org > Cc: Richardson, Bruce > Subject: [PATCH v4] mk: allow updates to build config on make install > > From: Bruce Richardson > > When running

[dpdk-dev] [PATCH 00/10] igb_uio patches

2014-06-10 Thread Carew, Alan
-Original Message- From: Stephen Hemminger [mailto:step...@networkplumber.org] Sent: Tuesday, June 10, 2014 6:41 PM To: Carew, Alan Cc: dev at dpkd.org Subject: Re: [PATCH 00/10] igb_uio patches On Tue, 10 Jun 2014 15:33:31 + "Carew, Alan" wrote: > Good catches and fixes in this

[dpdk-dev] [PATCH 00/10] igb_uio patches

2014-06-10 Thread Stephen Hemminger
On Tue, 10 Jun 2014 19:26:08 + "Carew, Alan" wrote: > A question then, how does uio_pci_generic handle interrupt modes in terms of > userspace interface when determining the configured interrupt mode? uio_pci_generic only handles INTX disable, and nothing else. It doesn't do MSI or allow

[dpdk-dev] [PATCH] add link state control driver flag

2014-06-10 Thread Stephen Hemminger
Only some devices support the link state interrupt configuration option. Link state control does not work in virtual drivers (virtio, vmxnet3, igbvf, and ixgbevf). Instead of having the application try and guess whether it will work or not provide a driver flag that can be checked instead. Note:

[dpdk-dev] [PATCH 1/2] rte_tailq.h: Fix compilation under FreeBSD

2014-06-10 Thread Bruce Richardson
On Thu, Jun 05, 2014 at 05:12:07PM +0100, Alan Carew wrote: > Recent change to rte_dump_tailq, which now uses a FILE parameter > causes compilation to fail under FreeBSD and sourced to a > missing include of stdio.h > > This and next patch(both small) allows to compile without error. > >

[dpdk-dev] [PATCH 2/2] eal_pci: Fix compilation under FreeBSD

2014-06-10 Thread Bruce Richardson
On Thu, Jun 05, 2014 at 05:12:08PM +0100, Alan Carew wrote: > I'm not sure why this has not caused an issue before, perhaps > missing -Werror=unused-parameter or super-set > and subsequently fixed. > This patch adds __rte_unused to > pci_unbind_kernel_driver(struct rte_pci_device *dev) > >

[dpdk-dev] [PATCH v2] ixgbe: Fix for 82599 Bypass NIC, getting incorrect media type

2014-06-10 Thread Pablo de Lara
From: Pablo de Lara Function ixgbe_get_media_type_82599 returns media_type = ixgbe_media_type_unknown, when using an 82599 Bypass NIC, so that causes link status interrupt not to work properly. change in v2: Fixed compilation error when RTE_NIC_BYPASS=n