[dpdk-dev] NIC Stops Transmitting

2013-07-26 Thread Scott Talbert
On Fri, 26 Jul 2013, jinho hwang wrote: >> Thanks for the tips. I don't think I'm running out of mbufs, but I'll check >> that again. I am using these values from one of the examples - which claim >> to be correct for the 82599EB. >> >> /* >> * These default values are optimized for use with th

[dpdk-dev] NIC Stops Transmitting

2013-07-26 Thread jinho hwang
On Fri, Jul 26, 2013 at 4:04 PM, Scott Talbert wrote: > On Fri, 26 Jul 2013, Stephen Hemminger wrote: > >>> I'm writing an application using DPDK that transmits a large number of >>> packets (it doesn't receive any). When I transmit at 2 Gb/sec, >>> everything >>> will run fine for several second

[dpdk-dev] [dpdk-announce] DPDK 1.3.1r2 released

2013-07-26 Thread Thomas Monjalon
The new release can be downloaded here: http://dpdk.org/browse/dpdk/tag/?id=v1.3.1r2 Changelog - fixes for: * KNI build * detection of CPU cores - enhancements: * real "make install" * improved malloc library

[dpdk-dev] [PATCH] mem: fix log for --no-huge

2013-07-26 Thread Thomas Monjalon
26/07/2013 16:57, Damien Millescamps : > On 07/26/2013 04:56 PM, Thomas Monjalon wrote: > > In some cases, it is possible to not use hugepages. > > So a simple malloc is used to initialize DPDK memory. > > > > Signed-off-by: Thomas Monjalon > > --- > > > > lib/librte_eal/linuxapp/eal/eal_memory

[dpdk-dev] [PATCH 2/2] mem: fix mempool for --no-huge

2013-07-26 Thread Thomas Monjalon
26/07/2013 16:59, Adrien Mazarguil : > On Fri, Jul 26, 2013 at 04:39:13PM +0200, Damien Millescamps wrote: > > In --no-huge mode, mempool provides objects with their associated > > header/trailer fitting in a standard page (usually 4KB). > > This means all non-UIO driver should work correctly in th

[dpdk-dev] [PATCH 1/2] mem: get hugepages config

2013-07-26 Thread Thomas Monjalon
26/07/2013 16:59, Adrien Mazarguil : > On Fri, Jul 26, 2013 at 04:39:12PM +0200, Damien Millescamps wrote: > > Allow external libraries and applications to know if hugepages > > are enabled. > > > > Signed-off-by: Thomas Monjalon > > Signed-off-by: Damien Millescamps > > --- > > > > lib/librte

[dpdk-dev] [PATCH] mem: get memzone from any CPU socket when hugepages are disabled

2013-07-26 Thread Thomas Monjalon
26/07/2013 16:56, Damien Millescamps : > On 07/26/2013 04:35 PM, Adrien Mazarguil wrote: > > When huge pages are disabled, memory is allocated for a single, undefined > > CPU socket using malloc(), causing rte_memzone_reserve_aligned() to fail > > most of the time. > > > > This patch causes that m

[dpdk-dev] [PATCH] mem: fix rte_malloc(SOCKET_ID_ANY), try to allocate on other nodes

2013-07-26 Thread Thomas Monjalon
26/07/2013 16:55, Thomas Monjalon : > From: Olivier Matz > > Before this patch, rte_malloc(SOCKET_ID_ANY) was equivalent to > rte_malloc(this_socket). If the user specifies SOCKET_ID_ANY, it means that > memory can be allocated on any socket. So fix the behavior of rte_malloc() > in order to do t

[dpdk-dev] [PATCH] mem: remove unneeded log

2013-07-26 Thread Thomas Monjalon
26/07/2013 16:54, Thomas Monjalon : > From: Olivier Matz > > Remove an error log in memzone_reserve_aligned_thread_unsafe(). > It is up to the caller to log the error, and this is already done > in DPDK code (especially in network drivers). > > Signed-off-by: Olivier Matz > Acked-by: Thomas Mon

[dpdk-dev] [PATCH 2/2] mem: fix mempool for --no-huge

