[dpdk-dev] [PATCH 07/10] bsd/nic_uio: fix module compilation with freebsd 10

2014-04-25 Thread Olivier Matz
^ In file included from nic_uio.c:52: @/vm/vm_pager.h:190:2: error: use of undeclared identifier 'RA_WLOCKED' VM_OBJECT_ASSERT_WLOCKED(m->object); ^ @/vm/vm_object.h:226:29: note: expanded from macro 'VM_OBJECT_ASSERT_WLOCKED' rw_assert(&(object)->lock, RA_WLOCKED

[dpdk-dev] [PATCH 08/10] bsd/mk: use the Q variable instead of @ for quiet commands

2014-04-25 Thread Olivier Matz
This allows to use V=1 to be more verbose to debug the build process of a bsd kernel module. Signed-off-by: Olivier Matz --- mk/rte.bsdmodule.mk | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/mk/rte.bsdmodule.mk b/mk/rte.bsdmodule.mk index

[dpdk-dev] [PATCH 09/10] bsd/mem: get hugepages config

2014-04-25 Thread Olivier Matz
The bsdapp part was missing in c5e9eeca5a67a8272f0fdedcd0afc9b2d22be376. This commit allows external libraries and applications to know if hugepages are enabled. Signed-off-by: Olivier Matz --- lib/librte_eal/bsdapp/eal/eal.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/lib

[dpdk-dev] [PATCH 10/10] bsd/mem: get physical address of any pointer

2014-04-25 Thread Olivier Matz
ory. As a result, it seems acceptable for now to implement a dummy function to fix the compilation as the usual case (using contigmem module) works properly. Signed-off-by: Olivier Matz --- lib/librte_eal/bsdapp/eal/eal_memory.c | 12 1 file changed, 12 insertions(+) diff --git a/lib/

[dpdk-dev] [PATCH 0/5] examples: add a new makefile to build all examples

2014-04-25 Thread Olivier Matz
at droids:~/dpdk.org/examples$ make RTE_SDK=${PWD}/.. \ RTE_TARGET=x86_64-default-linuxapp-gcc Olivier Matz (5): mk: introduce rte.extsubdir.mk examples: use rte.extsubdir.mk to process subdirectories examples: add a makefile to build all examples examples: fix qos_sched makefile

[dpdk-dev] [PATCH 1/5] mk: introduce rte.extsubdir.mk

2014-04-25 Thread Olivier Matz
This makefile can be included by a project that needs to build several applications or libraries that are located in different directories. Signed-off-by: Olivier Matz --- mk/rte.extsubdir.mk | 49 + 1 file changed, 49 insertions(+) create mode

[dpdk-dev] [PATCH 2/5] examples: use rte.extsubdir.mk to process subdirectories

2014-04-25 Thread Olivier Matz
Signed-off-by: Olivier Matz --- examples/l2fwd-ivshmem/Makefile | 9 + examples/multi_process/Makefile | 16 +++- examples/multi_process/client_server_mp/Makefile | 15 ++- examples/quota_watermark/Makefile| 12

[dpdk-dev] [PATCH 3/5] examples: add a makefile to build all examples

2014-04-25 Thread Olivier Matz
It is now possible to build all examples by doing the following: user at droids:~/dpdk.org$ cd examples user at droids:~/dpdk.org/examples$ make RTE_SDK=${PWD}/.. \ RTE_TARGET=x86_64-default-linuxapp-gcc Signed-off-by: Olivier Matz --- examples/Makefile | 68

[dpdk-dev] [PATCH 4/5] examples: fix qos_sched makefile

2014-04-25 Thread Olivier Matz
The example does not compile as the linker complains about duplicated symbols. Remove -lsched from LDLIBS, it is already present in rte.app.mk and added by the DPDK framework automatically. Signed-off-by: Olivier Matz --- examples/qos_sched/Makefile | 2 -- 1 file changed, 2 deletions(-) diff

[dpdk-dev] [PATCH 5/5] examples: fix netmap_compat example

2014-04-25 Thread Olivier Matz
It is not allowed to reference a an absolute file name in SRCS-y. A VPATH has to be used, else the dependencies won't be checked properly. Signed-off-by: Olivier Matz --- examples/netmap_compat/bridge/Makefile | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/exa

[dpdk-dev] [PATCH 0/5] examples: add a new makefile to build all examples

2014-04-25 Thread Olivier MATZ
Hi Neil, First, thank you for your reviews. On Friday, April 25, 2014 10:05:26 AM Neil Horman wrote: > > After applying the patches, it is possible to build all examples by doing > > the following: > > user at droids:~/dpdk.org$ cd examples > > user at droids:~/dpdk.org/examples$ make RTE_SDK

[dpdk-dev] [RFC PATCH 01/14] mbuf: rename RTE_MBUF_SCATTER_GATHER into RTE_MBUF_REFCNT

2014-08-12 Thread Olivier MATZ
Hi Bruce, On 08/11/2014 11:45 PM, Stephen Hemminger wrote: > On Mon, 11 Aug 2014 21:44:37 +0100 > Bruce Richardson wrote: > >> From: Olivier Matz >> >> It seems that RTE_MBUF_SCATTER_GATHER is not the proper name for the >> feature it provides. "Scatter g

[dpdk-dev] [RFC PATCH 02/14] mbuf: remove rte_ctrlmbuf

2014-08-12 Thread Olivier MATZ
Hi Bruce, On 08/11/2014 10:44 PM, Bruce Richardson wrote: > From: Olivier Matz > > The initial role of rte_ctrlmbuf is to carry generic messages (data > pointer + data length) but it's not used by the DPDK or it applications. > Keeping it implies: >- loosing 1 byte in

[dpdk-dev] [RFC PATCH 03/14] mbuf: remove the rte_pktmbuf structure

2014-08-12 Thread Olivier MATZ
Hi Bruce, On 08/11/2014 10:44 PM, Bruce Richardson wrote: > From: Olivier Matz > > The rte_pktmbuf structure was initially included in the rte_mbuf > structure. This was needed when there was 2 types of mbuf (ctrl and > packet). As the control mbuf has been removed, w

[dpdk-dev] [RFC PATCH 04/14] mbuf: replace data pointer by an offset

2014-08-12 Thread Olivier MATZ
Hi Bruce, On 08/11/2014 10:44 PM, Bruce Richardson wrote: > From: Olivier Matz > > Original patch: > The mbuf structure already contains a pointer to the beginning of the > buffer (m->buf_addr). It is not needed to use 8 bytes again to store > another pointer to the

[dpdk-dev] [RFC PATCH 05/14] mbuf: rename in_port to just port

2014-08-12 Thread Olivier MATZ
it. > > Signed-off-by: Bruce Richardson Acked-by: Olivier Matz

[dpdk-dev] [RFC PATCH 06/14] mbuf: reorder fields by time-of-use

2014-08-12 Thread Olivier MATZ
Hi Bruce, On 08/11/2014 10:44 PM, Bruce Richardson wrote: > * Reorder the fields in the mbuf so that we have fields that are used > together side-by-side in the structure. This means that we have a > contiguous block of 8-bytes in the mbuf which are used to reset an mbuf > of descriptor rearm. >

[dpdk-dev] [RFC PATCH 09/14] Fix performance regression due to moved pool ptr

2014-08-12 Thread Olivier MATZ
Hi Bruce, On 08/11/2014 10:44 PM, Bruce Richardson wrote: > Adjust the fast-path code to fix the regression caused by the pool > pointer moving to the second cache line. This change adjusts the > prefetching and also the way in which the mbufs are freed back to the > mempool. > > Signed-off-by: Br

[dpdk-dev] [RFC PATCH 13/14] mbuf: cleanup + added in additional mbuf fields.

2014-08-12 Thread Olivier MATZ
Hi Bruce, On 08/11/2014 10:44 PM, Bruce Richardson wrote: > Cleanups: > * use typedefs for markers within mbuf struct > * split up vlan_macip field as the l2/l3 lengths are for TX so go on the >second cache line. > * created a tx_ol field in second cache line for data used for tx >offloads

[dpdk-dev] [RFC PATCH 00/14] Extend the mbuf structure

2014-08-12 Thread Olivier MATZ
Hi Bruce, On 08/11/2014 10:44 PM, Bruce Richardson wrote: > This patch set expands and enhances the mbuf data structure. This set > includes patches previously > submitted by Olivier to rework the mbuf, but takes the rework further than > proposed there. > > NOTE: This is still a work in progres

[dpdk-dev] [PATCH] ixgbe: fix clang compile - remove truncation errors

2014-12-01 Thread Olivier MATZ
Hi Bruce, Hi Neil, On 11/30/2014 02:05 AM, Neil Horman wrote: > On Fri, Nov 28, 2014 at 03:31:00PM +, Bruce Richardson wrote: >> When compiling with clang, errors were being emitted due to truncation >> of values when assigning to the tx_offload_mask bit fields. >> >> dpdk.org/lib/librte_pmd_i

[dpdk-dev] [PATCH 1/3] mbuf:add two TX offload flags and change three fields

2014-12-01 Thread Olivier MATZ
Hi Jijiang, On 12/01/2014 03:30 AM, Liu, Jijiang wrote: >> After another thought, I think that the way you proposed is a better one. >> I gives us more flexibility: >> let's say for now we'll keep both l2_len and outer_l2_len as 7 bit fields, >> and upper >> layer would have to: >> mb->l2_len =

[dpdk-dev] RTE mempool "used count" steadily goes down to zero despite steady packet throughput

2014-12-01 Thread Olivier MATZ
Hi Kam, On 11/28/2014 06:34 PM, Kamraan Nasim wrote: > I have ~15Gbps of traffic flowing through two 10GE ports and been profiling > the rte mempool(or rather the pktmbuf mempool) memory consumption: > > I have per lcore caching disabled(cache_size is 0) > > I have noticed that: > - Mempool FREE

[dpdk-dev] [PATCH] i40e: Use one bit flag for all hardware detected RX packet errors

2014-12-01 Thread Olivier MATZ
Hi Helin, On 12/01/2014 02:57 AM, Zhang, Helin wrote: >>> #define PKT_RX_EIP_CKSUM_BAD (0ULL << 0) /**< External IP header >>> checksum error. */ [Helin] Nobody complains it, so we will keep it there, >>> and >> just assign a new value to it. >> >> ok. >> >> But it would be nice to have a better

[dpdk-dev] [PATCH] ixgbe: fix clang compile - remove truncation errors

2014-12-01 Thread Olivier MATZ
Hi Bruce, On 12/01/2014 10:48 AM, Bruce Richardson wrote: >> I found that the following code works: >> >> tx_offload_mask.l2_len |= ~0; >> >> (note the '|=' instead of '=') >> >> I would avoid to create a macro. What do you think? >> >> Regards, >> Olivier > > Nice one - cleanest solution th

[dpdk-dev] [PATCH] ixgbe: change assignation of bitfields to fix clang compilation

2014-12-01 Thread Olivier Matz
-Wbitfield-constant-conversion] Replacing the '=' with a '|=' fixes the issue. Signed-off-by: Olivier Matz --- lib/librte_pmd_ixgbe/ixgbe_rxtx.c | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/lib/librte_pmd_ixgbe/ixgbe_

