Re: [dpdk-dev] [PATCH dpdk-dev v2] mempool: sort the rte_mempool_ops by name

2020-03-05 Thread Olivier Matz
use a trailing */ on a separate line #153: FILE: lib/librte_mempool/rte_mempool_ops.c:76: + * lib initiation will not affect rte_mempool_ops index. */ > + qsort(rte_mempool_ops_table.ops, rte_mempool_ops_table.num_ops, > + sizeof(rte_mempool_ops_table.ops[0]), compare_mempool_ops); > + > rte_spinlock_unlock(&rte_mempool_ops_table.sl); > > return ops_index; > -- > 1.8.3.1 > Then, Acked-by: Olivier Matz Thanks!

Re: [dpdk-dev] [dpdk-techboard] [PATCH] introduce dpdk-kmods repository

2020-02-26 Thread Olivier Matz
On Mon, Feb 17, 2020 at 05:46:42PM +0100, Thomas Monjalon wrote: > Write first lines of the README file about the intent (upstream first) > and the licenses allowed so far in DPDK. > > Signed-off-by: Thomas Monjalon Acked-by: Olivier Matz

Re: [dpdk-dev] Fwd: Fwd: high latency detected in IP pipeline example

2020-02-19 Thread Olivier Matz
Hi Victor, I have no experience with ip_pipeline. I can at least say that this latency is much higher that what you should get. My initial thought was that you were using several pthreads bound to the same core, but from what I read in your first mail, this is not the case. Do you have a simple

Re: [dpdk-dev] [PATCH] mbuf: fix to update documentation of QinQ stripped bit interpretation

2020-02-07 Thread Olivier Matz
Hi Somnath, On Fri, Feb 07, 2020 at 07:13:04PM +0530, Somnath Kotur wrote: > Olivier, > > On Thu, Feb 6, 2020 at 10:55 PM Olivier Matz wrote: > > > > Hi Somnath, > > > > Sorry for the delay, please find some comments below. > > > > I suggest the fo

Re: [dpdk-dev] [PATCH] mbuf: fix to update documentation of QinQ stripped bit interpretation

2020-02-06 Thread Olivier Matz
Hi Somnath, Sorry for the delay, please find some comments below. I suggest the following title instead: mbuf: extend meaning of QinQ stripped bit On Mon, Jan 06, 2020 at 02:04:23PM +0530, Somnath Kotur wrote: > Certain hardware may be able to strip and/or save only the outermost > VLAN inste

Re: [dpdk-dev] [PATCH v3] mbuf: display more fields in dump

2020-02-06 Thread Olivier Matz
On Wed, Jan 22, 2020 at 09:39:56AM -0800, Stephen Hemminger wrote: > The rte_pktmbuf_dump should display offset, refcount, and vlan > info since these are often useful during debugging. > > Signed-off-by: Stephen Hemminger > Acked-by: Andrew Rybchenko Acked-by: Olivier Matz

Re: [dpdk-dev] [PATCH] mbuf: fix pinned memory free routine style issue

2020-02-06 Thread Olivier Matz
On Wed, Jan 22, 2020 at 08:50:35AM +, Viacheslav Ovsiienko wrote: > Minor style issue is fixed. > > Fixes: 6c8e50c2e549 ("mbuf: create pool with external memory buffers") > > Signed-off-by: Viacheslav Ovsiienko Acked-by: Olivier Matz

Re: [dpdk-dev] [PATCH] app/test: add test for mbuf with pinned external buffer

2020-02-06 Thread Olivier Matz
Hi, On Fri, Jan 24, 2020 at 08:25:18PM +, Viacheslav Ovsiienko wrote: > This patch adds unit test for the mbufs allocated from > the special pool with pinned external data buffers. > > The pinned buffer mbufs are tested in the same way as > regular ones with taking into account some specifics

Re: [dpdk-dev] app/test: unit test problem with testing mbuf in forked child process

2020-02-05 Thread Olivier Matz
Hi Slava, On Wed, Jan 29, 2020 at 12:31:35PM +, Slava Ovsiienko wrote: > While working on the unit test for the mbuf with pinned external buffers I > found that: > app/test/test_mbuf.c: > - test_failing_mbuf_sanity_check() > - verify_mbuf_check_panics(buf) > - fork() > - child pro

[dpdk-dev] Minutes of Technical Board Meeting, 2020-01-29

2020-01-31 Thread Olivier Matz
Minutes of Technical Board Meeting, 2020-01-29 Members Attending - - Bruce - Ferruh - Hemant - Honnappa - Jerin - Kevin - Konstantin - Olivier (chair) - Stephen - Thomas NOTE: The technical board meetings every second Wednesday on IRC channel #dpdk-board, at 3pm UTC. Meetings are

Re: [dpdk-dev] [PATCH] ring: fix namespace prefix of inline functions

2020-01-29 Thread Olivier Matz
gurable element size") > > Reported-by: David Marchand > Signed-off-by: Thomas Monjalon Acked-by: Olivier Matz

Re: [dpdk-dev] [PATCH v5 1/5] mbuf: introduce routine to get private mbuf pool flags

2020-01-21 Thread Olivier Matz
On Tue, Jan 21, 2020 at 09:13:48AM +, Slava Ovsiienko wrote: > > -Original Message- > > From: dev On Behalf Of Slava Ovsiienko > > Sent: Tuesday, January 21, 2020 10:24 > > To: Olivier Matz > > Cc: Stephen Hemminger ; dev@dpdk.org; > > Matan Az

Re: [dpdk-dev] [PATCH v5 1/5] mbuf: introduce routine to get private mbuf pool flags

2020-01-21 Thread Olivier Matz
tine rte_pktmbuf_priv_flags is introduced to fetch the flags > > > from the mbuf memory pool private structure in unified fashion. > > > > > > Signed-off-by: Viacheslav Ovsiienko > > > Acked-by: Olivier Matz > > > --- > > > lib/librte_mbuf/rt