2013-07-26 Thread Adrien Mazarguil
On Fri, Jul 26, 2013 at 04:39:13PM +0200, Damien Millescamps wrote: > In --no-huge mode, mempool provides objects with their associated > header/trailer fitting in a standard page (usually 4KB). > This means all non-UIO driver should work correctly in this mode, > since UIO drivers allocate ring si

[dpdk-dev] [PATCH 1/2] mem: get hugepages config

2013-07-26 Thread Adrien Mazarguil
On Fri, Jul 26, 2013 at 04:39:12PM +0200, Damien Millescamps wrote: > Allow external libraries and applications to know if hugepages > are enabled. > > Signed-off-by: Thomas Monjalon > Signed-off-by: Damien Millescamps > --- > lib/librte_eal/common/include/rte_eal.h | 13 - > lib/

[dpdk-dev] [PATCH] mem: fix log for --no-huge

2013-07-26 Thread Damien Millescamps
On 07/26/2013 04:56 PM, Thomas Monjalon wrote: > In some cases, it is possible to not use hugepages. > So a simple malloc is used to initialize DPDK memory. > > Signed-off-by: Thomas Monjalon > --- > lib/librte_eal/linuxapp/eal/eal_memory.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(

[dpdk-dev] [PATCH] mem: get memzone from any CPU socket when hugepages are disabled

2013-07-26 Thread Damien Millescamps
On 07/26/2013 04:35 PM, Adrien Mazarguil wrote: > When huge pages are disabled, memory is allocated for a single, undefined > CPU socket using malloc(), causing rte_memzone_reserve_aligned() to fail > most of the time. > > This patch causes that memory to use SOCKET_ID_ANY instead of 0, and allow >

[dpdk-dev] [PATCH] mem: fix log for --no-huge

2013-07-26 Thread Thomas Monjalon
In some cases, it is possible to not use hugepages. So a simple malloc is used to initialize DPDK memory. Signed-off-by: Thomas Monjalon --- lib/librte_eal/linuxapp/eal/eal_memory.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_eal/linuxapp/eal/eal_memory.c b

[dpdk-dev] [PATCH] mem: fix rte_malloc(SOCKET_ID_ANY), try to allocate on other nodes

2013-07-26 Thread Thomas Monjalon
From: Olivier Matz Before this patch, rte_malloc(SOCKET_ID_ANY) was equivalent to rte_malloc(this_socket). If the user specifies SOCKET_ID_ANY, it means that memory can be allocated on any socket. So fix the behavior of rte_malloc() in order to do that. The current CPU socket is still the default

[dpdk-dev] [PATCH] mem: remove unneeded log

2013-07-26 Thread Thomas Monjalon
From: Olivier Matz Remove an error log in memzone_reserve_aligned_thread_unsafe(). It is up to the caller to log the error, and this is already done in DPDK code (especially in network drivers). Signed-off-by: Olivier Matz Acked-by: Thomas Monjalon --- lib/librte_eal/common/eal_common_memzone

[dpdk-dev] [PATCH 1/1] mem: get physical address of any rte_malloc buffer

2013-07-26 Thread Thomas Monjalon
26/07/2013 16:25, Didier Pallard : > Get physical address of any rte_malloc allocated buffer using > function rte_malloc_virt2phy(addr). > The rte_memzone pointer is now stored in each allocated memory block > header to allow simple computation of physical address of a block > using the memzone it

[dpdk-dev] [PATCH] mem: more const qualifiers in malloc API

2013-07-26 Thread Thomas Monjalon
26/07/2013 16:37, Adrien Mazarguil : > On Fri, Jul 26, 2013 at 04:06:40PM +0200, Thomas Monjalon wrote: > > Some functions don't modify their parameter which should be marked as > > const. > > > > Signed-off-by: Thomas Monjalon > > --- > > > > lib/librte_malloc/malloc_elem.h |6 +++--- > >

[dpdk-dev] [PATCH 2/2] mem: fix mempool for --no-huge

2013-07-26 Thread Damien Millescamps
In --no-huge mode, mempool provides objects with their associated header/trailer fitting in a standard page (usually 4KB). This means all non-UIO driver should work correctly in this mode, since UIO drivers allocate ring sizes that cannot fit in a page. Extend rte_mempool_virt2phy to obtain the co

[dpdk-dev] [PATCH 1/2] mem: get hugepages config

2013-07-26 Thread Damien Millescamps
Allow external libraries and applications to know if hugepages are enabled. Signed-off-by: Thomas Monjalon Signed-off-by: Damien Millescamps --- lib/librte_eal/common/include/rte_eal.h | 13 - lib/librte_eal/linuxapp/eal/eal.c |4 2 files changed, 16 insertions(+),

[dpdk-dev] [PATCH 0/2] fix mempool when --no-huge option is set

2013-07-26 Thread Damien Millescamps
This set of patch permits to use the --no-huge option to create valid mempools. However, drivers necessitating a physically contiguous memory larger than a standard page won't work in this mode. Only vmxnet3-usermap will work in this mode among the available open source PMD. This can be useful fo

[dpdk-dev] [PATCH] mem: more const qualifiers in malloc API

2013-07-26 Thread Adrien Mazarguil
On Fri, Jul 26, 2013 at 04:06:40PM +0200, Thomas Monjalon wrote: > Some functions don't modify their parameter which should be marked as const. > > Signed-off-by: Thomas Monjalon > --- > lib/librte_malloc/malloc_elem.h |6 +++--- > lib/librte_malloc/malloc_heap.c |2 +- > lib/librte_mall

[dpdk-dev] [PATCH] mem: get memzone from any CPU socket when hugepages are disabled

2013-07-26 Thread Adrien Mazarguil
When huge pages are disabled, memory is allocated for a single, undefined CPU socket using malloc(), causing rte_memzone_reserve_aligned() to fail most of the time. This patch causes that memory to use SOCKET_ID_ANY instead of 0, and allow it to be used in place of any socket ID specified by user.

[dpdk-dev] [PATCH 1/1] mem: get physical address of any rte_malloc buffer

2013-07-26 Thread Didier Pallard
Get physical address of any rte_malloc allocated buffer using function rte_malloc_virt2phy(addr). The rte_memzone pointer is now stored in each allocated memory block header to allow simple computation of physical address of a block using the memzone it comes from. Declaration of memzone in malloc_

[dpdk-dev] [PATCH] mem: more const qualifiers in malloc API

2013-07-26 Thread Thomas Monjalon
Some functions don't modify their parameter which should be marked as const. Signed-off-by: Thomas Monjalon --- lib/librte_malloc/malloc_elem.h |6 +++--- lib/librte_malloc/malloc_heap.c |2 +- lib/librte_malloc/malloc_heap.h |2 +- lib/librte_malloc/rte_malloc.c |4 ++-- lib/li

[dpdk-dev] NIC Stops Transmitting

2013-07-26 Thread Scott Talbert
On Fri, 26 Jul 2013, Stephen Hemminger wrote: >> I'm writing an application using DPDK that transmits a large number of >> packets (it doesn't receive any). When I transmit at 2 Gb/sec, everything >> will run fine for several seconds (receiver is receiving at correct rate), >> but then the NIC ap

