[dpdk-dev] Query on RSS Rule

2016-05-18 Thread Nishant Verma
Hi Wenzhuo, Thanks for the reply. Yes, i am using ixgbe. On software front, this is what i am doing. I am using DPDK 16.04 and pktgen 3.0.00 On my DPDK machine, i have configured RSS rule just for Destination IP (172.10.10.2). [image: rss]

[dpdk-dev] [PATCH v3] librte_ether: use RTE_ETH_VALID_PORTID_OR_ERR_RET to check port_id

2016-05-18 Thread Mauricio Vasquez B
The RTE_ETH_VALID_PORTID_OR_ERR_RET macro is used in some places to check if a port id is valid or not. This commit makes use of it in some new parts of the code. Signed-off-by: Mauricio Vasquez B --- v3: - use it also in rte_eth_add_rx_callback and rte_eth_add_tx_callback v2: - add missed

[dpdk-dev] [PATCH] mbuf: make rearm_data address naturally aligned

2016-05-18 Thread Jerin Jacob
To avoid multiple stores on fast path, Ethernet drivers aggregate the writes to data_off, refcnt, nb_segs and port to an uint64_t data and write the data in one shot with uint64_t* at >rearm_data address. Some of the non-IA platforms have store operation overhead if the store address is not

[dpdk-dev] Query on RSS Rule

2016-05-18 Thread Nishant Verma
?Hi All, It's very basic question, but somehow i am blocked due to this issue. Please help me out. I have configured NTUPLE filter in my application with just Destination IP every ?thing else(SRC IP, S_PORT, D_PORT & proto) is disabled. But whenever i send packet from any machine, it means

[dpdk-dev] [PATCH v3 5/7] eal/linux: mmap ioports on ppc64

2016-05-18 Thread Olivier Matz
On PPC64, the ioports are mapped in memory. Implement the missing part of ioport API for PPC64 when using uio. This may also work on other architectures but it has not been tested. Signed-off-by: David Marchand Signed-off-by: Olivier Matz --- Just resubmitting one patch for this patchset. v2

[dpdk-dev] [PATCH v2] vhost: add support for dynamic vhost PMD creation

2016-05-18 Thread Ferruh Yigit
Add rte_eth_from_vhost() API to create vhost PMD dynamically from applications. Signed-off-by: Ferruh Yigit --- v2: * drop rte_ prefix from non-public function * re-use eth_rx_queue_setup/eth_tx_queue_setup * pass vdev options as parameter to API --- drivers/net/vhost/rte_eth_vhost.c

[dpdk-dev] [PATCH v2] mbuf: add helpers to prefetch mbuf

2016-05-18 Thread Olivier Matz
Some architectures (ex: Power8) have a cache line size of 128 bytes, so the drivers should not expect that prefetching the second part of the mbuf with rte_prefetch0(>cacheline1) is valid. This commit add helpers that can be used by drivers to prefetch the rx or tx part of the mbuf, whatever the

[dpdk-dev] [PATCH v4] mbuf: decrease refcnt when detaching

2016-05-18 Thread Olivier Matz
Hi Hiroyuki, On 05/18/2016 04:41 PM, Hiroyuki Mikita wrote: > The rte_pktmbuf_detach() function should decrease refcnt on a direct > buffer. > > Signed-off-by: Hiroyuki Mikita Acked-by: Olivier Matz Thanks

[dpdk-dev] [PATCH] librte_ether: use RTE_ETH_VALID_PORTID_OR_ERR_RET to check port_id

2016-05-18 Thread Thomas Monjalon
2016-05-18 17:25, Mauricio V?squez: > On Wed, May 18, 2016 at 5:01 PM, Thomas Monjalon 6wind.com> > wrote: > > > 2016-05-18 16:41, Mauricio V?squez: > > > On Wed, May 18, 2016 at 10:15 AM, Thomas Monjalon < > > thomas.monjalon at 6wind.com > > > > wrote: > > > > > > > 2016-05-17 22:02, Mauricio

[dpdk-dev] [PATCH] mbuf: make rearm_data address naturally aligned

2016-05-18 Thread Bruce Richardson
On Wed, May 18, 2016 at 07:27:43PM +0530, Jerin Jacob wrote: > To avoid multiple stores on fast path, Ethernet drivers > aggregate the writes to data_off, refcnt, nb_segs and port > to an uint64_t data and write the data in one shot > with uint64_t* at >rearm_data address. > > Some of the non-IA

[dpdk-dev] [PATCH] librte_ether: use RTE_ETH_VALID_PORTID_OR_ERR_RET to check port_id

2016-05-18 Thread Mauricio Vásquez
On Wed, May 18, 2016 at 5:01 PM, Thomas Monjalon wrote: > 2016-05-18 16:41, Mauricio V?squez: > > On Wed, May 18, 2016 at 10:15 AM, Thomas Monjalon < > thomas.monjalon at 6wind.com > > > wrote: > > > > > 2016-05-17 22:02, Mauricio V?squez: > > > > On Fri, May 13, 2016 at 6:20 PM, Thomas Monjalon