Re: [dpdk-dev] [PATCH v5 3/5] mbuf: create packet pool with external memory buffers

2020-01-20 Thread Olivier Matz
d external buffers. */ > +struct rte_pktmbuf_extmem_init_ctx { > + const struct rte_pktmbuf_extmem *ext_mem; /* descriptor array. */ > + unsigned int ext_num; /* number of descriptors in array. */ > + unsigned int ext; /* loop descriptor index. */ > + size_t off; /* loop buffer offset. */ > +}; Can this definition be private in the .c ? Apart from this, Acked-by: Olivier Matz

Re: [dpdk-dev] [PATCH v5 0/5] mbuf: detach mbuf with pinned external buffer

2020-01-20 Thread Olivier Matz
On Mon, Jan 20, 2020 at 05:30:45PM +, Slava Ovsiienko wrote: > The unit test (as part of test_mbuf application) will be provided as > separated patch. OK, thanks

Re: [dpdk-dev] [PATCH v5 2/5] mbuf: detach mbuf with pinned external buffer

2020-01-20 Thread Olivier Matz
before mbuf freeing. */ > + rte_mbuf_ext_refcnt_set(shinfo, 1); > + return 0; > +} > + > +/** > * Decrease reference counter and unlink a mbuf segment > * > * This function does the same than a free, except that it does not Apart from this, Acked-by: Olivier Matz

Re: [dpdk-dev] [PATCH v4 2/5] mbuf: detach mbuf with pinned external buffer

2020-01-20 Thread Olivier Matz
Hi, On Mon, Jan 20, 2020 at 03:41:10PM +, Slava Ovsiienko wrote: > Hi, Olivier > > Thanks a lot for the thorough review. > There are some answers to comments, please, see below. > > > > > > > /** > > > + * @internal version of rte_pktmbuf_detach() to be used on mbuf freeing. > > > > -versi

Re: [dpdk-dev] [PATCH v4 4/5] app/testpmd: add mempool with external data buffers

2020-01-20 Thread Olivier Matz
t; pkt->vlan_tci_outer = vlan_tci_outer; > pkt->l2_len = sizeof(struct rte_ether_hdr); This shows that we have to be careful when using a mempool with external memory pinned mbufs. Maybe that's something that should be mentionned in the release note? That's not the first time I'm asking myself if ol_flags shouldn't be splitted in ol_flags and flags. Certainly something to think about for next ABI breakage release. Acked-by: Olivier Matz

Re: [dpdk-dev] [PATCH v4 3/5] mbuf: create packet pool with external memory buffers

2020-01-20 Thread Olivier Matz
On Thu, Jan 16, 2020 at 01:04:27PM +, Viacheslav Ovsiienko wrote: > The dedicated routine rte_pktmbuf_pool_create_extbuf() is > provided to create mbuf pool with data buffers located in > the pinned external memory. The application provides the > external memory description and routine initiali

Re: [dpdk-dev] [PATCH v4 2/5] mbuf: detach mbuf with pinned external buffer

2020-01-20 Thread Olivier Matz
Hi Slava, Some comments inline. On Thu, Jan 16, 2020 at 01:04:26PM +, Viacheslav Ovsiienko wrote: > Update detach routine to check the mbuf pool type. > Introduce the special internal version of detach routine to handle > the special case of pinned external bufferon mbuf freeing. > > Signed-

Re: [dpdk-dev] [PATCH v4] mempool: remove memory wastage on non x86

2020-01-20 Thread Olivier Matz
gt; > 320 -> 320 +0% > > 384 -> 448 +16% > > ... > > 2304 -> 2368 +2.7% (~mbuf size) > > > > Additional details: > > https://www.mail-archive.com/dev@dpdk.org/msg149157.html > > > > Signed-off-by: Jerin Jacob > > Reviewed-by: Gavin Hu > > Ping for merge. Acked-by: Olivier Matz

Re: [dpdk-dev] [PATCH v4 1/5] mbuf: introduce routine to get private mbuf pool flags

2020-01-20 Thread Olivier Matz
On Thu, Jan 16, 2020 at 01:04:25PM +, Viacheslav Ovsiienko wrote: > The routine rte_pktmbuf_priv_flags is introduced to fetch > the flags from the mbuf memory pool private structure > in unified fashion. > > Signed-off-by: Viacheslav Ovsiienko Acked-by: Olivier Matz

Re: [dpdk-dev] [PATCH v9 0/6] lib/ring: APIs to support custom element size

2020-01-17 Thread Olivier Matz
On Wed, Jan 15, 2020 at 11:25:05PM -0600, Honnappa Nagarahalli wrote: > The current rte_ring hard-codes the type of the ring element to 'void *', > hence the size of the element is hard-coded to 32b/64b. Since the ring > element type is not an input to rte_ring APIs, it results in couple > of issue

Re: [dpdk-dev] [PATCH v9 4/6] test/ring: modify perf test cases to use rte_ring_xxx_elem APIs

2020-01-17 Thread Olivier Matz
On Wed, Jan 15, 2020 at 11:25:09PM -0600, Honnappa Nagarahalli wrote: > Adjust the performance test cases to test rte_ring_xxx_elem APIs. > > Signed-off-by: Honnappa Nagarahalli > Reviewed-by: Gavin Hu > --- > app/test/test_ring_perf.c | 454 +++--- > 1 file chan

Re: [dpdk-dev] [PATCH v9 3/6] test/ring: add functional tests for rte_ring_xxx_elem APIs

2020-01-17 Thread Olivier Matz
On Wed, Jan 15, 2020 at 11:25:08PM -0600, Honnappa Nagarahalli wrote: > Add basic infrastructure to test rte_ring_xxx_elem APIs. > Adjust the existing test cases to test for various ring > element sizes. > > Signed-off-by: Honnappa Nagarahalli > Reviewed-by: Gavin Hu > --- > app/test/test_ring.

Re: [dpdk-dev] [PATCH v9 2/6] lib/ring: apis to support configurable element size

2020-01-17 Thread Olivier Matz
Hi Honnappa, On Wed, Jan 15, 2020 at 11:25:07PM -0600, Honnappa Nagarahalli wrote: > Current APIs assume ring elements to be pointers. However, in many > use cases, the size can be different. Add new APIs to support > configurable ring element sizes. > > Signed-off-by: Honnappa Nagarahalli > Rev

[dpdk-dev] [PATCH v2 2/3] doc: announce API change for mempool IOVA populate

2020-01-17 Thread Olivier Matz
Starting from v20.05, rte_mempool_populate_iova() will return -ENOBUFS. The ABI will be preserved through symbol versioning until 20.11. Signed-off-by: Olivier Matz --- doc/guides/rel_notes/deprecation.rst | 5 + 1 file changed, 5 insertions(+) diff --git a/doc/guides/rel_notes

[dpdk-dev] [PATCH v2 3/3] [20.05] mempool: return 0 if area is too small on populate

2020-01-17 Thread Olivier Matz
for binary applications. Signed-off-by: Olivier Matz --- examples/ntb/ntb_fwd.c | 2 +- lib/librte_mempool/meson.build | 1 + lib/librte_mempool/rte_mempool.c | 76 ++ lib/librte_mempool/rte_mempool.h | 14 ++-- lib

[dpdk-dev] [PATCH v2 0/3] mempool: fix mempool virt populate with small chunks

2020-01-17 Thread Olivier Matz
of the patchset. [1] http://patchwork.dpdk.org/patch/64369/ Olivier Matz (3): mempool: fix mempool virt populate with small chunks doc: announce API change for mempool IOVA populate mempool: return 0 if area is too small on populate doc/guides/rel_notes/deprecation.rst | 5 ++ ex

[dpdk-dev] [PATCH v2 1/3] mempool: fix mempool virt populate with small chunks

2020-01-17 Thread Olivier Matz
be an API/ABI change, only do this modification internally for now. Fixes: 354788b60cfd ("mempool: allow populating with unaligned virtual area") Cc: sta...@dpdk.org Signed-off-by: Olivier Matz Tested-by: Anatoly Burakov Tested-by: Zhang Alvin --- lib/librte_mempool/rte_memp

[dpdk-dev] [PATCH] mempool: fix anonymous populate

2020-01-17 Thread Olivier Matz
Fixes: aa10457eb4c2 ("mempool: make mempool populate and free api public") Fixes: 6780f72fb82f ("mempool: populate with anonymous memory") Fixes: 66e7ba0bad4c ("mempool: ensure mempool is initialized before populating") Cc: sta...@dpdk.org Signed-off-by: Olivier Matz --- li

Re: [dpdk-dev] [PATCH v2] mempool: fix slow allocation of large mempools

2020-01-17 Thread Olivier Matz
On Fri, Jan 17, 2020 at 10:51:49AM +0100, Olivier Matz wrote: > When allocating a mempool which is larger than the largest > available area, it can take a lot of time: > > a- the mempool calculate the required memory size, and tries >to allocate it, it fails > b- then it tri

[dpdk-dev] [PATCH v2] mempool: fix slow allocation of large mempools

2020-01-17 Thread Olivier Matz
Cc: sta...@dpdk.org Signed-off-by: Olivier Matz --- v2: * fix missing check on mz == NULL condition lib/librte_mempool/rte_mempool.c | 29 - 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/lib/librte_mempool/rte_mempool.c b/lib/librte_mempool/rte_mempo

Re: [dpdk-dev] [PATCH] mempool: fix slow allocation of large mempools

2020-01-17 Thread Olivier Matz
Hi, On Fri, Jan 10, 2020 at 12:53:24PM +0300, Andrew Rybchenko wrote: > On 1/9/20 4:27 PM, Olivier Matz wrote: > > When allocating a mempool which is larger than the largest > > available area, it can take a lot of time: > > > > a- the mempool calculate the requ

Re: [dpdk-dev] [PATCH v3 2/4] mbuf: create packet pool with external memory buffers

2020-01-14 Thread Olivier Matz
On Tue, Jan 14, 2020 at 09:15:03AM +, Viacheslav Ovsiienko wrote: > The dedicated routine rte_pktmbuf_pool_create_extbuf() is > provided to create mbuf pool with data buffers located in > the pinned external memory. The application provides the > external memory description and routine initiali

Re: [dpdk-dev] [PATCH v3 1/4] mbuf: detach mbuf with pinned external buffer

2020-01-14 Thread Olivier Matz
Hi Viacheslav, Please see some comments below. On Tue, Jan 14, 2020 at 09:15:02AM +, Viacheslav Ovsiienko wrote: > Update detach routine to check the mbuf pool type. > > Signed-off-by: Shahaf Shuler > Signed-off-by: Viacheslav Ovsiienko > --- > lib/librte_mbuf/rte_mbuf.h | 64 > +

Re: [dpdk-dev] [PATCH] mempool: fix slow allocation of large mempools

2020-01-09 Thread Olivier Matz
Hi Ali, On Thu, Jan 09, 2020 at 04:06:53PM +, Ali Alnubani wrote: > Hi Olivier, > > > -Original Message- > > From: dev On Behalf Of Olivier Matz > > Sent: Thursday, January 9, 2020 3:28 PM > > To: dev@dpdk.org > > Cc: Andrew Rybchenko ; A

Re: [dpdk-dev] [PATCH] mempool: fix mempool virt populate with small chunks

2020-01-09 Thread Olivier Matz
On Thu, Jan 09, 2020 at 01:52:41PM +, Burakov, Anatoly wrote: > On 09-Jan-20 1:27 PM, Olivier Matz wrote: > > To populate a mempool with a virtual area, the mempool code calls > > rte_mempool_populate_iova() for each iova-contiguous area. It happens > > (rarely) that this

Re: [dpdk-dev] [PATCH] mempool: fix mempool virt populate with small chunks

2020-01-09 Thread Olivier Matz
On Thu, Jan 09, 2020 at 02:40:06PM +0100, David Marchand wrote: > On Thu, Jan 9, 2020 at 2:27 PM Olivier Matz wrote: > > > > To populate a mempool with a virtual area, the mempool code calls > > rte_mempool_populate_iova() for each iova-contiguous area. It happens > >

Re: [dpdk-dev] Inconsistent behavior of mempool with regards to hugepage allocation

2020-01-09 Thread Olivier Matz
On Tue, Jan 07, 2020 at 01:06:01PM +, Burakov, Anatoly wrote: > On 27-Dec-19 11:11 AM, Olivier Matz wrote: > > Hi Bao-Long, > > > > On Fri, Dec 27, 2019 at 06:05:57PM +0800, Bao-Long Tran wrote: > > > Hi Olivier, > > > > > > &

[dpdk-dev] [PATCH] mempool: fix slow allocation of large mempools

2020-01-09 Thread Olivier Matz
Cc: sta...@dpdk.org Signed-off-by: Olivier Matz --- lib/librte_mempool/rte_mempool.c | 29 - 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/lib/librte_mempool/rte_mempool.c b/lib/librte_mempool/rte_mempool.c index bda361ce6..03c8d984c 100644 ---

[dpdk-dev] [PATCH] mempool: fix mempool virt populate with small chunks

2020-01-09 Thread Olivier Matz
would be an API change, add a compat wrapper to keep the current API unchanged. The wrapper will be removed for 20.11. Fixes: 354788b60cfd ("mempool: allow populating with unaligned virtual area") Cc: sta...@dpdk.org Signed-off-by: Olivier Matz --- Is there a simple way to ensure tha

Re: [dpdk-dev] [PATCH] librte_ethdev: extend dpdk api led control to query capability

2020-01-08 Thread Olivier Matz
On Wed, Jan 08, 2020 at 12:12:11PM +, Ferruh Yigit wrote: > On 1/8/2020 9:42 AM, Olivier Matz wrote: > > On Wed, Jan 08, 2020 at 09:09:29AM +, Ferruh Yigit wrote: > >> On 1/8/2020 8:56 AM, David Marchand wrote: > >>> Hello Laurent, > >>> >

Re: [dpdk-dev] [PATCH] librte_ethdev: extend dpdk api led control to query capability

2020-01-08 Thread Olivier Matz
On Wed, Jan 08, 2020 at 09:09:29AM +, Ferruh Yigit wrote: > On 1/8/2020 8:56 AM, David Marchand wrote: > > Hello Laurent, > > > > Bonne année. > > > > Cc: maintainers. > > > > On Tue, Jan 7, 2020 at 3:57 PM Laurent Hardy > > wrote: > >> > >> In current led control API we have no way to kno

Re: [dpdk-dev] [PATCH v2] mbuf: display more fields in dump

2019-12-30 Thread Olivier Matz
On Fri, Dec 27, 2019 at 09:05:07AM -0800, Stephen Hemminger wrote: > On Fri, 27 Dec 2019 10:10:18 +0100 > Olivier Matz wrote: > > > Hi, > > > > On Thu, Dec 26, 2019 at 08:58:51AM -0800, Stephen Hemminger wrote: > > > On Thu, 26 Dec 2019 17:1

Re: [dpdk-dev] [PATCH] mempool: fix mempool obj alignment for non x86

2019-12-27 Thread Olivier Matz
Hi, On Sat, Dec 21, 2019 at 10:36:15AM +0530, Jerin Jacob wrote: > On Sat, Dec 21, 2019 at 2:37 AM Honnappa Nagarahalli > wrote: > > > > > > > > > From: Jerin Jacob > > > > > > > > > > The exiting optimize_object_size() function address the memory > > > > > object alignment constraint on x86 fo

Re: [dpdk-dev] [RFC PATCH] mbuf: fix to update documentation of PKT_RX_QINQ_STRIPPED

2019-12-27 Thread Olivier Matz
Hi, On Tue, Dec 24, 2019 at 12:53:21PM +0300, Andrew Rybchenko wrote: > On 12/24/19 6:16 AM, Somnath Kotur wrote: > > Given that we haven't heard any objection from anyone in a while on > > this ...can we get this in please? > > I'm sorry, but have you seen below? > It means that PKT_RX_QINQ_STRI

Re: [dpdk-dev] questions about new offload ethdev api

2019-12-27 Thread Olivier Matz
Hi, Few comments below. On Mon, Dec 16, 2019 at 11:39:05AM +0300, Andrew Rybchenko wrote: > On 12/10/19 9:07 PM, Ferruh Yigit wrote: > > On 1/23/2018 2:34 PM, Shahaf Shuler wrote: > >> Tuesday, January 23, 2018 3:53 PM, Olivier Matz: > > > > <..

Re: [dpdk-dev] Inconsistent behavior of mempool with regards to hugepage allocation

2019-12-27 Thread Olivier Matz
Hi Bao-Long, On Fri, Dec 27, 2019 at 06:05:57PM +0800, Bao-Long Tran wrote: > Hi Olivier, > > > On 27 Dec 2019, at 4:11 PM, Olivier Matz wrote: > > > > On Thu, Dec 26, 2019 at 04:45:24PM +0100, Olivier Matz wrote: > >> Hi Bao-Long, > >> > >>

Re: [dpdk-dev] [PATCH v2] mbuf: display more fields in dump

2019-12-27 Thread Olivier Matz
Hi, On Thu, Dec 26, 2019 at 08:58:51AM -0800, Stephen Hemminger wrote: > On Thu, 26 Dec 2019 17:15:39 +0100 > Olivier Matz wrote: > > > Hi, > > > > On Thu, Nov 21, 2019 at 10:30:55AM -0800, Stephen Hemminger wrote: > > > The rte_pktmbuf_dump should display o

Re: [dpdk-dev] [RFC v2] mlx5/net: hint PMD not to inline packet

2019-12-27 Thread Olivier Matz
Hi Viacheslav, On Wed, Dec 11, 2019 at 05:01:33PM +, Viacheslav Ovsiienko wrote: > Some PMDs inline the mbuf data buffer directly to device transmit descriptor. > This is in order to save the overhead of the PCI headers imposed when the > device DMA reads the data by buffer pointer. For some d

Re: [dpdk-dev] Inconsistent behavior of mempool with regards to hugepage allocation

2019-12-27 Thread Olivier Matz
On Thu, Dec 26, 2019 at 04:45:24PM +0100, Olivier Matz wrote: > Hi Bao-Long, > > On Mon, Dec 23, 2019 at 07:09:29PM +0800, Bao-Long Tran wrote: > > Hi, > > > > I'm not sure if this is a bug, but I've seen an inconsistency in the > > behavior > >

Re: [dpdk-dev] [PATCH v2 3/3] mbuf: use structure marker typedef in eal

2019-12-26 Thread Olivier Matz
On Thu, Dec 19, 2019 at 04:55:07PM +0530, jer...@marvell.com wrote: > From: Jerin Jacob > > Use new marker typedef available in EAL and remove private marker > typedef. > > Signed-off-by: Jerin Jacob Acked-by: Olivier Matz Thanks

Re: [dpdk-dev] [PATCH] lib: fix unnecessary boolean casts

2019-12-26 Thread Olivier Matz
mempool: rename functions with confusing names") > Cc: olivier.m...@6wind.com > Cc: bruce.richard...@intel.com > Cc: sta...@dpdk.org > > Signed-off-by: Ciara Power Acked-by: Olivier Matz Thanks

Re: [dpdk-dev] [PATCH v2] mbuf: display more fields in dump

2019-12-26 Thread Olivier Matz
Hi, On Thu, Nov 21, 2019 at 10:30:55AM -0800, Stephen Hemminger wrote: > The rte_pktmbuf_dump should display offset, refcount, and vlan > info since these are often useful during debugging. > > Signed-off-by: Stephen Hemminger > --- > v2 - remove casts, change in_port to port > the refcount

Re: [dpdk-dev] Inconsistent behavior of mempool with regards to hugepage allocation

2019-12-26 Thread Olivier Matz
Hi Bao-Long, On Mon, Dec 23, 2019 at 07:09:29PM +0800, Bao-Long Tran wrote: > Hi, > > I'm not sure if this is a bug, but I've seen an inconsistency in the behavior > of DPDK with regards to hugepage allocation for rte_mempool. Basically, for > the > same mempool size, the number of hugepages al

[dpdk-dev] [PATCH] mbuf: document how to set length when attaching ext buffer

2019-12-26 Thread Olivier Matz
From: Jörg Thalheim Enhance API documentation of rte_pktmbuf_attach_extbuf() to explain that the attached mbuf is initialized with length = 0. Link: https://bugs.dpdk.org/show_bug.cgi?id=362 Signed-off-by: Jörg Thalheim Signed-off-by: Olivier Matz --- Hi, This patch is a slight reword of a

Re: [dpdk-dev] [RFC] mempool: introduce indexed memory pool

2019-12-26 Thread Olivier Matz
Hi Xueming, On Thu, Oct 17, 2019 at 06:55:01AM +, Xueming Li wrote: > Indexed memory pool manages memory entries by index, allocation from > pool returns both memory pointer and index(ID). users save ID as u32 > or less(u16) instead of traditional 8 bytes pointer. Memory could be > retrieved f

Re: [dpdk-dev] [PATCH v4] mbuf: extend pktmbuf pool private structure

2019-11-25 Thread Olivier Matz
iod. > > There is already one use case for those reserved bits[1] > > The reserved field should be set to 0 by the user. > > [1] > https://patches.dpdk.org/patch/63077/ > > Signed-off-by: Shahaf Shuler Acked-by: Olivier Matz

Re: [dpdk-dev] [PATCH v3] mbuf: extend pktmbuf pool private structure

2019-11-25 Thread Olivier Matz
help the users to anticipate, so they are notified before triggering the assert. Then, Acked-by: Olivier Matz

Re: [dpdk-dev] mbuf autotest fails with 19.11-rc3

2019-11-22 Thread Olivier Matz
Hi Jerin, On Thu, Nov 21, 2019 at 12:24:24PM +, Jerin Jacob Kollanukkaran wrote: > mbuf autotest fails with 19.11-rc3 > > $ echo "mbuf_autotest" | sudo ./build/app/test/dpdk-test -c 0x3 > > EAL: Detected 56 lcore(s) > EAL: Detected 2 NUMA nodes > EAL: Multi-process socket /var/run/dpdk/rte/m

Re: [dpdk-dev] [PATCH v2] mbuf: extend pktmbuf pool private structure

2019-11-21 Thread Olivier Matz
On Thu, Nov 21, 2019 at 12:28:18PM +, Shahaf Shuler wrote: > With the API and ABI freeze ahead, it will be good to reserve > some bits on the private structure for future use. > > Otherwise we will potentially need to maintain two different > private structure during 2020 period. > > There is

Re: [dpdk-dev] [PATCH] mbuf: extend pktmbuf pool private structure

2019-11-21 Thread Olivier Matz
Hi, On Wed, Nov 20, 2019 at 07:56:14AM -0800, Stephen Hemminger wrote: > On Wed, 20 Nov 2019 07:01:26 + > Shahaf Shuler wrote: > > > Wednesday, November 20, 2019 1:51 AM, Stephen Hemminger: > > > Subject: Re: [dpdk-dev] [PATCH] mbuf: extend pktmbuf pool private > > > structure > > > > > > O

Re: [dpdk-dev] [PATCH] mem: clarify documentation for rte_mem_virt2iova

2019-11-18 Thread Olivier Matz
; as PA mode). > > Add a note to API documentation indicating the above. > > Signed-off-by: Anatoly Burakov Reviewed-by: Olivier Matz

Re: [dpdk-dev] [PATCH 2/2] mempool: remove check for bad IOVA when populating

2019-11-15 Thread Olivier Matz
check for > this in the first place. > > Fixes: 950e8fb4e194 ("mem: allow registering external memory areas") > Cc: sta...@dpdk.org > > Signed-off-by: Anatoly Burakov Acked-by: Olivier Matz

Re: [dpdk-dev] [PATCH 1/2] mempool: use actual IOVA addresses when populating

2019-11-15 Thread Olivier Matz
le in most cases. > Cc: sta...@dpdk.org > > Signed-off-by: Anatoly Burakov Acked-by: Olivier Matz

Re: [dpdk-dev] time taken for allocation of mempool.

2019-11-13 Thread Olivier Matz
"perf top" (https://perf.wiki.kernel.org/index.php/Main_Page) to see where you spend the time. By using "perf record" / "perf report" with options, you can also analyze the call stack. Please share your results, especially comparison between 17.05 and 18.11. Thanks,

Re: [dpdk-dev] time taken for allocation of mempool.

2019-11-13 Thread Olivier Matz
Hi Venu, On Wed, Nov 13, 2019 at 10:42:07AM +0530, Venumadhav Josyula wrote: > Hi, > > Few more points > > Operating system : Centos 7.6 > Logging mechanism : syslog > > We have logged using syslog before the call and syslog after the call. > > Thanks & Regards > Venu > > On Wed, 13 Nov 2019

Re: [dpdk-dev] [PATCH] cmdline: remove unnecessary #ifdef

2019-11-12 Thread Olivier Matz
On Fri, Nov 08, 2019 at 10:00:35AM -0800, Stephen Hemminger wrote: > The #ifdef to conditionally include on BSD > is unnecessary. It is harmless to include the header on other > OS's. An extra include is better than an #ifdef. > > Signed-off-by: Stephen Hemminger Ac

Re: [dpdk-dev] [PATCH] cmdline: replace FreeBSD ifdef for IP address parsing

2019-11-08 Thread Olivier Matz
her benefits. > > Signed-off-by: Thomas Monjalon Acked-by: Olivier Matz

Re: [dpdk-dev] [PATCH v4 0/7] mempool: avoid objects allocations across pages

2019-11-05 Thread Olivier Matz
On Tue, Nov 05, 2019 at 04:36:59PM +0100, Olivier Matz wrote: > KNI supposes that mbufs are contiguous in kernel virtual memory. This > may not be true when using the IOVA=VA mode. To fix this, a possibility > is to ensure that objects do not cross page boundaries in mempool. This &

[dpdk-dev] [PATCH v4 1/7] mempool: allow unaligned addr/len in populate virt

2019-11-05 Thread Olivier Matz
rte_mempool_populate_virt() currently requires that both addr and length are page-aligned. Remove this uneeded constraint which can be annoying with big hugepages (ex: 1GB). Signed-off-by: Olivier Matz Reviewed-by: Andrew Rybchenko Acked-by: Nipun Gupta --- lib/librte_mempool/rte_mempool.c

[dpdk-dev] [PATCH v4 3/7] mempool: remove optimistic IOVA-contiguous allocation

2019-11-05 Thread Olivier Matz
: Olivier Matz Reviewed-by: Andrew Rybchenko Acked-by: Nipun Gupta --- lib/librte_mempool/rte_mempool.c | 47 ++-- 1 file changed, 8 insertions(+), 39 deletions(-) diff --git a/lib/librte_mempool/rte_mempool.c b/lib/librte_mempool/rte_mempool.c index 4e0d576f5..213e574fc

[dpdk-dev] [PATCH v4 6/7] mempool: prevent objects from being across pages

2019-11-05 Thread Olivier Matz
When populating a mempool, ensure that objects are not located across several pages, except if user did not request iova contiguous objects. Signed-off-by: Vamsi Krishna Attunuru Signed-off-by: Olivier Matz Acked-by: Nipun Gupta Acked-by: Andrew Rybchenko --- drivers/mempool/bucket

[dpdk-dev] [PATCH v4 0/7] mempool: avoid objects allocations across pages

2019-11-05 Thread Olivier Matz
issing change in rte_mempool_op_calc_mem_size_default() * allow unaligned addr/len in populate virt * better split patches * try to better explain the change * use DPDK align macros when relevant Olivier Matz (7): mempool: allow unaligned addr/len in populate virt mempool: reduce wasted spa

[dpdk-dev] [PATCH v4 4/7] mempool: introduce function to get mempool page size

2019-11-05 Thread Olivier Matz
In rte_mempool_populate_default(), we determine the page size, which is needed for calc_size and allocation of memory. Move this in a function and export it, it will be used in a next commit. Signed-off-by: Olivier Matz Reviewed-by: Andrew Rybchenko Acked-by: Nipun Gupta --- lib

[dpdk-dev] [PATCH v4 7/7] mempool: use the specific macro for object alignment

2019-11-05 Thread Olivier Matz
For consistency, RTE_MEMPOOL_ALIGN should be used in place of RTE_CACHE_LINE_SIZE. They have the same value, because the only arch that was defining a specific value for it has been removed from dpdk. Signed-off-by: Olivier Matz Reviewed-by: Andrew Rybchenko Acked-by: Nipun Gupta --- lib

[dpdk-dev] [PATCH v4 2/7] mempool: reduce wasted space on mempool populate

2019-11-05 Thread Olivier Matz
aligned allocation that does not require to be iova-contiguous. This can also fallback into several smaller aligned allocations. This commit changes rte_mempool_op_calc_mem_size_default() to relax the alignment constraint to a cache line and to return a smaller size. Signed-off-by: Olivier Matz

[dpdk-dev] [PATCH v4 5/7] mempool: introduce helpers for populate and calc mem size

2019-11-05 Thread Olivier Matz
Introduce new functions that can used by mempool drivers to calculate required memory size and to populate mempool. For now, these helpers just replace the *_default() functions without change. They will be enhanced in next commit. Signed-off-by: Olivier Matz Acked-by: Nipun Gupta Reviewed-by

Re: [dpdk-dev] [PATCH v3 7/7] mempool: use the specific macro for object alignment

2019-11-05 Thread Olivier Matz
On Tue, Nov 05, 2019 at 03:15:13PM +0300, Andrew Rybchenko wrote: > On 11/4/19 6:12 PM, Olivier Matz wrote: > > For consistency, RTE_MEMPOOL_ALIGN should be used in place of > > RTE_CACHE_LINE_SIZE. They have the same value, because the only arch > > that was defining a spec

Re: [dpdk-dev] Limiting packet buffers under 4GB

2019-11-04 Thread Olivier Matz
Hi Jerin, On Mon, Nov 04, 2019 at 12:59:40PM +, Jerin Jacob Kollanukkaran wrote: > Hi Anatoly and All, > > Just wondering what would the side effect of lowering a _bit_ of static > uint64_t baseaddr = 0x1 in > lib/librte_eal/common/eal_common_memory.c for 64bit systems. > > Use ca

[dpdk-dev] [PATCH v3 5/7] mempool: introduce helpers for populate and calc mem size

2019-11-04 Thread Olivier Matz
Introduce new functions that can used by mempool drivers to calculate required memory size and to populate mempool. For now, these helpers just replace the *_default() functions without change. They will be enhanced in next commit. Signed-off-by: Olivier Matz Acked-by: Nipun Gupta --- drivers

[dpdk-dev] [PATCH v3 7/7] mempool: use the specific macro for object alignment

2019-11-04 Thread Olivier Matz
For consistency, RTE_MEMPOOL_ALIGN should be used in place of RTE_CACHE_LINE_SIZE. They have the same value, because the only arch that was defining a specific value for it has been removed from dpdk. Signed-off-by: Olivier Matz Reviewed-by: Andrew Rybchenko Acked-by: Nipun Gupta --- drivers

[dpdk-dev] [PATCH v3 6/7] mempool: prevent objects from being across pages

2019-11-04 Thread Olivier Matz
When populating a mempool, ensure that objects are not located across several pages, except if user did not request iova contiguous objects. Signed-off-by: Vamsi Krishna Attunuru Signed-off-by: Olivier Matz Acked-by: Nipun Gupta --- drivers/mempool/bucket/rte_mempool_bucket.c | 2

[dpdk-dev] [PATCH v3 3/7] mempool: remove optimistic IOVA-contiguous allocation

2019-11-04 Thread Olivier Matz
: Olivier Matz Reviewed-by: Andrew Rybchenko Acked-by: Nipun Gupta --- lib/librte_mempool/rte_mempool.c | 47 ++-- 1 file changed, 8 insertions(+), 39 deletions(-) diff --git a/lib/librte_mempool/rte_mempool.c b/lib/librte_mempool/rte_mempool.c index 4e0d576f5..213e574fc

[dpdk-dev] [PATCH v3 0/7] mempool: avoid objects allocations across pages

2019-11-04 Thread Olivier Matz
ing change in rte_mempool_op_calc_mem_size_default() * allow unaligned addr/len in populate virt * better split patches * try to better explain the change * use DPDK align macros when relevant Olivier Matz (7): mempool: allow unaligned addr/len in populate virt mempool: reduce wasted space on mempool popul

[dpdk-dev] [PATCH v3 4/7] mempool: introduce function to get mempool page size

2019-11-04 Thread Olivier Matz
In rte_mempool_populate_default(), we determine the page size, which is needed for calc_size and allocation of memory. Move this in a function and export it, it will be used in a next commit. Signed-off-by: Olivier Matz Reviewed-by: Andrew Rybchenko Acked-by: Nipun Gupta --- lib

[dpdk-dev] [PATCH v3 2/7] mempool: reduce wasted space on mempool populate

2019-11-04 Thread Olivier Matz
aligned allocation that does not require to be iova-contiguous. This can also fallback into several smaller aligned allocations. This commit changes rte_mempool_op_calc_mem_size_default() to relax the alignment constraint to a cache line and to return a smaller size. Signed-off-by: Olivier Matz

[dpdk-dev] [PATCH v3 1/7] mempool: allow unaligned addr/len in populate virt

2019-11-04 Thread Olivier Matz
rte_mempool_populate_virt() currently requires that both addr and length are page-aligned. Remove this uneeded constraint which can be annoying with big hugepages (ex: 1GB). Signed-off-by: Olivier Matz Reviewed-by: Andrew Rybchenko Acked-by: Nipun Gupta --- lib/librte_mempool/rte_mempool.c

[dpdk-dev] [PATCH] test/mempool: fix false positive test result

2019-11-04 Thread Olivier Matz
cases") Cc: Pallantla Poornima Signed-off-by: Olivier Matz --- app/test/test_mempool.c | 36 ++-- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/app/test/test_mempool.c b/app/test/test_mempool.c index 8b20886c8..c32a5d387 100644 ---

Re: [dpdk-dev] [PATCH v8 2/2] ethdev: move egress metadata to dynamic field

2019-10-31 Thread Olivier Matz
dk.org/patch/62040/ > > Signed-off-by: Viacheslav Ovsiienko > Acked-by: Ori Kam Acked-by: Olivier Matz

Re: [dpdk-dev] [PATCH v7 2/2] ethdev: move egress metadata to dynamic field

2019-10-31 Thread Olivier Matz
Hi, On Thu, Oct 31, 2019 at 01:05:21PM +, Viacheslav Ovsiienko wrote: > The dynamic mbuf fields were introduced by [1]. The egress metadata is > good candidate to be moved from statically allocated field tx_metadata to > dynamic one. Because mbufs are used in half-duplex fashion only, it is >

Re: [dpdk-dev] [PATCH v7 1/2] ethdev: extend flow metadata

2019-10-31 Thread Olivier Matz
eturn *RTE_FLOW_DYNF_METADATA(m); > +} > + > +__rte_experimental > +static inline void > +rte_flow_dynf_metadata_set(struct rte_mbuf *m, uint32_t v) > +{ > + *RTE_FLOW_DYNF_METADATA(m) = v; > +} > + > /* > * Definition of a single action. > * > @@ -2662,6 +2728,33 @@ enum rte_flow_conv_op { > }; > > /** > + * Check if mbuf dynamic field for metadata is registered. > + * > + * @return > + * True if registered, false otherwise. > + */ > +__rte_experimental > +static inline int > +rte_flow_dynf_metadata_avail(void) > +{ > + return !!rte_flow_dynf_metadata_mask; > +} > + > +/** > + * Register mbuf dynamic field and flag for metadata. > + * > + * This function must be called prior to use SET_META action in order to > + * register the dynamic mbuf field. Otherwise, the data cannot be delivered > to > + * application. > + * > + * @return > + * 0 on success, a negative errno value otherwise and rte_errno is set. > + */ > +__rte_experimental > +int > +rte_flow_dynf_metadata_register(void); > + > +/** > * Check whether a flow rule can be created on a given port. > * > * The flow rule is validated for correctness and whether it could be > accepted > diff --git a/lib/librte_mbuf/rte_mbuf_dyn.h b/lib/librte_mbuf/rte_mbuf_dyn.h > index 2e9d418..de651c1 100644 > --- a/lib/librte_mbuf/rte_mbuf_dyn.h > +++ b/lib/librte_mbuf/rte_mbuf_dyn.h > @@ -234,6 +234,12 @@ int rte_mbuf_dynflag_lookup(const char *name, > __rte_experimental > void rte_mbuf_dyn_dump(FILE *out); > > -/* Placeholder for dynamic fields and flags declarations. */ > +/* > + * Placeholder for dynamic fields and flags declarations. > + * This is centralizing point to gather all field names > + * and parameters together. > + */ > +#define RTE_MBUF_DYNFIELD_METADATA_NAME "rte_flow_dynfield_metadata" > +#define RTE_MBUF_DYNFLAG_METADATA_NAME "rte_flow_dynflag_metadata" > Sorry if it was not clear in my first comment, but I think we should have some words in this file about what are these field/flag. After that: Acked-by: Olivier Matz