[dpdk-dev] NIC Stops Transmitting

2013-07-26 Thread Scott Talbert
Hi, I'm writing an application using DPDK that transmits a large number of packets (it doesn't receive any). When I transmit at 2 Gb/sec, everything will run fine for several seconds (receiver is receiving at correct rate), but then the NIC appears to get 'stuck' and doesn't transmit any more

[dpdk-dev] [PATCH 0/3] real "make install" rule

2013-07-26 Thread Thomas Monjalon
26/07/2013 15:13, Thomas Monjalon : > The current "make install" rule don't install anything. > It builds one or more targets with different configurations. > > These patches allow to install only files needed to build and run a DPDK > appplication. The old behaviour is kept for compatibility and

[dpdk-dev] [PATCH] eal: fix recording of detected/enabled logical cores

2013-07-26 Thread Thomas Monjalon
26/07/2013 13:55, Thomas Monjalon : > From: Ivan Boule > > 1) In the EAL initialization phase, invoke the function rte_eal_cpu_init >to detect the set of running cores (and enable them by default) before >processing the [enabled] core mask option that is performed during the >parsing

[dpdk-dev] [PATCH] eal: fix type of pointer arithmetic result

2013-07-26 Thread Thomas Monjalon
26/07/2013 14:12, Adrien Mazarguil : > On Fri, Jul 26, 2013 at 01:34:00PM +0200, Thomas Monjalon wrote: > > Adding or subtracting a value to a pointer makes a new pointer > > of unknown type. > > So typeof() is replaced by (void*) in RTE_PTR_ADD() and RTE_PTR_SUB(). > > > > But RTE_PTR_ALIGN_* mac