[dpdk-dev] [RFC] Clang errors with bit fields and setting value of ~0.

2014-12-01 Thread Olivier MATZ
Hi Keith, On 11/29/2014 05:33 PM, Keith Wiles wrote: > error: implicit truncation from 'int' to bitfield > changes value from -1 to 127 [-Werror,-Wbitfield-constant-conversion] > tx_offload_mask.l2_len = ~0; > Converted to use correct bit values >

[dpdk-dev] [PATCH 1/3] mbuf:add two TX offload flags and change three fields

2014-12-01 Thread Olivier MATZ
Hi Konstantin, On 12/01/2014 12:58 PM, Ananyev, Konstantin wrote: >> Ether/IP/UDP/vxlan/Ether/IP/UDP/xxx >> m->outer_l2_len = sizeof(ether) >> m->outer_l3_len = sizeof(ip) >> m->l2_len = sizeof(udp) + sizeof(vxlan) + sizeof(ether) > > I think it should be: > m->l2_len = sizeof(vxlan) + size

[dpdk-dev] [PATCH] ixgbe: fix clang compile - remove truncation errors

2014-12-01 Thread Olivier MATZ
Hi Neil, On 12/01/2014 06:16 PM, Neil Horman wrote: >>> [...] >>> >>> Whats the advantage to keeping this warning? >>> >> The advantage is that it does exactly what it's meant to do. If someone goes >> to >> assign l2_len = 128; somewhere, it will throw a warning. If someone goes to >> change >>