Re: [dpdk-dev] [EXT] [PATCH v2 5/6] mempool: prevent objects from being across pages

2019-10-31 Thread Olivier Matz
On Thu, Oct 31, 2019 at 11:33:30AM +0300, Andrew Rybchenko wrote: > On 10/31/19 11:24 AM, Olivier Matz wrote: > > Hi, > > > > On Thu, Oct 31, 2019 at 06:54:50AM +, Vamsi Krishna Attunuru wrote: > > > Hi Olivier, > > > > > > Thanks for rework

Re: [dpdk-dev] [EXT] [PATCH v2 5/6] mempool: prevent objects from being across pages

2019-10-31 Thread Olivier Matz
lowing arithmetic > X = (X + n ) - ((X + n) MOD Y) > > Hi Olivier, > It is not worth going back and forth on this code organization. You > can decide on a scheme, We will follow that. Thanks for the explanation. Our mail crossed each others. Please see my answer to Vamsi. > &

Re: [dpdk-dev] [EXT] [PATCH v2 5/6] mempool: prevent objects from being across pages

2019-10-31 Thread Olivier Matz
eason. @Andrew, any opinion? > > Regards > A Vamsi > > > -----Original Message- > > From: Olivier Matz > > Sent: Wednesday, October 30, 2019 8:06 PM > > To: dev@dpdk.org > > Cc: Anatoly Burakov ; Andrew Rybchenko > > ; Ferruh Yigit ; > &