[dpdk-dev] [PATCH] kni: fix build with kernel < 3.3 with netdev_features_t backport

2013-07-26 Thread Thomas Monjalon
26/07/2013 13:25, Adrien Mazarguil : > The netdev_features_t typedef appeared in Linux 3.3, but checking the > kernel version isn't enough with some distributions (such as Debian > Wheezy) that backported it into 3.2, causing a compilation failure due to > redefinition. > > Since the presence of a

[dpdk-dev] [PATCH] kni: fix build with 802.1p kernel support

2013-07-26 Thread Thomas Monjalon
26/07/2013 14:12, Adrien Mazarguil : > On Fri, Jul 26, 2013 at 11:51:15AM +0200, Thomas Monjalon wrote: > > C90 compilers forbid mixed declaration and code. > > > > Signed-off-by: Thomas Monjalon > > --- > > > > lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_main.c |7 +-- > > 1 file c

[dpdk-dev] [PATCH] config: disable KNI for 32-bit because cannot work

2013-07-26 Thread Thomas Monjalon
26/07/2013 14:11, Adrien Mazarguil : > On Fri, Jul 26, 2013 at 11:49:59AM +0200, Thomas Monjalon wrote: > > From: Jean-Mickael Guerin > > > > This is not supported, disable to avoid compilation error like: > > lib/librte_eal/linuxapp/kni/kni_misc.c:304:2: error: > > format '%llx'

[dpdk-dev] [PATCH 3/3] mk: allow to specify DESTDIR in build rule

2013-07-26 Thread Thomas Monjalon
From: Olivier Matz This will install the binary sdk (bin + modules + libs + headers + mk) in the specified directory. This directory can be used as RTE_SDK by external applications. Signed-off-by: Olivier Matz Acked-by: Thomas Monjalon --- doc/build-sdk-quick.txt | 13 +++-- mk/rte.

[dpdk-dev] [PATCH 2/3] mk: in install rule, don't overwrite .config if it already exists

2013-07-26 Thread Thomas Monjalon
From: Olivier Matz This allows the user to prepare a configuration with make config before using make install. Signed-off-by: Olivier Matz Acked-by: Thomas Monjalon --- mk/rte.sdkinstall.mk |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mk/rte.sdkinstall.mk b/mk/rte

[dpdk-dev] [PATCH 1/3] mk: allow to specify O= in install rule

2013-07-26 Thread Thomas Monjalon
From: Olivier Matz This variable $(O) can be used to specify a build directory when doing an "install" procedure. The default is ".", which means that targets will be built in the source dpdk. This option is useful to compile outside of the source tree that may be read-only. Signed-off-by: Oliv

[dpdk-dev] [PATCH 0/3] real "make install" rule

2013-07-26 Thread Thomas Monjalon
The current "make install" rule don't install anything. It builds one or more targets with different configurations. These patches allow to install only files needed to build and run a DPDK appplication. The old behaviour is kept for compatibility and the new behaviour is a second stage triggered

[dpdk-dev] [PATCH] eal: fix recording of detected/enabled logical cores

2013-07-26 Thread Adrien Mazarguil
On Fri, Jul 26, 2013 at 01:55:49PM +0200, Thomas Monjalon wrote: > From: Ivan Boule > > 1) In the EAL initialization phase, invoke the function rte_eal_cpu_init >to detect the set of running cores (and enable them by default) before >processing the [enabled] core mask option that is perfo