[dpdk-dev] [PATCH v4 3/3] mbuf:replace the inner_l2_len and the inner_l3_len fields

2014-12-03 Thread Olivier MATZ
Hi Didier, Konstantin, Jijiang, On 12/02/2014 04:36 PM, Ananyev, Konstantin wrote: > Hi Didier > >> -Original Message- >> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of didier.pallard >> Sent: Tuesday, December 02, 2014 2:53 PM >> To: Liu, Jijiang; dev at dpdk.org >> Subject: Re:

[dpdk-dev] [PATCH v4 3/3] mbuf:replace the inner_l2_len and the inner_l3_len fields

2014-12-03 Thread Olivier MATZ
Hi Konstantin, On 12/03/2014 12:11 PM, Ananyev, Konstantin wrote: Let's discuss the two possibilities. 1) outer_lx_len fields are introduced. In this case, the stack should have knowledge that it is processing tunneled packets to use outer_lx_len rather than lx_len, o

[dpdk-dev] [PATCH v5 1/3] mbuf:redefine three TX ol_flags

2014-12-03 Thread Olivier MATZ
Pv6 packet.*/ > +#define PKT_TX_IPV6 (1ULL << 56) > > -#define PKT_TX_VLAN_PKT (1ULL << 55) /**< TX packet is a 802.1q VLAN > packet. */ > +#define PKT_TX_VLAN_PKT (1ULL << 57) /**< TX packet is a 802.1q VLAN > packet. */ > > /* Use final bit of flags to indicate a control mbuf */ > #define CTRL_MBUF_FLAG (1ULL << 63) /**< Mbuf contains control data */ > Acked-by: Olivier Matz

[dpdk-dev] [PATCH v5 2/3] mbuf:add three TX ol_flags and repalce PKT_TX_VXLAN_CKSUM

2014-12-03 Thread Olivier MATZ
Hi Jijiang, On 12/02/2014 04:06 PM, Jijiang Liu wrote: > Replace PKT_TX_VXLAN_CKSUM with PKT_TX_UDP_TUNNEL_PKT in order to indicate a > packet is an UDP tunneling packet, and introduce 3 TX offload flags for outer > IP TX checksum, which are PKT_TX_OUTER_IP_CKSUM, PKT_TX_OUTER_IPV4 and > PKT_TX

[dpdk-dev] [PATCH v5 3/3] mbuf:replace the inner_l2_len and the inner_l3_len fields

2014-12-03 Thread Olivier MATZ
Hi Jijiang, On 12/02/2014 04:06 PM, Jijiang Liu wrote: > Replace the inner_l2_len and the inner_l3_len field with the outer_l2_len and > outer_l3_len field, and rework csum forward engine and i40e PMD due to these > changes. > > Signed-off-by: Jijiang Liu > --- > app/test-pmd/csumonly.c

[dpdk-dev] [PATCH v5 2/3] mbuf:add three TX ol_flags and repalce PKT_TX_VXLAN_CKSUM

2014-12-03 Thread Olivier MATZ
Hi Konstantin, On 12/03/2014 01:59 PM, Ananyev, Konstantin wrote: >> I still think having a flag IPV4 + another flag IP_CHECKSUM is not >> appropriate. > > Sorry, didn't get you here. > Are you talking about our discussion should PKT_TX_IP_CKSUM and PKT_TX_IPV4 > be mutually exclusive or not? Ye

[dpdk-dev] [PATCH] test-pmd: Fix pointer aliasing error

2014-12-03 Thread Olivier MATZ
Hi Bruce, On 12/03/2014 12:42 PM, Bruce Richardson wrote: > On Wed, Dec 03, 2014 at 07:28:19PM +0800, Michael Qiu wrote: >> app/test-pmd/csumonly.c: In function ?get_psd_sum?: >> build/include/rte_ip.h:161: error: dereferencing pointer ?u16? >> does break strict-aliasing rules >> build/includ

[dpdk-dev] [PATCH] librte_cmdline: FreeBSD Fix oveflow when size of command result structure is greater than BUFSIZ