[dpdk-dev] [PATCHv2 3/4] Makefile: Do post processing on objects that register a driver

2016-05-18 Thread Neil Horman
Modify the compilation makefile to identify C files that export PMD information, and use that to trigger execution of the pmdinfo binary. If the execution of pmdinfo is successful, compile the output C file to an object, and use the linker to do relocatable linking on the resultant object file

[dpdk-dev] [PATCHv2 2/4] drivers: Update driver registration macro usage

2016-05-18 Thread Neil Horman
Modify the PMD_REGISTER_DRIVER macro, bifurcating it into two (PMD_REGISTER_DRIVER_PDEV and PMD_REGISTER_DRIVER_VDEV. Both of these do the same thing the origional macro did, but both add the definition of a string variable that informs interested parties of the name of the pmd, and the former

[dpdk-dev] [PATCHv2 1/4] pmdinfogen: Add buildtools and pmdinfogen utility

2016-05-18 Thread Neil Horman
pmdinfogen is a tool used to parse object files and build json strings for use in later determining hardware support in a dso or application binary. pmdinfo looks for the non-exported symbol names this_pmd_name and this_pmd_tbl (where n is a integer counter). It records the name of each of

[dpdk-dev] [PATCH] librte_ether: use RTE_ETH_VALID_PORTID_OR_ERR_RET to check port_id

2016-05-18 Thread Thomas Monjalon
2016-05-18 16:41, Mauricio V?squez: > On Wed, May 18, 2016 at 10:15 AM, Thomas Monjalon 6wind.com > > wrote: > > > 2016-05-17 22:02, Mauricio V?squez: > > > On Fri, May 13, 2016 at 6:20 PM, Thomas Monjalon < > > thomas.monjalon at 6wind.com> > > > wrote: > > > > 2016-04-29 17:23, Mauricio

[dpdk-dev] [PATCH] eal: fix log level/type retrieving on a standard pthread

2016-05-18 Thread Thomas Monjalon
> > The functions rte_log_cur_msg_loglevel() and rte_log_cur_msg_logtype() > > return the current log level/type for the message being processed. They > > are used when implementing a user-defined logging stream. > > > > The current log levels and types were stored in a table indexed by the > >

[dpdk-dev] [PATCH] librte_ether: use RTE_ETH_VALID_PORTID_OR_ERR_RET to check port_id

2016-05-18 Thread Mauricio Vásquez
On Wed, May 18, 2016 at 10:15 AM, Thomas Monjalon wrote: > 2016-05-17 22:02, Mauricio V?squez: > > On Fri, May 13, 2016 at 6:20 PM, Thomas Monjalon < > thomas.monjalon at 6wind.com> > > wrote: > > > 2016-04-29 17:23, Mauricio Vasquez B: > > > > The RTE_ETH_VALID_PORTID_OR_ERR_RET macro is used

[dpdk-dev] [PATCH v2] mk: add rpath for applications

2016-05-18 Thread Thomas Monjalon
2016-05-03 16:03, Ferruh Yigit: > Add default library output folder to the library search folder. > > This is useful for development environment, in production environment > DPDK libraries already should be in know locations. > > Patch removes requirement to set LD_LIBRARY_PATH variable when

[dpdk-dev] [PATCHv3 1/2] config/armv8a: disable igb_uio

2016-05-18 Thread Thomas Monjalon
2016-05-13 18:41, Santosh Shukla: > On Fri, May 13, 2016 at 02:50:48PM +0200, Thomas Monjalon wrote: > > 2016-05-11 19:17, Hemant Agrawal: > > > IGB_UIO not supported for arm64 arch in kernel so disable. > > > > If I understand well, a patch is needed in the kernel to make > > igb_uio works?

[dpdk-dev] rte_reorder_free_mbufs function for librte_reorder

2016-05-18 Thread ASM
Hi folks. I want to use stand alone rte_ring and rte_reorder library's. Without mempool. For rte_ring I can call rte_ring_get_memsize() function, alloc memory by self and use rte_ring. But reorder don't have rte_reorder_get_memsize. Struct rte_reorder_buffer is private. Furthermore, code have

[dpdk-dev] [PATCH 4/4] pmd_hw_support.py: Add tool to query binaries for hw support information

2016-05-18 Thread Panu Matilainen
On 05/18/2016 03:03 PM, Neil Horman wrote: > On Wed, May 18, 2016 at 02:48:30PM +0300, Panu Matilainen wrote: >> On 05/16/2016 11:41 PM, Neil Horman wrote: >>> This tool searches for the primer sting PMD_DRIVER_INFO= in any ELF binary, >>> and, if found parses the remainder of the string as a json

[dpdk-dev] [PATCH 4/4] pmd_hw_support.py: Add tool to query binaries for hw support information

2016-05-18 Thread Panu Matilainen
On 05/16/2016 11:41 PM, Neil Horman wrote: > This tool searches for the primer sting PMD_DRIVER_INFO= in any ELF binary, > and, if found parses the remainder of the string as a json encoded string, > outputting the results in either a human readable or raw, script parseable > format > >

[dpdk-dev] [PATCH] eal: add option --avail-cores to detect lcores

2016-05-18 Thread David Marchand
Hello Jianfeng, On Wed, Mar 9, 2016 at 2:05 PM, Panu Matilainen wrote: > On 03/08/2016 07:38 PM, Tan, Jianfeng wrote: >> >> Hi Panu, >> >> On 3/8/2016 4:54 PM, Panu Matilainen wrote: >>> >>> On 03/04/2016 12:05 PM, Jianfeng Tan wrote: This patch adds option, --avail-cores, to use

[dpdk-dev] [PATCH 4/4] pmd_hw_support.py: Add tool to query binaries for hw support information

2016-05-18 Thread Thomas Monjalon
2016-05-18 14:48, Panu Matilainen: > Calling up on the list of requirements from > http://dpdk.org/ml/archives/dev/2016-May/038324.html, I see a pile of > technical requirements but perhaps we should stop for a moment to think > about the use-cases first? > > To name some from the top of my

[dpdk-dev] [PATCH v3] mbuf: decrease refcnt when detaching

2016-05-18 Thread Olivier Matz
Hi Hiroyuki, Thanks for submitting a new version. There are some styling issues in the patch, I highlighted them below but you can check them by using checkpatch: DPDK_CHECKPATCH_PATH=/path/to/linux/checkpatch.pl \ scripts/checkpatches.sh file.patch On 05/17/2016 06:35 PM, Hiroyuki

[dpdk-dev] [PATCH v2 9/9] doc: update ipsec sample guide

2016-05-18 Thread Sergio Gonzalez Monroy
Signed-off-by: Sergio Gonzalez Monroy --- doc/guides/sample_app_ug/img/ipsec_endpoints.svg | 850 + doc/guides/sample_app_ug/ipsec_secgw.rst | 910 ++- 2 files changed, 1400 insertions(+), 360 deletions(-) create mode 100644

[dpdk-dev] [PATCH v2 8/9] examples/ipsec-secgw: transport mode support

2016-05-18 Thread Sergio Gonzalez Monroy
IPSec transport mode support. Signed-off-by: Sergio Gonzalez Monroy --- examples/ipsec-secgw/esp.c | 124 ++- examples/ipsec-secgw/ipsec.h | 1 + examples/ipsec-secgw/rt.c| 32 +++ examples/ipsec-secgw/sa.c| 39 ++

[dpdk-dev] [PATCH v2 7/9] examples/ipsec-secgw: ipv6 support

2016-05-18 Thread Sergio Gonzalez Monroy
Support IPSec IPv6 allowing IPv4/IPv6 traffic in IPv4 or IPv6 tunnel. We need separate Routing (LPM) and SP (ACL) tables for IPv4 and IPv6, but a common SA table. Signed-off-by: Sergio Gonzalez Monroy --- examples/ipsec-secgw/Makefile | 5 +- examples/ipsec-secgw/esp.c | 128

[dpdk-dev] [PATCH v2 5/9] examples/ipsec-secgw: fix no sa found case

2016-05-18 Thread Sergio Gonzalez Monroy
The application only checks that an SA shoudln't be NULL through ASSERT (only when debugging is enabled) without properly dealing with the case of not having an SA for the processed packet. If no SA is found, drop the packet. Fixes: d299106e8e31 ("examples/ipsec-secgw: add IPsec sample

[dpdk-dev] [PATCH v2 4/9] examples/ipsec-secgw: rework ipsec execution loop

2016-05-18 Thread Sergio Gonzalez Monroy
Rework implementation moving from function pointers approach, where each function implements very specific functionality, to a generic function approach. Signed-off-by: Sergio Gonzalez Monroy --- examples/ipsec-secgw/esp.c | 8 +- examples/ipsec-secgw/esp.h | 9 +-

[dpdk-dev] [PATCH v2 3/9] examples/ipsec-secgw: add build option and cleanup

2016-05-18 Thread Sergio Gonzalez Monroy
Add support for building the application with DEBUG=1. This option adds the compiler stack protection flag and enables extra output in the application. Also remove unnecessary VPATH setup. Signed-off-by: Sergio Gonzalez Monroy --- examples/ipsec-secgw/Makefile | 5 +++-- 1 file changed, 3

[dpdk-dev] [PATCH v2 2/9] examples/ipsec-secgw: fix stack smashing error

2016-05-18 Thread Sergio Gonzalez Monroy
Building the application with -O3 and -fstack-protection (default in Ubuntu) results in the following error: *** stack smashing detected ***: ./build/ipsec-secgw terminated The error is caused by storing an 8B value in a 4B variable. Fixes: d299106e8e31 ("examples/ipsec-secgw: add IPsec sample

[dpdk-dev] [PATCH v2 1/9] examples/ipsec-secgw: fix esp padding check

2016-05-18 Thread Sergio Gonzalez Monroy
Current code fails to correctly check padding sequence for inbound packets. Padding sequence starts on 1 but it checks for 0. Fixes: d299106e8e31 ("examples/ipsec-secgw: add IPsec sample application") Signed-off-by: Sergio Gonzalez Monroy --- examples/ipsec-secgw/esp.c | 2 +- 1 file changed,

[dpdk-dev] [PATCH v2 0/9] IPSec enhancements

2016-05-18 Thread Sergio Gonzalez Monroy
Update IPSec sample app with IPv6 and Transport mode support. The series contains some bug fixes to facilitate patch merge. v2: - rebase code - doc improvements - add missing image file Sergio Gonzalez Monroy (9): examples/ipsec-secgw: fix esp padding check examples/ipsec-secgw: fix

[dpdk-dev] [PATCH v2 5/7] eal/linux: mmap ioports on ppc64

2016-05-18 Thread Olivier Matz
Hi David, On 05/17/2016 05:54 PM, David Marchand wrote: > On Tue, May 17, 2016 at 11:59 AM, Olivier Matz > wrote: >> + /* mmap the pci resource */ >> + fd = open(filename, O_RDWR); >> + if (fd < 0) { >> + RTE_LOG(ERR, EAL, "Cannot open %s: %s\n", filename, >> +

[dpdk-dev] [PATCH v3 35/35] doc: update release notes about mempool allocation

2016-05-18 Thread Olivier Matz
Remove the deprecation notice and add an entry in the release note for the changes in mempool allocation. Signed-off-by: Olivier Matz --- doc/guides/rel_notes/deprecation.rst | 8 doc/guides/rel_notes/release_16_07.rst | 9 + 2 files changed, 9 insertions(+), 8 deletions(-)

[dpdk-dev] [PATCH v3 34/35] app/test: rework mempool test

2016-05-18 Thread Olivier Matz
Rework the mempool test to better indicate where it failed, and, now that this feature is available, add the freeing of the mempool after the test is done. Signed-off-by: Olivier Matz --- app/test/test_mempool.c | 232 +++- 1 file changed, 129

[dpdk-dev] [PATCH v3 33/35] mempool: add flag for removing phys contiguous constraint

2016-05-18 Thread Olivier Matz
Add a new flag to remove the constraint of having physically contiguous objects inside a mempool. Add this flag to the log history mempool to start, but we could add it in most cases where objects are not mbufs. Signed-off-by: Olivier Matz --- lib/librte_eal/common/eal_common_log.c | 2 +-

[dpdk-dev] [PATCH v3 32/35] mem: avoid memzone/mempool/ring name truncation

2016-05-18 Thread Olivier Matz
Check the return value of snprintf to ensure that the name of the object is not truncated. By the way, update the test to avoid to trigger an error in that case. Signed-off-by: Olivier Matz --- app/test/test_mempool.c| 12

[dpdk-dev] [PATCH v3 31/35] app/testpmd: remove anonymous mempool code

2016-05-18 Thread Olivier Matz
Now that mempool library provide functions to populate with anonymous mmap'd memory, we can remove this specific code from test-pmd. Signed-off-by: Olivier Matz --- app/test-pmd/Makefile| 4 - app/test-pmd/mempool_anon.c | 201 ---

[dpdk-dev] [PATCH v3 30/35] mempool: make mempool populate and free api public

2016-05-18 Thread Olivier Matz
Add the following functions to the public mempool API: - rte_mempool_create_empty() - rte_mempool_populate_phys() - rte_mempool_populate_phys_tab() - rte_mempool_populate_virt() - rte_mempool_populate_default() - rte_mempool_populate_anon() - rte_mempool_free() Signed-off-by: Olivier Matz ---

[dpdk-dev] [PATCH v3 29/35] mempool: populate with anonymous memory

2016-05-18 Thread Olivier Matz
Now that we can populate a mempool with any virtual memory, it is easier to introduce a function to populate a mempool with memory coming from an anonymous mapping, as it's done in test-pmd. The next commit will replace test-pmd anonymous mapping by this function. Signed-off-by: Olivier Matz

[dpdk-dev] [PATCH v3 28/35] mempool: create the internal ring when populating

2016-05-18 Thread Olivier Matz
Instead of creating the internal ring at mempool creation, do it when populating the mempool with the first memory chunk. The objective here is to simplify the change of external handler when it will be introduced. For instance, this will be possible: mp = rte_mempool_create_empty(...)

[dpdk-dev] [PATCH v3 27/35] mempool: rework support of Xen dom0

2016-05-18 Thread Olivier Matz
Avoid to have a specific file for that, and remove #ifdefs. Now that we have introduced a function to populate a mempool with a virtual area, the support of xen dom0 is much easier. The only thing we need to do is to convert the guest physical address into the machine physical address using

[dpdk-dev] [PATCH v3 26/35] eal/xen: return machine address without knowing memseg id

2016-05-18 Thread Olivier Matz
The conversion from guest physical address to machine physical address is fast when the caller knows the memseg corresponding to the gpa. But in case the user does not know this information, just find it by browsing the segments. This feature will be used by next commit. Signed-off-by: Olivier

[dpdk-dev] [PATCH v3 25/35] mempool: introduce a function to create an empty pool

2016-05-18 Thread Olivier Matz
Introduce a new function rte_mempool_create_empty() that allocates a mempool that is not populated. The functions rte_mempool_create() and rte_mempool_xmem_create() now make use of it, making their code much easier to read. Currently, they are the only users of rte_mempool_create_empty() but the

[dpdk-dev] [PATCH v3 24/35] mempool: introduce a function to free a pool

2016-05-18 Thread Olivier Matz
Introduce rte_mempool_free() that: - unlink the mempool from the global list if it is found - free all the memory chunks using their free callbacks - free the internal ring - free the memzone containing the mempool Currently this function is only used in error cases when creating a new mempool,

[dpdk-dev] [PATCH v3 23/35] mempool: replace physical address by a memzone pointer

2016-05-18 Thread Olivier Matz
Storing the pointer to the memzone instead of the physical address provides more information than just the physical address: for instance, the memzone flags. Moreover, keeping the memzone pointer will allow us to free the mempool (this is done later in the series). Signed-off-by: Olivier Matz

[dpdk-dev] [PATCH v3 22/35] mempool: support no hugepage mode

2016-05-18 Thread Olivier Matz
Introduce a new function rte_mempool_populate_virt() that is now called by default when hugepages are not supported. This function populate the mempool with several physically contiguous chunks whose minimum size is the page size of the system. Thanks to this, rte_mempool_create() will work

[dpdk-dev] [PATCH v3 21/35] eal: lock memory when not using hugepages

2016-05-18 Thread Olivier Matz
Although the physical address won't be correct in memory segment, this allows at least to retrieve the physical address using rte_mem_virt2phy(). Indeed, if the page is not locked, the page may not be present in physical memory. With next commit, it allows a mempool to have properly filled

[dpdk-dev] [PATCH v3 20/35] mempool: allocate in several memory chunks by default

2016-05-18 Thread Olivier Matz
Introduce rte_mempool_populate_default() which allocates mempool objects in several memzones. The mempool header is now always allocated in a specific memzone (not with its objects). Thanks to this modification, we can remove many specific behavior that was required when hugepages are not enabled

[dpdk-dev] [PATCH v3 19/35] mempool: get memory size with unspecified page size

2016-05-18 Thread Olivier Matz
Update rte_mempool_xmem_size() so that when the page_shift argument is set to 0, assume that memory is physically contiguous, allowing to ignore page boundaries. This will be used in the next commits. By the way, rename the variable 'n' as 'obj_per_page' and avoid the affectation inside the if().

[dpdk-dev] [PATCH v3 18/35] mempool: introduce a free callback for memory chunks

2016-05-18 Thread Olivier Matz
Introduce a free callback that is passed to the populate* functions, which is used when freeing a mempool. This is unused now, but as next commits will populate the mempool with several chunks of memory, we need a way to free them properly on error. Later in the series, we will also introduce a

[dpdk-dev] [PATCH v3 17/35] mempool: simplify the memory usage calculation

2016-05-18 Thread Olivier Matz
This commit simplifies rte_mempool_xmem_usage(). Since previous commit, the function rte_mempool_xmem_usage() is now the last user of rte_mempool_obj_mem_iter(). This complex code can now be moved inside the function. We can get rid of the callback and do some simplification to make the code more

[dpdk-dev] [PATCH v3 16/35] mempool: add function to iterate the memory chunks

2016-05-18 Thread Olivier Matz
In the same model than rte_mempool_obj_iter(), introduce rte_mempool_mem_iter() to iterate the memory chunks attached to the mempool. Signed-off-by: Olivier Matz --- lib/librte_mempool/rte_mempool.c | 16 lib/librte_mempool/rte_mempool.h | 27

[dpdk-dev] [PATCH v3 15/35] mempool: store memory chunks in a list

2016-05-18 Thread Olivier Matz
Do not use paddr table to store the mempool memory chunks. This will allow to have several chunks with different virtual addresses. Signed-off-by: Olivier Matz --- app/test/test_mempool.c | 2 +- lib/librte_mempool/rte_mempool.c | 207 ++-

[dpdk-dev] [PATCH v3 14/35] mempool: remove macro to check if contiguous

2016-05-18 Thread Olivier Matz
This commit removes MEMPOOL_IS_CONTIG(). The next commits will change the behavior of the mempool library so that the objects will never be allocated in the same memzone than the mempool header. Therefore, there is no reason to keep this macro that would always return 0. This macro was only used

[dpdk-dev] [PATCH v3 13/35] mempool: store physical address in objects

2016-05-18 Thread Olivier Matz
Store the physical address of the object in its header. It simplifies rte_mempool_virt2phy() and prepares the removing of the paddr[] table in the mempool header. Signed-off-by: Olivier Matz --- lib/librte_mempool/rte_mempool.c | 17 +++-- lib/librte_mempool/rte_mempool.h | 11

[dpdk-dev] [PATCH v3 12/35] mempool: create internal ring in a specific function

2016-05-18 Thread Olivier Matz
This makes the code of rte_mempool_create() clearer, and it will make the introduction of external mempool handler easier (in another patch series). Indeed, this function contains the specific part when a ring is used, but it could be replaced by something else in the future. This commit also

[dpdk-dev] [PATCH v3 11/35] mempool: use the list to initialize objects

2016-05-18 Thread Olivier Matz
Before this patch, the mempool elements were initialized at the time they were added to the mempool. This patch changes this to do the initialization of all objects once the mempool is populated, using rte_mempool_obj_iter() introduced in previous commits. Thanks to this modification, we are

[dpdk-dev] [PATCH v3 10/35] mempool: use the list to audit all elements

2016-05-18 Thread Olivier Matz
Use the new rte_mempool_obj_iter() instead the old rte_mempool_obj_iter() to iterate among objects to audit them (check for cookies). Signed-off-by: Olivier Matz --- lib/librte_mempool/rte_mempool.c | 41 ++-- 1 file changed, 6 insertions(+), 35 deletions(-)

[dpdk-dev] [PATCH v3 09/35] mempool: use the list to iterate the elements

2016-05-18 Thread Olivier Matz
Now that the mempool objects are chained into a list, we can use it to browse them. This implies a rework of rte_mempool_obj_iter() API, that does not need to take as many arguments as before. The previous function is kept as a private function, and renamed in this commit. It will be removed in a

[dpdk-dev] [PATCH v3 08/35] mempool: remove const qualifier in dump and audit

2016-05-18 Thread Olivier Matz
In next commits, we will use an iterator to walk through the objects in mempool in rte_mempool_audit(). This iterator takes a "struct rte_mempool *" as a parameter because it is assumed that the callback function can modify the mempool. The previous approach was to introduce a RTE_DECONST()

[dpdk-dev] [PATCH v3 07/35] mempool: remove const qualifier when browsing pools

2016-05-18 Thread Olivier Matz
This commit removes the const qualifier for the mempool in rte_mempool_walk() callback prototype. Indeed, most functions that can be done on a mempool require a non-const mempool pointer, except the dump and the audit. Therefore, the mempool_walk() is more useful if the mempool pointer is not

[dpdk-dev] [PATCH v3 06/35] mempool: list objects when added

2016-05-18 Thread Olivier Matz
Introduce a list entry in object header so they can be listed and browsed. The objective is to introduce a more simple way to browse the elements of a mempool. The next commits will update rte_mempool_obj_iter() to use this list, and remove the previous complex implementation. Signed-off-by:

[dpdk-dev] [PATCH v3 05/35] mempool: rename object constructor typedef

2016-05-18 Thread Olivier Matz
This commit renames mempool_obj_ctor_t as mempool_obj_cb_t. In next commits, we will add the ability to populate the mempool and iterate through objects using the same function. We will use the same callback type for that. As the callback is not a constructor anymore, rename it into

[dpdk-dev] [PATCH v3 04/35] mempool: use sizeof to get the size of header and trailer

2016-05-18 Thread Olivier Matz
Since commits d2e0ca22f and 97e7e685b the headers and trailers of the mempool are defined as a structure. We can get their size using a sizeof instead of doing a calculation that will become wrong at the first structure update. Signed-off-by: Olivier Matz --- lib/librte_mempool/rte_mempool.c |

[dpdk-dev] [PATCH v3 03/35] mempool: uninline function to check cookies

2016-05-18 Thread Olivier Matz
There's no reason to keep this function inlined. Move it to rte_mempool.c. We need to export the function for when compiling with shared libraries + debug. We also need to keep the macro, because we don't want to call an empty function when debug is disabled. Signed-off-by: Olivier Matz ---

[dpdk-dev] [PATCH v3 02/35] mempool: rename element size variables

2016-05-18 Thread Olivier Matz
This commit replaces elt_size by total_elt_size when appropriate. In some mempool functions, we use the size of the elements as arguments or variables. There is a confusion between the size including or not including the header and trailer. To avoid this confusion: - update the API documentation

[dpdk-dev] [PATCH v3 01/35] mempool: rework comments and style

2016-05-18 Thread Olivier Matz
No functional change, just fix some comments and styling issues. Also avoid to duplicate comments between rte_mempool_create() and rte_mempool_xmem_create(). Signed-off-by: Olivier Matz Acked by: Keith Wiles --- lib/librte_mempool/rte_mempool.c | 17 ++--

[dpdk-dev] [PATCH v3 00/35] mempool: rework memory allocation

2016-05-18 Thread Olivier Matz
This series is a rework of mempool. For those who don't want to read all the cover letter, here is a sumary: - it is not possible to allocate large mempools if there is not enough contiguous memory, this series solves this issue - introduce new APIs with less arguments: "create, populate,

[dpdk-dev] [PATCH 2/2] rte_kni: Add documentation for the mempool capacity.

2016-05-18 Thread Ferruh Yigit
On 5/14/2016 7:22 PM, Alex Wang wrote: > From: Alex Wang > > Function like 'rte_kni_rx_burst()' keeps allocating > 'MAX_MBUF_BURST_NUM' mbufs to kni fifo queue unless the > queue's capacity ('KNI_FIFO_COUNT_MAX') is reached. So, > if the mempool is under-provisioned, user may run into > "Out of

[dpdk-dev] [PATCH v4] eal: make hugetlb initialization more robust

2016-05-18 Thread David Marchand
On Wed, May 18, 2016 at 10:06 AM, Sergio Gonzalez Monroy wrote: > On 17/05/2016 17:40, Thomas Monjalon wrote: >> >> 2016-05-12 00:44, Jianfeng Tan: >>> >>> This patch adds an option, --huge-trybest, to use a recover mechanism to >>> the case that there are not so many hugepages (declared in

[dpdk-dev] [PATCH v4] eal: make hugetlb initialization more robust

2016-05-18 Thread David Marchand
Hello Sergio, On Wed, May 18, 2016 at 9:56 AM, Sergio Gonzalez Monroy wrote: > On 17/05/2016 17:39, David Marchand wrote: >>> diff --git a/lib/librte_eal/linuxapp/eal/eal_memory.c >>> b/lib/librte_eal/linuxapp/eal/eal_memory.c >>> index 5b9132c..8c77010 100644 >>> ---

[dpdk-dev] [PATCH 1/2] rte_kni: Fix documentation.

2016-05-18 Thread Ferruh Yigit
On 5/14/2016 7:22 PM, Alex Wang wrote: > From: Alex Wang > > The 'mbufs' alloc/free descriptions for 'rte_kni_tx_burst()' > and 'rte_kni_rx_burst()' should be inverted. > > Signed-off-by: Alex Wang > --- > lib/librte_kni/rte_kni.h | 8 > 1 file changed, 4 insertions(+), 4

[dpdk-dev] memory allocation requirements

2016-05-18 Thread Alejandro Lucero
On Wed, Apr 13, 2016 at 5:03 PM, Thomas Monjalon wrote: > After looking at the patches for container support, it appears that > some changes are needed in the memory management: > http://thread.gmane.org/gmane.comp.networking.dpdk.devel/32786/focus=32788 > > I think it is time to collect what

[dpdk-dev] [RFC PATCH v2 0/3] Remove string operations from xstats

2016-05-18 Thread Remy Horton
On 16/05/2016 11:42, Tahhan, Maryam wrote: [..] > > Looks Great overall. Is there a need to update prog_guide/poll_mode_drv.rst > with the new mods? Yes it will need updating, as the description of rte_eth_xstats is now incorrect. Will fix in v3.. ..Remy

[dpdk-dev] [PATCH v2 3/3] doc: add keepalive enhancement documentation

2016-05-18 Thread Remy Horton
Signed-off-by: Remy Horton --- doc/guides/rel_notes/release_16_07.rst | 5 + 1 file changed, 5 insertions(+) diff --git a/doc/guides/rel_notes/release_16_07.rst b/doc/guides/rel_notes/release_16_07.rst index f6d543c..bc269b0 100644 --- a/doc/guides/rel_notes/release_16_07.rst +++

[dpdk-dev] [PATCH v2 2/3] examples/l2fwd-keepalive: add IPC liveness reporting

2016-05-18 Thread Remy Horton
Signed-off-by: Remy Horton --- examples/Makefile | 1 + examples/l2fwd-keepalive/Makefile | 4 +- examples/l2fwd-keepalive/ka-agent/Makefile | 51 ++ examples/l2fwd-keepalive/ka-agent/main.c | 150 +

[dpdk-dev] [PATCH v2 1/3] eal: add new keepalive states & callback hooks

2016-05-18 Thread Remy Horton
Signed-off-by: Remy Horton --- examples/Makefile | 2 +- lib/librte_eal/bsdapp/eal/rte_eal_version.map | 7 lib/librte_eal/common/include/rte_keepalive.h | 55 - lib/librte_eal/common/rte_keepalive.c | 48

[dpdk-dev] [PATCH v2 0/3] Keep-alive enhancements

2016-05-18 Thread Remy Horton
This patchset adds enhancements to the keepalive core monitoring and reporting sub-system. The first is support for idled (sleeping and frequency-stepped) CPU cores, and the second is support for applications to be notified of active as well as faulted cores. The latter is to allow core state to

[dpdk-dev] [PATCH] qede: fix build with gcc >= 6.0

2016-05-18 Thread Panu Matilainen
On 05/14/2016 04:06 AM, Rasesh Mody wrote: >> From: Thomas Monjalon [mailto:thomas.monjalon at 6wind.com] >> Sent: Friday, May 13, 2016 8:38 AM >> >> 2016-05-10 13:01, Panu Matilainen: >>> With gcc >= 6.0, qede base driver fails to build with: >>> drivers/net/qede/base/ecore_cxt.c: In function

[dpdk-dev] [PATCH] librte_ether: use RTE_ETH_VALID_PORTID_OR_ERR_RET to check port_id

2016-05-18 Thread Thomas Monjalon
2016-05-17 22:02, Mauricio V?squez: > On Fri, May 13, 2016 at 6:20 PM, Thomas Monjalon 6wind.com> > wrote: > > 2016-04-29 17:23, Mauricio Vasquez B: > > > The RTE_ETH_VALID_PORTID_OR_ERR_RET macro is used in some places > > > to check if a port id is valid or not. This commit makes use of it in >

[dpdk-dev] [RFC PATCH v2 1/3] rte: change xstats to use integer keys

2016-05-18 Thread Remy Horton
On 18/05/2016 09:31, Tahhan, Maryam wrote: [..] >> +eth_xstats_count_t xstats_count; >> +/**< Get number of extended statistics. */ > > Hi Remy > While reviewing the second patch in this patchset I noticed you aren't > actually using > eth_xstats_count_t xstats_count in the

[dpdk-dev] [PATCH v4] eal: make hugetlb initialization more robust

2016-05-18 Thread Sergio Gonzalez Monroy
On 17/05/2016 17:40, Thomas Monjalon wrote: > 2016-05-12 00:44, Jianfeng Tan: >> This patch adds an option, --huge-trybest, to use a recover mechanism to >> the case that there are not so many hugepages (declared in sysfs), which >> can be used. It relys on a mem access to fault-in hugepages, and

[dpdk-dev] [PATCH v4] eal: make hugetlb initialization more robust

2016-05-18 Thread Sergio Gonzalez Monroy
On 17/05/2016 17:39, David Marchand wrote: > Hello Jianfeng, > > On Thu, May 12, 2016 at 2:44 AM, Jianfeng Tan > wrote: >> This patch adds an option, --huge-trybest, to use a recover mechanism to >> the case that there are not so many hugepages (declared in sysfs), which >> can be used. It relys

[dpdk-dev] [RFC PATCH v2 3/3] examples/ethtool: add xstats display command

2016-05-18 Thread Tahhan, Maryam
> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Remy Horton > Sent: Friday, May 6, 2016 12:11 PM > To: dev at dpdk.org > Subject: [dpdk-dev] [RFC PATCH v2 3/3] examples/ethtool: add xstats > display command > > Signed-off-by: Remy Horton > --- Acked-by: Maryam Tahhan

[dpdk-dev] [RFC PATCH v2 2/3] drivers/net/ixgbe: change xstats to use integer id

2016-05-18 Thread Tahhan, Maryam
> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Remy Horton > Sent: Friday, May 6, 2016 12:11 PM > To: dev at dpdk.org > Subject: [dpdk-dev] [RFC PATCH v2 2/3] drivers/net/ixgbe: change xstats > to use integer id > > Signed-off-by: Remy Horton > --- Acked-by: Maryam Tahhan

[dpdk-dev] [RFC PATCH v2 1/3] rte: change xstats to use integer keys

2016-05-18 Thread Tahhan, Maryam
>uint8_t stat_idx, > @@ -1427,6 +1447,10 @@ struct eth_dev_ops { > eth_stats_reset_t stats_reset; /**< Reset generic device > statistics. */ > eth_xstats_get_t xstats_get;/**< Get extended device > statistics. */ >

[dpdk-dev] [PATCH 4/4] pmd_hw_support.py: Add tool to query binaries for hw support information

2016-05-18 Thread Neil Horman
On Wed, May 18, 2016 at 02:48:30PM +0300, Panu Matilainen wrote: > On 05/16/2016 11:41 PM, Neil Horman wrote: > > This tool searches for the primer sting PMD_DRIVER_INFO= in any ELF binary, > > and, if found parses the remainder of the string as a json encoded string, > > outputting the results in

[dpdk-dev] [PATCH v3] mbuf: decrease refcnt when detaching

2016-05-18 Thread Hiroyuki Mikita
The rte_pktmbuf_detach() function should decrease refcnt on a direct buffer. Signed-off-by: Hiroyuki Mikita --- v3: * fixed rte_pktmbuf_detach() to decrease refcnt. * free the direct mbuf when refcnt becomes 0. * added this issue to Resolved Issues in release notes. v2: * introduced a new

[dpdk-dev] [PATCH v2] mbuf: decrease refcnt when detaching

2016-05-18 Thread Hiroyuki MIKITA
I think this behavior is not part of the API, it is a bug. I agree that detach() frees the direct mbuf when refcnt becomes 0, Konstantin suggests. It is a right behavior of reference counting. Regards, Hiroyuki 2016-05-18 0:45 GMT+09:00 Ananyev, Konstantin : > > >> -Original Message- >>