[dpdk-dev] [PATCH] eal: fix type of pointer arithmetic result

2013-07-26 Thread Adrien Mazarguil
On Fri, Jul 26, 2013 at 01:34:00PM +0200, Thomas Monjalon wrote: > Adding or subtracting a value to a pointer makes a new pointer > of unknown type. > So typeof() is replaced by (void*) in RTE_PTR_ADD() and RTE_PTR_SUB(). > > But RTE_PTR_ALIGN_* macros have in their explicit API to return a pointe

[dpdk-dev] [PATCH] kni: fix build with 802.1p kernel support

2013-07-26 Thread Adrien Mazarguil
On Fri, Jul 26, 2013 at 11:51:15AM +0200, Thomas Monjalon wrote: > C90 compilers forbid mixed declaration and code. > > Signed-off-by: Thomas Monjalon > --- > lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_main.c |7 +-- > 1 file changed, 5 insertions(+), 2 deletions(-) Acked-by: Adrie

[dpdk-dev] [PATCH] config: disable KNI for 32-bit because cannot work

2013-07-26 Thread Adrien Mazarguil
On Fri, Jul 26, 2013 at 11:49:59AM +0200, Thomas Monjalon wrote: > From: Jean-Mickael Guerin > > This is not supported, disable to avoid compilation error like: > lib/librte_eal/linuxapp/kni/kni_misc.c:304:2: error: > format '%llx' expects argument of type 'long long unsigned

[dpdk-dev] [PATCH] eal: fix recording of detected/enabled logical cores

2013-07-26 Thread Thomas Monjalon
From: Ivan Boule 1) In the EAL initialization phase, invoke the function rte_eal_cpu_init to detect the set of running cores (and enable them by default) before processing the [enabled] core mask option that is performed during the parsing of EAL arguments. 2) In the function rte_eal_cp

[dpdk-dev] [PATCH] eal: fix type of pointer arithmetic result

2013-07-26 Thread Thomas Monjalon
Adding or subtracting a value to a pointer makes a new pointer of unknown type. So typeof() is replaced by (void*) in RTE_PTR_ADD() and RTE_PTR_SUB(). But RTE_PTR_ALIGN_* macros have in their explicit API to return a pointer of the same type. Since RTE_PTR_ALIGN_CEIL is based on RTE_PTR_ADD, a typ

[dpdk-dev] [PATCH] kni: fix build with kernel < 3.3 with netdev_features_t backport

2013-07-26 Thread Adrien Mazarguil
The netdev_features_t typedef appeared in Linux 3.3, but checking the kernel version isn't enough with some distributions (such as Debian Wheezy) that backported it into 3.2, causing a compilation failure due to redefinition. Since the presence of a typedef can't be tested at compile time, this co

[dpdk-dev] NIC Stops Transmitting