Re: [dpdk-dev] [PATCH v2] net/ice: optimize protocol extraction by dynamic mbuf API

2019-10-30 Thread Olivier Matz
Hi Haiyue, Please see some comments below. On Tue, Oct 29, 2019 at 03:34:48PM +0800, Haiyue Wang wrote: > The original design is to use rte_mbuf::udata64 to save the metadata of > protocol extraction which has network protocol data fields and type, an nit: an -> a > private API is used to decod

Re: [dpdk-dev] [PATCH v5] ethdev: extend flow metadata

2019-10-30 Thread Olivier Matz
On Wed, Oct 30, 2019 at 03:58:04PM +, Slava Ovsiienko wrote: > > -Original Message- > > From: Olivier Matz > > Sent: Wednesday, October 30, 2019 17:20 > > To: Slava Ovsiienko > > Cc: Andrew Rybchenko ; dev@dpdk.org; > > Matan Azrad ; Ra

Re: [dpdk-dev] [PATCH v4] ethdev: extend flow metadata

2019-10-30 Thread Olivier Matz
Hi, On Wed, Oct 30, 2019 at 10:35:16AM +0300, Andrew Rybchenko wrote: > @Olivier, please, take a look at the end of the mail. > (...) > On 10/29/19 8:19 PM, Slava Ovsiienko wrote: > > > > +}; > > > > + > > > > +/* Mbuf dynamic field offset for metadata. */ extern int > > > > +rte_flow_dynf_meta

Re: [dpdk-dev] [PATCH v5] ethdev: extend flow metadata

2019-10-30 Thread Olivier Matz
Hi, On Wed, Oct 30, 2019 at 02:46:06PM +, Slava Ovsiienko wrote: > > -Original Message- > > From: Slava Ovsiienko > > Sent: Wednesday, October 30, 2019 16:41 > > To: Andrew Rybchenko ; dev@dpdk.org > > Cc: Matan Azrad ; Raslan Darawsheh > > ; Thomas Monjalon ; > > olivier.m...@6wind.co

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