2014-12-03 Thread Olivier MATZ
Hi, On 10/27/2014 10:14 AM, Olivier MATZ wrote: > Hello Alan, > > On 10/20/2014 05:26 PM, Carew, Alan wrote: >> A comment on my own patch. >> >> Making the size of result_buf consistent across each OS and keeping it as >> large >> as the Linux BUFSIZ(8192

[dpdk-dev] [PATCH v5 2/3] mbuf:add three TX ol_flags and repalce PKT_TX_VXLAN_CKSUM

2014-12-04 Thread Olivier MATZ
Hi, On 12/04/2014 11:19 AM, Ananyev, Konstantin wrote: >>> 1/ (Jijiang's patch) >>> PKT_TX_IP_CKSUM /* packet is IPv4, and we want hw cksum */ >>> PKT_TX_IPV6 /* packet is IPv6 */ >>> PKT_TX_IPV4 /* packet is IPv4, and we don't want hw cksum */ >>> >>> with PKT_TX_IP_CKSUM and PKT_TX_IP

[dpdk-dev] [PATCH v5 2/3] mbuf:add three TX ol_flags and repalce PKT_TX_VXLAN_CKSUM

2014-12-04 Thread Olivier MATZ
Hi, On 12/04/2014 12:03 PM, Ananyev, Konstantin wrote: > 1/ (Jijiang's patch) > PKT_TX_IP_CKSUM /* packet is IPv4, and we want hw cksum */ > PKT_TX_IPV6 /* packet is IPv6 */ > PKT_TX_IPV4 /* packet is IPv4, and we don't want hw cksum */ > > with PKT_TX_IP_CKSUM a

[dpdk-dev] [PATCH] librte_cmdline: FreeBSD Fix oveflow when size of command result structure is greater than BUFSIZ

2014-12-04 Thread Olivier MATZ
Hi Alan, On 12/04/2014 03:01 PM, Carew, Alan wrote: >>> Sorry, I had no time to deeply check this. I think your patch can go >>> in 1.8 as it's still an enhancement compared to the current situation. >>> We may go back on this later. >>> >>>

[dpdk-dev] [PATCH v5 2/3] mbuf:add three TX ol_flags and repalce PKT_TX_VXLAN_CKSUM

2014-12-05 Thread Olivier MATZ
+- > lib/librte_pmd_i40e/i40e_rxtx.c |6 +++--- > 4 files changed, 26 insertions(+), 7 deletions(-) > As we need to conclude on this: Acked-by: Olivier Matz Just few minor comments below: > diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h > index

[dpdk-dev] [PATCH v5 3/3] mbuf:replace the inner_l2_len and the inner_l3_len fields

2014-12-05 Thread Olivier MATZ
p/test-pmd/csumonly.c | 58 > +-- > lib/librte_mbuf/rte_mbuf.h |4 +- > lib/librte_pmd_i40e/i40e_rxtx.c | 38 + > 3 files changed, 53 insertions(+), 47 deletions(-) > Acked-by: Olivier Matz One mino

[dpdk-dev] [PATCH v2] librte_cmdline: FreeBSD Fix oveflow when size of command result structure is greater than BUFSIZ

2014-12-05 Thread Olivier MATZ
ure this buffer size cannot overflow, with > an error message being produced. > > Suggested-by: Olivier MATZ > http://git.droids-corp.org/?p=libcmdline.git;a=commitdiff;h=b1d5b169352e57df3fc14c51ffad4b83f3e5613f > > Signed-off-by: Alan Carew I think some checks are missing compared to th

[dpdk-dev] [PATCH v3] librte_cmdline: FreeBSD Fix oveflow when size of command result structure is greater than BUFSIZ

2014-12-05 Thread Olivier Matz
This patch removes the OS dependency on BUFSIZ and defines and uses a library #define CMDLINE_PARSE_RESULT_BUFSIZE 8192 Added boundary checking to ensure this buffer size cannot overflow, with an error message being produced. Suggested-by: Olivier MATZ http://git.droids-corp.org/?p=libcmdline.git;a=co

[dpdk-dev] lib: include rte_memory.h for __rte_cache_aligned

2014-12-09 Thread Olivier MATZ
Hi Neil, On 12/08/2014 04:04 PM, Neil Horman wrote: > On Fri, Nov 07, 2014 at 09:28:09AM -0800, Jia Yu wrote: >> Include rte_memory.h for lib files that use __rte_cache_aligned >> attribute. >> >> Signed-off-by: Jia Yu >> > Why? I presume there was a build break or something. Please repost with

[dpdk-dev] [PATCH v3 0/3] enhance TX checksum command and csum forwarding engine

2014-12-11 Thread Olivier MATZ
Hi Jijiang, Sorry for the late review, I was very busy these last days. Please find my comments below. On 12/10/2014 02:03 AM, Jijiang Liu wrote: > In the current codes, the "tx_checksum set (ip|udp|tcp|sctp|vxlan) (hw|sw) > (port-id)" command is not easy to understand and extend, so the patch s

[dpdk-dev] [PATCH v3 1/3] librte_ether:add outer IP offload capability flag

2014-12-11 Thread Olivier MATZ
010 > #define DEV_TX_OFFLOAD_TCP_TSO 0x0020 > #define DEV_TX_OFFLOAD_UDP_TSO 0x0040 > +#define DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM 0x0080 /**< Used for tunneling > packet. */ > > struct rte_eth_dev_info { > struct rte_pci_device *pci_dev;

[dpdk-dev] [PATCH v3 2/3] i40e:support outer IPv4 checksum capability

2014-12-11 Thread Olivier MATZ
OAD_SCTP_CKSUM; > + DEV_TX_OFFLOAD_SCTP_CKSUM | > + DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM; > dev_info->reta_size = pf->hash_lut_size; > > dev_info->default_rxconf = (struct rte_eth_rxconf) { > Acked-by: Olivier Matz

[dpdk-dev] [PATCH v3 3/3] app/testpmd:change tx_checksum command and csum forwarding engine

2014-12-11 Thread Olivier MATZ
Hi Jijiang, Some more comments, in addition to the one I've made in the cover letter. Reference link for patchwork readers: http://dpdk.org/ml/archives/dev/2014-December/009886.html On 12/10/2014 02:03 AM, Jijiang Liu wrote: > --- a/app/test-pmd/cmdline.c > +++ b/app/test-pmd/cmdline.c > @@ -316,

[dpdk-dev] [PATCH v4] mbuf: fix of enabling all newly added RX error flags

2014-12-11 Thread Olivier MATZ
Hi Helin, On 12/10/2014 11:29 PM, Zhang, Helin wrote: > --- a/lib/librte_mbuf/rte_mbuf.h > +++ b/lib/librte_mbuf/rte_mbuf.h > @@ -83,12 +83,7 @@ extern "C" { > #define PKT_RX_RSS_HASH (1ULL << 1) /**< RX packet with >> RSS hash result. */ > #define PKT_RX_FDIR

[dpdk-dev] [PATCH] librte_net: fix TX checksum offload problem with IPv6 packet.

2014-12-11 Thread Olivier MATZ
speedup things a bit, refactored rte_raw_cksum() > by splitting ipv6 pseudo-header csum calculation into 3 phases: > 1. calc sum for src & dst addresses > 2. add sum for proto & len. > 3. finalise sum > That makes gcc to generate valid code and helps to avoid any copying. &g

[dpdk-dev] [PATCH v3 0/3] enhance TX checksum command and csum forwarding engine

2014-12-12 Thread Olivier MATZ
Hello, On 12/12/2014 04:48 AM, Liu, Jijiang wrote: > The 'hw/sw' option is used to set/clear the flag of enabling TX tunneling > packet checksum hardware offload in testpmd application. This is not clear at all. In your command, there is (hw|sw|none). Are you talking about inner or outer? Is th

[dpdk-dev] [PATCH] ring: Fix return type in enqueue and dequeue burst functions

2014-12-16 Thread Olivier MATZ
Hi Pablo, On 12/15/2014 02:41 PM, Pablo de Lara wrote: > Enqueue and dequeue burst functions always return a positive > value (including 0), so return type should be unsigned, > instead of int. > > Fixed also API doc for one of the functions. > > Signed-off-by: Pablo de Lar

[dpdk-dev] [PATCH 0/5] fix compilation issues seen with clang-3.5

2014-12-17 Thread Olivier Matz
This series are compilation fixes seen with clang-3.5 on linux. Olivier Matz (5): test-devargs: fix misplaced braces in strncmp call examples/l3fwd: fix compilation with clang 3.5 examples/netmap: fix overflow in ioctl operation examples/vm_power_manager: move -lvirt in LDLIBS examples

[dpdk-dev] [PATCH 1/5] test-devargs: fix misplaced braces in strncmp call

2014-12-17 Thread Olivier Matz
in the "if" part. Seen with clang-3.5: "error: size argument in 'strncmp' call is a comparison" This patch is similar to 261386248 but it looks that one occurence was forgotten. Signed-off-by: Olivier Matz --- app/test/test_devargs.c | 2 +- 1 file changed, 1 ins

[dpdk-dev] [PATCH 2/5] examples/l3fwd: fix compilation with clang 3.5

2014-12-17 Thread Olivier Matz
)) on this function, so that the compiler does not complain. Signed-off-by: Olivier Matz --- examples/l3fwd/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c index bf0fcdb..918f2cb 100644 --- a/examples/l3fwd/main.c +++ b/exam

[dpdk-dev] [PATCH 3/5] examples/netmap: fix overflow in ioctl operation

2014-12-17 Thread Olivier Matz
value should be an unsigned 32 bits, not an int. Signed-off-by: Olivier Matz --- examples/netmap_compat/lib/compat_netmap.c | 2 +- examples/netmap_compat/lib/compat_netmap.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/netmap_compat/lib/compat_netmap.c b

[dpdk-dev] [PATCH 4/5] examples/vm_power_manager: move -lvirt in LDLIBS

2014-12-17 Thread Olivier Matz
The argument -lvirt is a linker parameter, not a CFLAG. Signed-off-by: Olivier Matz --- examples/vm_power_manager/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/vm_power_manager/Makefile b/examples/vm_power_manager/Makefile index b0a1037..113dbc4

[dpdk-dev] [PATCH 5/5] examples/vm_power_manager: fix initialization of cmdline token

2014-12-17 Thread Olivier Matz
Fix a typo: cmdline_parse_token_string_t was used in place of cmdline_parse_num_string_t. Seen with clang-3.5. Signed-off-by: Olivier Matz --- examples/vm_power_manager/vm_power_cli.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/vm_power_manager/vm_power_cli.c

[dpdk-dev] two tso related questions

2014-12-17 Thread Olivier MATZ
Hi Helmut, On 12/17/2014 08:17 AM, Helmut Sim wrote: > While working on TSO based solution I faced the following two questions: > > 1. > is there a maximum pkt_len to be used with TSO?, e.g. let's say if > seg_sz > is 1400 can the entire segmented pkt be 256K (higer than 64

[dpdk-dev] [PATCH] xenvirt: Fix build break on cmdline_parse_etheraddr call

2014-12-18 Thread Olivier MATZ
_parse_etheraddr in xenvirt. This > patch makes the needed correction to avoid a build break > > Signed-off-by: Neil Horman Sorry, I missed that one, thank you for fixing it. Acked-by: Olivier Matz

[dpdk-dev] [PATCH] xenvirt: Fix build break on cmdline_parse_etheraddr call

2014-12-18 Thread Olivier MATZ
Hi, On 12/18/2014 09:40 AM, Olivier MATZ wrote: > Hi Neil, > > On 12/17/2014 06:03 PM, Neil Horman wrote: >> Back in: >> >> commit aaa662e75c23c61a1d79bd4d1f9f35b4967c39db >> Author: Alan Carew >> Date: Fri Dec 5 15:19:07 2014 +0100 >> >>

[dpdk-dev] [RFC PATCH 0/7] support multi-phtread per lcore

2014-12-18 Thread Olivier MATZ
Hi, On 12/18/2014 03:32 PM, Bruce Richardson wrote: > On Thu, Dec 18, 2014 at 12:20:07PM +, Walukiewicz, Miroslaw wrote: >> I have another question regarding your patch. >> >> Could we extend values returned by rte_lcore_id() to set them per thread >> (really the DPDK lcore is a pthread but

[dpdk-dev] [PATCH 0/7] Move EAL common functions

2014-12-29 Thread Olivier MATZ
Hi Ravi, On 12/25/2014 04:33 PM, Ravi Kerur wrote: > Common functions in linuxapp and bsdapp are moved into > librte_eal/common directory. > New files added follow _common_ naming conventions. > Tested against ubuntu and FreeBSD. Trying to factorize the common code goes in the good direction. Ho

[dpdk-dev] TSO with chained imbues

2014-12-29 Thread Olivier MATZ
Hi Gal, On 12/25/2014 04:55 PM, Gal Sagie wrote: > Does the TSO offload option works for chained mbufs? > What i mean is, if i have a chain representing a big TCP buffer, and i only > set the first mbuf with > TSO flags and tso_segsz (mss) and L4 size, will that work ? (or only > applied on the fi

[dpdk-dev] [PATCH 0/7] Move EAL common functions

2014-12-29 Thread Olivier MATZ
Hi Neil, On 12/29/2014 01:47 PM, Neil Horman wrote: > On Mon, Dec 29, 2014 at 09:47:05AM +0100, Olivier MATZ wrote: >> Trying to factorize the common code goes in the good direction. >> >> However I'm wondering if "common" is the proper place. Initially,

[dpdk-dev] [memnic PATCH] pmd: enable compiler optimization

2014-02-07 Thread Olivier Matz
Add -O3 in flags, it was missing in initial Makefile. Signed-off-by: Olivier Matz --- pmd/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pmd/Makefile b/pmd/Makefile index 7f96af1..c22f69f 100644 --- a/pmd/Makefile +++ b/pmd/Makefile @@ -39,7 +39,7 @@ O ?= . CC

[dpdk-dev] [memnic PATCH v2] linux: fix build with kernel 3.3

2014-02-07 Thread Olivier Matz
Remove unused dev_ops functions. The API of some functions (memnic_vlan_rx_add_vid, memnic_vlan_rx_kill_vid) changed starting from 3.3 kernel. Instead of using a #ifdef to handle the compilation on any kernel, we can just remove these functions as they are not needed. Signed-off-by: Olivier Matz

[dpdk-dev] [PATCH 00/11] eal: allow virtual pmd drivers as shared lib

2014-02-28 Thread Olivier Matz
elist, and virtual devices arguments in one file - rework eal user arguments - "--use-device" becomes "--pci-whitelist" and "--vdev" - replace ";" by "," when parsing device args - support start-up arguments for PCI devices Olivier Matz (11)

[dpdk-dev] [PATCH 01/11] mk: use whole-archive option when creating dpdk binaries

2014-02-28 Thread Olivier Matz
extension that is loaded at runtime with the -d option. Adding --whole-archive when generating a binary solves this issue. Signed-off-by: Olivier Matz --- mk/rte.app.mk | 5 + 1 file changed, 5 insertions(+) diff --git a/mk/rte.app.mk b/mk/rte.app.mk index d90a0b0..6f21e16 100644 --- a/mk

[dpdk-dev] [PATCH 02/11] devices-args: introduce rte_devargs in eal

2014-02-28 Thread Olivier Matz
2048kB/nr_hugepages ./app/test -c 0x15 -n 3 -m 64 RTE>>eal_flags_autotest [...] Test OK Signed-off-by: Olivier Matz --- app/test/Makefile | 1 + app/test/commands.c | 3 + app/test/test.h | 1 + app/test/te

[dpdk-dev] [PATCH 04/11] devices-args: add a dump_devargs command in basic test application

2014-02-28 Thread Olivier Matz
quot;eth_ring1" --use-device="02:00.0" RTE>>dump_devargs User device white list: VIRTUAL eth_ring0 VIRTUAL eth_ring1 PCI whitelist :02:00.0 Signed-off-by: Olivier Matz --- app/test/commands.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a

[dpdk-dev] [PATCH 03/11] devices-args: use rte_devargs and remove old whitelist code

2014-02-28 Thread Olivier Matz
entifier <> EAL: invalid PCI identifier <000f:0:0> Test OK Signed-off-by: Olivier Matz --- app/test/test_eal_flags.c | 49 +- app/test/test_pci.c| 51 +++--- lib/librte_eal/common/eal_common_nonpci_devs.c | 36 +++- lib/librte_ea

[dpdk-dev] [PATCH 05/11] pci: rename device_list as pci_device_list

2014-02-28 Thread Olivier Matz
To avoid confusion with virtual devices, rename device_list as pci_device_list and driver_list as pci_driver_list. Signed-off-by: Olivier Matz --- app/test/test_pci.c | 2 +- lib/librte_eal/common/eal_common_pci.c| 14 +++--- lib/librte_eal/common/include

[dpdk-dev] [PATCH 06/11] vdev: rename eal_common_nonpci_devs.c as eal_common_vdev.c

2014-02-28 Thread Olivier Matz
The name "nonpci" for virtual devices is ambiguous. A physical device can be non-PCI (ex: usb, sata, ...). This file only deal with virtual devices so rename it to avoid confusion. Signed-off-by: Olivier Matz --- lib/librte_eal/common/Makefile | 2 +- lib/librte_

[dpdk-dev] [PATCH 07/11] vdev: allow external registration of virtual device drivers

2014-02-28 Thread Olivier Matz
equired to ease maintenance. Signed-off-by: Olivier Matz --- app/test/test_pmd_ring.c | 6 +-- lib/librte_eal/common/eal_common_vdev.c | 72 +++- lib/librte_eal/linuxapp/eal/eal.c| 7 ++-- lib/librte_pmd_pcap/rte_eth_pcap.c | 16 ++

[dpdk-dev] [PATCH 08/11] device-args: use a comma instead of semicolon to separate key/values

2014-02-28 Thread Olivier Matz
This commit changes the API of --use-device. It changes the separator used between each key/value pairs from ';' to ','. Indeed, ';' was not the best choice as this character is also used to separate shell commands, forcing the user to surround arguments with quotes

[dpdk-dev] [PATCH 09/11] device-args: replace use-device eal option by pci-whitelist and vdev

2014-02-28 Thread Olivier Matz
es/hugepages-2048kB/nr_hugepages ./app/test -c 0x15 -n 3 -m 64 RTE>>eal_flags_autotest [...] Test OK Signed-off-by: Olivier Matz --- app/test/test_eal_flags.c | 27 +++- lib/librte_eal/linuxapp/eal/eal.c | 89 +-- 2 files changed, 64 insertion

[dpdk-dev] [PATCH 10/11] device-args: allow to provide per pci device command line arguments

2014-02-28 Thread Olivier Matz
debug of drivers or setting a specific operating mode at start-up. Signed-off-by: Olivier Matz --- lib/librte_eal/common/eal_common_pci.c | 44 ++--- lib/librte_eal/common/include/rte_pci.h | 6 +++-- lib/librte_eal/linuxapp/eal/eal_pci.c | 4 ++- 3 files changed

[dpdk-dev] [PATCH 11/11] testpmd: add several dump commands, useful for debug

2014-02-28 Thread Olivier Matz
Copy all the dump commands provided in app/test into app/testpmd. These commands are useful to debug a problem when using testpmd. Signed-off-by: Olivier Matz --- app/test-pmd/cmdline.c | 114 + 1 file changed, 114 insertions(+) diff --git a/app

[dpdk-dev] rte_mempools / rte_rings thread safe?

2014-01-07 Thread Olivier MATZ
Hi Jyotiswarup, On 12/28/2013 03:55 PM, Jyotiswarup Raiturkar wrote: > The rte_mempool and rte_ring libs have > multi-producer/multi-consumer versions. But it's also mentioned > in the header files that the implementation is not > pre-emtable : " Note: the mempool implementation is not > pree

[dpdk-dev] Any benefit of using DPDK's makefiles instead of using your own and linking against DPDK library

2014-01-16 Thread Olivier MATZ
Hi Dan, On 01/14/2014 09:40 PM, Daniel Kan wrote: > On a similar note, is there any particular reason why many macros such > as RTE_MACHINE_XXX are passed as flags to the compiler instead of > being defined in rte_config.h? I guess it's because in case of local compilation (called "native"), thes

[dpdk-dev] Preemption in rings

2014-01-20 Thread Olivier MATZ
Hi Carlos, On 01/18/2014 02:10 PM, Carlos Franco wrote: > - a pthread doing multi-producers enqueues on a given ring must > not be preempted by another pthread doing a multi-producer > enqueue on the same ring. > > - a pthread doing multi-consumers dequeues on a given ring must > not b

[dpdk-dev] [PATCH] spinlock: fix build with clang

2014-01-24 Thread Olivier Matz
LLVM clang requires an explicitly sized "cmp" assembly instruction. Signed-off-by: Olivier Matz --- lib/librte_eal/common/include/rte_spinlock.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_eal/common/include/rte_spinlock.h b/lib/librte_eal/comm

[dpdk-dev] [PATCH 0/2] pci: allow to run without hotplug

2014-01-24 Thread Olivier Matz
create the /dev/uioX devices using mknod(). Olivier Matz (2): pci: split the function providing uio device and mappings pci: add option --create-uio-dev to run without hotplug lib/librte_eal/linuxapp/eal/eal.c | 6 + lib/librte_eal/linuxapp/eal/eal_pci.c

[dpdk-dev] [PATCH 1/2] pci: split the function providing uio device and mappings

2014-01-24 Thread Olivier Matz
understand. Moreover it improves readability: having smaller functions help to understand what pci_uio_map_resource() does. Signed-off-by: Olivier Matz --- lib/librte_eal/linuxapp/eal/eal_pci.c | 82 +-- 1 file changed, 50 insertions(+), 32 deletions(-) diff --git

[dpdk-dev] [PATCH 2/2] pci: add option --create-uio-dev to run without hotplug

2014-01-24 Thread Olivier Matz
When the user specifies --create-uio-dev in dpdk eal start options, the DPDK will create the /dev/uioX instead of waiting that a program does it (which is usually hotplug). This option is useful in embedded environments where there is no hotplug to do the work. Signed-off-by: Olivier Matz

[dpdk-dev] [memnic PATCH] pmd: fix attributes

2014-01-24 Thread Olivier Matz
Add missing "const" and remove useless "rte_unused" attributes. Signed-off-by: Olivier Matz --- pmd/pmd_memnic.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pmd/pmd_memnic.c b/pmd/pmd_memnic.c index d16eb0d..bc01746 100644 --- a/pmd/pm

[dpdk-dev] [memnic PATCH] pmd: use memory barrier function instead of asm volatile

2014-01-24 Thread Olivier Matz
Use the DPDK specific function rte_mb() instead of the GCC statement asm volatile ("" ::: "memory"). Signed-off-by: Olivier Matz --- common/memnic.h | 2 -- pmd/pmd_memnic.c | 6 +++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/common/memnic.h b/c

[dpdk-dev] [memnic PATCH] linux: fix build with kernel >= 3.3

2014-01-24 Thread Olivier Matz
Signed-off-by: Olivier Matz --- linux/memnic_net.c | 28 ++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/linux/memnic_net.c b/linux/memnic_net.c index 747ae51..b6018fb 100644 --- a/linux/memnic_net.c +++ b/linux/memnic_net.c @@ -2,6 +2,7 @@ * BSD

[dpdk-dev] [PATCH 2/2 v2] pci: add option --create-uio-dev to run without hotplug

2014-01-28 Thread Olivier Matz
When the user specifies --create-uio-dev in dpdk eal start options, the DPDK will create the /dev/uioX instead of waiting that a program does it (which is usually hotplug). This option is useful in embedded environments where there is no hotplug to do the work. Signed-off-by: Olivier Matz

[dpdk-dev] [PATCH 00/11] add rte_kvargs library: a key/value args parser

2014-01-28 Thread Olivier Matz
another library (like pmd_ring) to parse arguments in an easier way without duplicating the code. Olivier Matz (11): kvargs: add a new library to parse key/value arguments kvargs: use the new library in pmd_pcap kvargs: remove driver name in arguments kvargs: remove useless size field kvargs

[dpdk-dev] [PATCH 01/11] kvargs: add a new library to parse key/value arguments

2014-01-28 Thread Olivier Matz
Copy the code from rte_eth_pcap_arg_parser.[ch], without any functional modifications, only: - rename functions and structure - restyle (indentation) - add comments (doxygen style) - add "const" or "static" attributes, remove unneeded "inline" Signed-off

[dpdk-dev] [PATCH 02/11] kvargs: use the new library in pmd_pcap

2014-01-28 Thread Olivier Matz
The rte_kvargs library is a reworked copy of rte_eth_pcap_arg_parser, so it provides the same service. Therefore we can use it and remove the code of rte_eth_pcap_arg_parser. Signed-off-by: Olivier Matz --- lib/librte_pmd_pcap/Makefile | 8 +- lib/librte_pmd_pcap

[dpdk-dev] [PATCH 03/11] kvargs: remove driver name in arguments

2014-01-28 Thread Olivier Matz
. Signed-off-by: Olivier Matz --- lib/librte_kvargs/rte_kvargs.c | 13 ++--- lib/librte_kvargs/rte_kvargs.h | 4 +--- lib/librte_pmd_pcap/rte_eth_pcap.c | 4 +++- lib/librte_pmd_ring/rte_eth_ring.c | 2 ++ 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/lib

[dpdk-dev] [PATCH 04/11] kvargs: remove useless size field

2014-01-28 Thread Olivier Matz
This value was not very useful as the size of the table is fixed (equals RTE_KVARGS_MAX). By the way, the memset in the initialization function was wrong (size too short). Even if it was not really an issue since we rely on the "count" field, it is now fixed by this patch. Signed-off-b

[dpdk-dev] [PATCH 05/11] kvargs: rework API to fix memory leak

2014-01-28 Thread Olivier Matz
() useless. The only drawback of this API change is that a key/value associations cannot be added to an existing kvlist. But it's not used today, and there is not obvious use case for that. Signed-off-by: Olivier Matz --- lib/librte_kvargs/Makefile | 3 +- lib/librte_kvargs/rte_kva

[dpdk-dev] [PATCH 06/11] kvargs: simpler parsing and allow duplicated keys

2014-01-28 Thread Olivier Matz
useless calls to strnlen(). The delimiters macros become strings instead of chars due to the strtok_r() API. Signed-off-by: Olivier Matz --- lib/librte_kvargs/rte_kvargs.c | 71 ++ lib/librte_kvargs/rte_kvargs.h | 8 +++-- 2 files changed, 22 insertions

[dpdk-dev] [PATCH 07/11] kvargs: be strict when matching a key

2014-01-28 Thread Olivier Matz
patch was needed on rte_kvargs_count() as it already used strcmp(). Signed-off-by: Olivier Matz --- lib/librte_kvargs/rte_kvargs.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/librte_kvargs/rte_kvargs.c b/lib/librte_kvargs/rte_kvargs.c index 6aaa316..73034fc 100644 ---

[dpdk-dev] [PATCH 08/11] kvargs: add const attribute in handler parameters

2014-01-28 Thread Olivier Matz
The "value" argument is read-only and should be const. Signed-off-by: Olivier Matz --- lib/librte_kvargs/rte_kvargs.h | 2 +- lib/librte_pmd_pcap/rte_eth_pcap.c | 14 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/librte_kvargs/rte_kvar

<    1   2   3   4   5   6   7   8   9   10   >