2013-07-26 Thread Stephen Hemminger
On Fri, 26 Jul 2013 15:39:18 -0400 (EDT) Scott Talbert wrote: > Hi, > > I'm writing an application using DPDK that transmits a large number of > packets (it doesn't receive any). When I transmit at 2 Gb/sec, everything > will run fine for several seconds (receiver is receiving at correct rate

[dpdk-dev] [PATCH] kni: fix build with 802.1p kernel support

2013-07-26 Thread Thomas Monjalon
C90 compilers forbid mixed declaration and code. Signed-off-by: Thomas Monjalon --- lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_main.c |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_main.c b/lib/librte_eal/linuxa

[dpdk-dev] [PATCH] config: disable KNI for 32-bit because cannot work

2013-07-26 Thread Thomas Monjalon
From: Jean-Mickael Guerin This is not supported, disable to avoid compilation error like: lib/librte_eal/linuxapp/kni/kni_misc.c:304:2: error: format '%llx' expects argument of type 'long long unsigned int', but argument 2 has type 'phys_addr_t' [-Werror=fo

[dpdk-dev] [dpdk-announce] [vNICs] virtio-net-pmd-1.1 and vmxnet3-usermap-1.1 released

2013-07-26 Thread Thomas Monjalon
The new releases can be downloaded here: http://dpdk.org/browse/virtio-net-pmd/tag/?id=v1.1 http://dpdk.org/browse/vmxnet3-usermap/tag/?id=v1.1 These new versions are compatible with DPDK 1.3.1r1. -- Thomas

[dpdk-dev] [virtio PATCH] pmd: support dpdk-1.3

2013-07-26 Thread Thomas Monjalon
26/07/2013 11:05, Adrien Mazarguil : > On Thu, Jul 25, 2013 at 10:40:56PM +0200, Thomas Monjalon wrote: > > From: Damien Millescamps > > > > API changes in DPDK 1.3: > > - queue arrays are already allocated by rte_ethdev > > - queue release must be handled by the PMD > > - queue struct becomes an

[dpdk-dev] [vmxnet3 PATCH] pmd: support dpdk-1.3

2013-07-26 Thread Thomas Monjalon
26/07/2013 11:02, Damien Millescamps : > On 07/25/2013 10:39 PM, Thomas Monjalon wrote: > > API changes in DPDK 1.3: > > - queue arrays are already allocated by rte_ethdev > > - queue could be released for reconfiguration (not supported) > > - queue struct becomes an opaque pointer > > - vlan_filte

[dpdk-dev] [vmxnet3 PATCH] pmd: show banner before initializing

2013-07-26 Thread Thomas Monjalon
26/07/2013 11:01, Damien Millescamps : > On 07/25/2013 10:39 PM, Thomas Monjalon wrote: > > Print title before running driver initialization. > > ack pushed -- Thomas

[dpdk-dev] [vmxnet3 PATCH] doc: describe kernel dependency and --vmware-tsc-map

2013-07-26 Thread Thomas Monjalon
26/07/2013 11:01, Damien Millescamps : > On 07/25/2013 10:38 PM, Thomas Monjalon wrote: > > Be more verbose on kernel dependency about version and parameters. > > And add description of DPDK parameter for VMware. > > ack pushed -- Thomas

[dpdk-dev] [virtio PATCH] pmd: support dpdk-1.3

2013-07-26 Thread Adrien Mazarguil
On Thu, Jul 25, 2013 at 10:40:56PM +0200, Thomas Monjalon wrote: > From: Damien Millescamps > > API changes in DPDK 1.3: > - queue arrays are already allocated by rte_ethdev > - queue release must be handled by the PMD > - queue struct becomes an opaque pointer > - vlan_filter_set can return an e

[dpdk-dev] [vmxnet3 PATCH] pmd: support dpdk-1.3

2013-07-26 Thread Damien Millescamps
On 07/25/2013 10:39 PM, Thomas Monjalon wrote: > API changes in DPDK 1.3: > - queue arrays are already allocated by rte_ethdev > - queue could be released for reconfiguration (not supported) > - queue struct becomes an opaque pointer > - vlan_filter_set can return an error > - bit-fields vlan_macip

[dpdk-dev] [vmxnet3 PATCH] pmd: show banner before initializing

2013-07-26 Thread Damien Millescamps
On 07/25/2013 10:39 PM, Thomas Monjalon wrote: > Print title before running driver initialization. > > Signed-off-by: Thomas Monjalon ack

[dpdk-dev] [vmxnet3 PATCH] doc: describe kernel dependency and --vmware-tsc-map

2013-07-26 Thread Damien Millescamps
On 07/25/2013 10:38 PM, Thomas Monjalon wrote: > Be more verbose on kernel dependency about version and parameters. > And add description of DPDK parameter for VMware. > > Signed-off-by: Thomas Monjalon > --- > README.rst | 17 - > 1 file changed, 12 insertions(+), 5 deletions(-

[dpdk-dev] Question regarding rte_eth_tx_burst()

2013-07-26 Thread Jesus Velazquez
Hi all, Any ideas would be helpful, I have an application that uses a rte_ring for queuing packets to be sent (a single consumer - multiple producer). The problem I am facing is with rte_eth_tx_burst(), once I dequeue N packets from tx ring, there is no guaranty that all packets will be sent,