Re: [dpdk-dev] [PATCH v6 07/16] ethdev: flatten RSS configuration in flow API

2018-04-27 Thread Peng, Yuan
Hi,Adrien Mazarguil There is a bug present with 18.05-rci when I test the feature "Move RSS to rte_flow" in i40e NIC The test steps are as below: ./usertools/dpdk-devbind.py -b igb_uio 05:00.0 05:00.1 ./x86_64-native-linuxapp-gcc/app/testpmd -c 0x1fffe -n 4 -- -i --nb-cores=8 --rxq=8 --txq=8 --

Re: [dpdk-dev] [PATCH] mk: using initial-exec model for thread local variable

2018-04-27 Thread Yang, Zhiyong
> -Original Message- > From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Marvin Liu > Sent: Saturday, April 28, 2018 5:54 PM > To: dev@dpdk.org > Cc: Liu, Yong > Subject: [dpdk-dev] [PATCH] mk: using initial-exec model for thread local > variable > > When building share library, thre

Re: [dpdk-dev] [PATCH] eal: fix threads block on barrier

2018-04-27 Thread Tan, Jianfeng
On 4/28/2018 9:24 AM, Stephen Hemminger wrote: On Fri, 27 Apr 2018 21:52:26 +0200 Thomas Monjalon wrote: 27/04/2018 19:45, Shreyansh Jain: From: Stephen Hemminger [mailto:step...@networkplumber.org] Shreyansh Jain wrote: From: Jianfeng Tan Below commit introduced pthread barrier for syn

Re: [dpdk-dev] [PATCH] eal: fix threads block on barrier

2018-04-27 Thread Tan, Jianfeng
On 4/28/2018 9:21 AM, Stephen Hemminger wrote: On Fri, 27 Apr 2018 21:52:26 +0200 Thomas Monjalon wrote: 27/04/2018 19:45, Shreyansh Jain: From: Stephen Hemminger [mailto:step...@networkplumber.org] Shreyansh Jain wrote: From: Jianfeng Tan Below commit introduced pthread barrier for syn

Re: [dpdk-dev] [PATCH v6 07/16] ethdev: flatten RSS configuration in flow API

2018-04-27 Thread Zhao1, Wei
Hi,Adrien Mazarguil We have just use new RC.1 code on the feature of flow RSS API, but we find some abnormal phenomenon. After that I check code again, I find that it is introduced in this patch: SHA-1: ac8d22de2394e03ba4a77d8fd24381147aafb1d3 * ethdev: flatten RSS configuration in flow

[dpdk-dev] [PATCH net-next v4 3/4] net/ixgbe: write disable to EITR counter

2018-04-27 Thread xiangxia . m . yue
From: Tonghao Zhang ixgbe doesn't write the EITR counter, disable it now. Signed-off-by: Tonghao Zhang --- drivers/net/ixgbe/ixgbe_ethdev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index fcc10f6..0

[dpdk-dev] [PATCH net-next v4 4/4] net/ixgbevf: save IXGBE_VTEIMS to intr->mask for performance.

2018-04-27 Thread xiangxia . m . yue
From: Tonghao Zhang If dpdk APPs call the rte_eth_dev_rx_intr_enable or rte_eth_dev_rx_intr_disable frequently, and ixgbe vf will read the IXGBE_VTEIMS register everytime. The patch saves the IXGBE_VTEIMS to mask to avoid read frequently. Signed-off-by: Tonghao Zhang Acked-by: Beilei Xing Acke

[dpdk-dev] [PATCH net-next v4 1/4] net/ixgbevf: set the interrupt interval for EITR

2018-04-27 Thread xiangxia . m . yue
From: Tonghao Zhang Set EITR interval as default. This patch can improve the performance when we enable the rx-interrupt to process the packets because we hope rx-interrupt reduce CPU. For example, the 200us value of EITR makes the performance better with the low CPU. The default value of ITR is

[dpdk-dev] [PATCH net-next v4 2/4] net/ixgbe: set the default value for EITR

2018-04-27 Thread xiangxia . m . yue
From: Tonghao Zhang The ixgbe PF and VF use the same default value for EITR defined in header file. Signed-off-by: Tonghao Zhang --- drivers/net/ixgbe/ixgbe_ethdev.c | 5 + drivers/net/ixgbe/ixgbe_rxtx.c | 3 ++- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/net/

[dpdk-dev] [PATCH net-next v4 0/4] set ixgbe/ixgbevf EITR for performance

2018-04-27 Thread xiangxia . m . yue
From: Tonghao Zhang v4: for reducing config options, remove the config option and use the default value defined in header file. Remove the patch: http://dpdk.org/dev/patchwork/patch/36433 rebase the net-next. v3: configure eitr via configuration file and remove the patch: http:/

[dpdk-dev] [PATCH] mk: using initial-exec model for thread local variable

2018-04-27 Thread Marvin Liu
When building share library, thread-local storage model will be changed to global-dynamic. It will cost additional protect for read thread local variable. By now only lcore id is this kind of varaible and not need to dynamic share with other threads. So make TLS model back to initial-exec like stat

Re: [dpdk-dev] [PATCH] eal: fix threads block on barrier

2018-04-27 Thread Stephen Hemminger
On Fri, 27 Apr 2018 21:52:26 +0200 Thomas Monjalon wrote: > 27/04/2018 19:45, Shreyansh Jain: > > From: Stephen Hemminger [mailto:step...@networkplumber.org] > > > Shreyansh Jain wrote: > > > > From: Jianfeng Tan > > > > > Below commit introduced pthread barrier for synchronization. > > >

Re: [dpdk-dev] [PATCH] eal: fix threads block on barrier

2018-04-27 Thread Stephen Hemminger
On Fri, 27 Apr 2018 21:52:26 +0200 Thomas Monjalon wrote: > 27/04/2018 19:45, Shreyansh Jain: > > From: Stephen Hemminger [mailto:step...@networkplumber.org] > > > Shreyansh Jain wrote: > > > > From: Jianfeng Tan > > > > > Below commit introduced pthread barrier for synchronization. > > >

[dpdk-dev] [dpdk-announce] release candidate 18.05-rc1

2018-04-27 Thread Thomas Monjalon
A new DPDK release candidate is ready for testing: https://dpdk.org/browse/dpdk/tag/?id=v18.05-rc1 1138 patches: more than 18.02-rc2 which was really huge! This is one of the explanations for the big delay in this release. The release notes so far: http://dpdk.org/doc/guides/rel_n

[dpdk-dev] [PATCH v4 10/10] doc: add compression driver and ISA-L PMD docs

2018-04-27 Thread Lee Daly
This adds general compression drivers feature guide as well as the ISA-L PMD documentation and guide. Signed-off-by: Lee Daly --- .gitignore | 1 + MAINTAINERS| 12 devtools/test-build.sh

[dpdk-dev] [PATCH v4 09/10] compress/isal: add ISA-L decomp functionality

2018-04-27 Thread Lee Daly
Adds decompression functionality, similar to compression, this sets internal ISA-L structures, provides input & output mbuf addresses, executes decompression, which ISA-L calls inflate and finally error checks. Signed-off-by: Lee Daly --- drivers/compress/isal/isal_compress_pmd.c | 55 ++

[dpdk-dev] [PATCH v4 08/10] compress/isal: add ISA-L compression functionality

2018-04-27 Thread Lee Daly
Adds compression functionality, this sets internal ISA-L structures, provides input & output mbuf addresses, executes compression, which ISA-L calls deflate, and finally error checks. Signed-off-by: Lee Daly --- drivers/compress/isal/isal_compress_pmd.c | 93 ++- driv

[dpdk-dev] [PATCH v4 07/10] compress/isal: add stats related ops

2018-04-27 Thread Lee Daly
Add functions for statistic retrieval and resetting. Signed-off-by: Lee Daly --- drivers/compress/isal/isal_compress_pmd_ops.c | 33 +-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/drivers/compress/isal/isal_compress_pmd_ops.c b/drivers/compress/isal/i

[dpdk-dev] [PATCH v4 06/10] compress/isal: support enqueue/dequeue api

2018-04-27 Thread Lee Daly
This patchs adds support for the compressdev enqueue_burst and dequeue_burst API operations. Signed-off-by: Lee Daly --- drivers/compress/isal/isal_compress_pmd.c | 64 +++ drivers/compress/isal/isal_compress_pmd_ops.c | 2 + 2 files changed, 66 insertions(+) diff -

[dpdk-dev] [PATCH v4 05/10] compress/isal: add queue pair related ops

2018-04-27 Thread Lee Daly
This adds queue pair operations such as setup and release. Signed-off-by: Lee Daly --- drivers/compress/isal/isal_compress_pmd_ops.c | 111 +- drivers/compress/isal/isal_compress_pmd_private.h | 2 + 2 files changed, 111 insertions(+), 2 deletions(-) diff --git a/drive

[dpdk-dev] [PATCH v4 02/10] compress/isal: add pmd device init and de-init

2018-04-27 Thread Lee Daly
This patch adds device initialization functionality such as probe and create, also adding deinitialize functionality. Dynamic logging component also added. Signed-off-by: Lee Daly --- drivers/compress/isal/Makefile| 1 + drivers/compress/isal/isal_compress_pmd.c | 7

[dpdk-dev] [PATCH v4 00/10] add ISA-L compression PMD

2018-04-27 Thread Lee Daly
This patchset contains the first compression PMD written under the DPDK compression API, compressdev. The ISA-L compression driver utilizes Intel's ISA-L compression library. It therefore has dependencies on both compressdev and the ISA-L library, v2.22.0. V2: - Changes to keep in compliance wit

[dpdk-dev] [PATCH v4 04/10] compress/isal: add private xform related ops

2018-04-27 Thread Lee Daly
This patch creates, configures and frees the private xform, taking the applications xform and using it to populate the PMDs own private xform with the information which will be required for the compress/decompress functions. This information includes the level, algorithm, type of huffman code, typ

[dpdk-dev] [PATCH v4 03/10] compress/isal: add basic pmd ops

2018-04-27 Thread Lee Daly
Add basic device poll mode driver operations to give ability to start, stop, close device etc. Signed-off-by: Lee Daly --- drivers/compress/isal/isal_compress_pmd_ops.c | 63 +-- drivers/compress/isal/isal_compress_pmd_private.h | 12 + 2 files changed, 70 insertions(

[dpdk-dev] [PATCH v4 01/10] compress/isal: add skeleton ISA-L compression PMD

2018-04-27 Thread Lee Daly
Adding basic skeleton of the ISA-L compression driver. No compression functionality, but lays the foundation for operations in the rest of the patchset. The ISA-L compression driver utilizes Intel's ISA-L compression library and compressdev API. It therefore has dependencies on both compressdev and

Re: [dpdk-dev] [PATCH v2] doc: update eal option usage for FreeBSD

2018-04-27 Thread Thomas Monjalon
27/04/2018 15:14, Burakov, Anatoly: > On 27-Apr-18 1:59 PM, Reshma Pattan wrote: > > EAL option -m is supported in FreeBSD, > > so move it under supported heading from non > > supported heading. > > > > Signed-off-by: Reshma Pattan > > --- > > v2: remove recommendation of socket-mem option. > > -

Re: [dpdk-dev] [PATCH] maintainers: call out subtree for bbdev and security

2018-04-27 Thread Thomas Monjalon
13/04/2018 10:14, Pablo de Lara: > Commits for bbdev and security libraries are merged > into the Next Crypto subtree. > > Signed-off-by: Pablo de Lara Acked-by: Thomas Monjalon Applied, thanks

Re: [dpdk-dev] [PATCH] maintainers: add backup maintainer for next-crypto tree

2018-04-27 Thread Thomas Monjalon
> > Signed-off-by: Akhil Goyal > > Acked-by: Pablo de Lara > > Thanks for volunteering! Acked-by: Thomas Monjalon and approved by the techboard. Applied, thanks

Re: [dpdk-dev] [PATCH v2] maintainers: claim EAL memory init

2018-04-27 Thread Thomas Monjalon
23/04/2018 14:29, Anatoly Burakov: > Claim maintainership of all areas of EAL memory init, including > OS-specific parts of it. > > Also, claim maintainership of fbarray, since although it's not > related to memory allocation, it is heavily used by it and its > primary purpose is to serve memory a

Re: [dpdk-dev] [PATCH v3 0/2] Fix file locking in EAL memory

2018-04-27 Thread Thomas Monjalon
> Anatoly Burakov (2): > mem: add memalloc init stage > mem: revert to using flock() and add per-segment lockfiles Applied, thanks

Re: [dpdk-dev] [PATCH v3 3/3] mem: improve autodetection of hugepage counts on 32-bit

2018-04-27 Thread Thomas Monjalon
> > For non-legacy mode, we are preallocating space for hugepages, so we know > > in advance which pages we will be able to allocate, and which we won't. > > However, the init procedure was using hugepage counts gathered from sysfs > > and paid no attention to hugepage sizes that were actually avai

Re: [dpdk-dev] [PATCH] mem: fix handling return value

2018-04-27 Thread Thomas Monjalon
26/04/2018 10:10, Burakov, Anatoly: > On 26-Apr-18 9:06 AM, Jianfeng Tan wrote: > > resize_hugefile() returns either 0 (which indicates success) or -1 > > (which indicates failure). We failed to check the success as we > > use --single-file-segments option. > > > > Fixes: 2a04139f66b4 ("eal: add s

Re: [dpdk-dev] [PATCH v2 0/3] Coverity fixes for malloc

2018-04-27 Thread Thomas Monjalon
25/04/2018 12:15, Anatoly Burakov: > This patchset fixes a few Coverity issues in malloc > introduced by recent DPDK memory hotplug patchset. > > Coverity issues fixed: > - 272566 - possible null dereference > - 272574 - use value before verification > > The following coverity issues were not fix

Re: [dpdk-dev] [PATCH v4 0/9] Coverity fixes for EAL memory

2018-04-27 Thread Thomas Monjalon
> Anatoly Burakov (9): > mem: use strlcpy instead of snprintf > mem: fix resource leak > mem: fix potential double close > mem: fix potential resource leak > mem: fix potential resource leak > mem: fix comparing pointer to value > mem: fix potential bad unmap > mem: fix statement ha

Re: [dpdk-dev] [PATCH v6 0/4] additions to support tunnel encap/decap

2018-04-27 Thread Michael Wildt
Hi Declan, Thank you (and DPDK) for driving this proposal, much appreciated. Upon quick review of the proposal one thing stood out. In rte_flow.h the new tunnel action, RLTE_FLOW_ACTION_VXLAN_ENCAP/DECAP, similar with NVGRE_ENCAP/DECAP, is defined as: /** * Decapsulate outer most VXLAN tunnel fr

[dpdk-dev] [Bug 29] pktgen hangs when it tries to send packets through libvirt driver, works for all other drivers

2018-04-27 Thread bugzilla
https://dpdk.org/tracker/show_bug.cgi?id=29 Bug ID: 29 Summary: pktgen hangs when it tries to send packets through libvirt driver, works for all other drivers Product: DPDK Version: 18.02 Hardware: x86 OS: L

Re: [dpdk-dev] [PATCH] eal: fix threads block on barrier

2018-04-27 Thread Thomas Monjalon
27/04/2018 19:45, Shreyansh Jain: > From: Stephen Hemminger [mailto:step...@networkplumber.org] > > Shreyansh Jain wrote: > > > From: Jianfeng Tan > > > > Below commit introduced pthread barrier for synchronization. > > > > But two IPC threads block on the barrier, and never wake up. > > > > > > >

Re: [dpdk-dev] [PATCH v2 0/3] Optimization for DPAA/DPAA2 for PA/VA Addressing

2018-04-27 Thread Thomas Monjalon
> Shreyansh Jain (3): > crypto/dpaa_sec: remove ctx based offset for PA-VA conversion > bus/fslmc: optimize physical to virtual address searching > bus/dpaa: optimize physical to virtual address searching Applied with fixes for: - 32-bit compilation - symbols export for share

Re: [dpdk-dev] [PATCH v2 3/3] bus/dpaa: optimize physical to virtual address searching

2018-04-27 Thread Thomas Monjalon
27/04/2018 19:20, Shreyansh Jain: > --- a/drivers/bus/dpaa/rte_dpaa_bus.h > +++ b/drivers/bus/dpaa/rte_dpaa_bus.h > @@ -95,9 +95,34 @@ struct dpaa_portal { > uint64_t tid;/**< Parent Thread id for this portal */ > }; > > -/* TODO - this is costly, need to write a fast coversion routine */

Re: [dpdk-dev] [PATCH] lib: clear experimental version tag in linker scripts

2018-04-27 Thread Neil Horman
On Fri, Apr 27, 2018 at 04:55:20PM +0100, Ferruh Yigit wrote: > On 4/27/2018 4:42 PM, Neil Horman wrote: > > On Fri, Apr 27, 2018 at 04:17:55PM +0100, Ferruh Yigit wrote: > >> Remove version tag from experimental block in linker version scripts > >> (.map files). > >> > >> That label is not used by

Re: [dpdk-dev] [PATCH v2 2/3] bus/fslmc: optimize physical to virtual address searching

2018-04-27 Thread Thomas Monjalon
27/04/2018 20:49, Thomas Monjalon: > 27/04/2018 19:20, Shreyansh Jain: > > --- a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h > > +++ b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h > > @@ -254,15 +254,38 @@ enum qbman_fd_format { > > */ > > #define DPAA2_EQ_RESP_ALWAYS 1 > > > > +/* Variou

Re: [dpdk-dev] [PATCH v2 2/3] bus/fslmc: optimize physical to virtual address searching

2018-04-27 Thread Thomas Monjalon
27/04/2018 19:20, Shreyansh Jain: > --- a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h > +++ b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h > @@ -254,15 +254,38 @@ enum qbman_fd_format { > */ > #define DPAA2_EQ_RESP_ALWAYS 1 > > +/* Various structures representing contiguous memory maps */ > +st

Re: [dpdk-dev] [PATCH v8 1/2] mbuf: support attaching external buffer to mbuf

2018-04-27 Thread Thomas Monjalon
27/04/2018 19:22, Yongseok Koh: > This patch introduces a new way of attaching an external buffer to a mbuf. > > Attaching an external buffer is quite similar to mbuf indirection in > replacing buffer addresses and length of a mbuf, but a few differences: > - When an indirect mbuf is attached, r

Re: [dpdk-dev] [PATCH v2 2/3] build: fix check for libbsd in meson

2018-04-27 Thread Vladimir Medvedkin
Hi, 2018-04-27 16:51 GMT+03:00 Bruce Richardson : > On Fri, Apr 27, 2018 at 02:49:27PM +0100, Bruce Richardson wrote: > > When we check for libbsd we were just checking for the library itself. > > However, on some distros, e.g. CentOS, libbsd will be found even though > > it's not usable by DPDK

Re: [dpdk-dev] [PATCH] eal: fix threads block on barrier

2018-04-27 Thread Shreyansh Jain
> -Original Message- > From: Stephen Hemminger [mailto:step...@networkplumber.org] > Sent: Friday, April 27, 2018 11:10 PM > To: Shreyansh Jain > Cc: Jianfeng Tan ; dev@dpdk.org; > tho...@monjalon.net; Olivier Matz ; Anatoly > Burakov > Subject: Re: [dpdk-dev] [PATCH] eal: fix threads blo

Re: [dpdk-dev] [PATCH] vhost/crypto: fix condition check

2018-04-27 Thread Thomas Monjalon
27/04/2018 16:21, Maxime Coquelin: > > On 04/27/2018 04:06 PM, Fan Zhang wrote: > > Fixes: 3bb595ecd682 ("vhost/crypto: add request handler") > > > > This patch fix final condition check while moving virtqueue > > descriptors. > > > > Signed-off-by: Fan Zhang > > --- > > lib/librte_vhost/vhos

Re: [dpdk-dev] [PATCH] eal: fix threads block on barrier

2018-04-27 Thread Stephen Hemminger
On Fri, 27 Apr 2018 17:36:56 + Shreyansh Jain wrote: > > -Original Message- > > From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Jianfeng Tan > > Sent: Friday, April 27, 2018 10:12 PM > > To: dev@dpdk.org > > Cc: tho...@monjalon.net; Jianfeng Tan ; Olivier > > Matz ; Anatoly Burak

Re: [dpdk-dev] [PATCH] vhost/crypto: fix missing head correction

2018-04-27 Thread Thomas Monjalon
27/04/2018 16:19, Maxime Coquelin: > Hi Fan, > > On 04/27/2018 03:52 PM, Fan Zhang wrote: > > Fixes: 473387aaae4a ("vhost/crypto: move to safe GPA translation API") > > > > This patch fixes the missing head descriptor correction for > > indirect descriptors. > > > > Signed-off-by: Fan Zhang > >

Re: [dpdk-dev] [PATCH] eal: fix threads block on barrier

2018-04-27 Thread Shreyansh Jain
> -Original Message- > From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Jianfeng Tan > Sent: Friday, April 27, 2018 10:12 PM > To: dev@dpdk.org > Cc: tho...@monjalon.net; Jianfeng Tan ; Olivier > Matz ; Anatoly Burakov > > Subject: [dpdk-dev] [PATCH] eal: fix threads block on barrier >

[dpdk-dev] [PATCH v8 2/2] app/testpmd: conserve offload flags of mbuf

2018-04-27 Thread Yongseok Koh
This patch is to accommodate an experimental feature of mbuf - external buffer attachment. If mbuf is attached to an external buffer, its ol_flags will have EXT_ATTACHED_MBUF set. Without enabling/using the feature, everything remains same. If PMD delivers Rx packets with non-direct mbuf, ol_flags

[dpdk-dev] [PATCH v8 1/2] mbuf: support attaching external buffer to mbuf

2018-04-27 Thread Yongseok Koh
This patch introduces a new way of attaching an external buffer to a mbuf. Attaching an external buffer is quite similar to mbuf indirection in replacing buffer addresses and length of a mbuf, but a few differences: - When an indirect mbuf is attached, refcnt of the direct mbuf would be 2 as

Re: [dpdk-dev] [PATCH v9 00/10] eal: replace calls to rte_panic and refrain from new instances

2018-04-27 Thread Arnon Warshavsky
On Fri, Apr 27, 2018, 19:40 Thomas Monjalon wrote: > 27/04/2018 18:31, Arnon Warshavsky: > > On Fri, Apr 27, 2018, 17:22 Thomas Monjalon wrote: > > > What is the status of this patchset? > > > It seems not ready for RC1 (today). > > > I don't want to push it in RC2 because it changes too many th

Re: [dpdk-dev] [PATCH] eal: add request to map reserved physical memory

2018-04-27 Thread Scott Branden
On 18-04-27 09:49 AM, Burakov, Anatoly wrote: On 27-Apr-18 5:30 PM, Scott Branden wrote: Hi Anatoly, We'd appreciate your input so we can come to a solution of supporting the necessary memory allocations? Hi Scott, I'm currently starting to work on a prototype that will be at least RFC

[dpdk-dev] [PATCH v4 9/9] mem: fix possible use-after-free

2018-04-27 Thread Anatoly Burakov
If user has specified a flag to unmap the area right after mapping it, we were passing an already-unmapped pointer to RTE_LOG. This is not an issue since RTE_LOG doesn't actually dereference the pointer, but fix it anyway by moving call to RTE_LOG to before unmap. Coverity issue: 272584 Fixes: b7

[dpdk-dev] [PATCH v4 7/9] mem: fix potential bad unmap

2018-04-27 Thread Anatoly Burakov
Previously, if mmap failed to map page address at requested address, we were attempting to unmap the wrong address. Fix it by unmapping our actual mapped address, and jump further to avoid unmapping memory that is not allocated. Coverity issue: 272602 Fixes: 582bed1e1d1d ("mem: support mapping hu

[dpdk-dev] [PATCH v4 8/9] mem: fix statement having no effect

2018-04-27 Thread Anatoly Burakov
Coverity reports these lines as having no effect. Technically, we do want for those lines to have no effect, however they would've likely been optimized out. Add volatile qualifiers to ensure the code has effects. Coverity issue: 272608 Fixes: 582bed1e1d1d ("mem: support mapping hugepages at runt

[dpdk-dev] [PATCH v4 6/9] mem: fix comparing pointer to value

2018-04-27 Thread Anatoly Burakov
Previous code had an old rebase leftover from the time when oldpolicy was an actual int, instead of a pointer. Fix it to do comparison with dereferencing the pointer. Coverity issue: 272589 Fixes: 582bed1e1d1d ("mem: support mapping hugepages at runtime") Cc: anatoly.bura...@intel.com Signed-off

[dpdk-dev] [PATCH v4 5/9] mem: fix potential resource leak

2018-04-27 Thread Anatoly Burakov
Normally, tailq entry should have a valid fd by the time we attempt to map the segment. However, in case it doesn't, we're leaking fd, so fix it. Coverity issue: 272570 Fixes: 2a04139f66b4 ("eal: add single file segments option") Cc: anatoly.bura...@intel.com Signed-off-by: Anatoly Burakov ---

[dpdk-dev] [PATCH v4 2/9] mem: fix resource leak

2018-04-27 Thread Anatoly Burakov
Coverity issue: 272601 Fixes: 66cc45e293ed ("mem: replace memseg with memseg lists") Cc: anatoly.bura...@intel.com Signed-off-by: Anatoly Burakov Acked-by: Bruce Richardson --- lib/librte_eal/linuxapp/eal/eal_memory.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/librte_eal/linuxapp/

[dpdk-dev] [PATCH v4 4/9] mem: fix potential resource leak

2018-04-27 Thread Anatoly Burakov
We close fd if we managed to find it in the list of allocated segment lists (which should always be the case under normal conditions), but if we didn't, the fd was leaking. Close it if we couldn't find it in the segment list. This is not an issue as if the segment is zero length, we're getting rid

[dpdk-dev] [PATCH v4 3/9] mem: fix potential double close

2018-04-27 Thread Anatoly Burakov
We were closing descriptor before checking if mapping has failed, but if it did, we did a second close afterwards. Fix it by moving closing descriptor to after we've done all error checks. Coverity issue: 272560 Fixes: 2a04139f66b4 ("eal: add single file segments option") Cc: anatoly.bura...@inte

[dpdk-dev] [PATCH v4 0/9] Coverity fixes for EAL memory

2018-04-27 Thread Anatoly Burakov
This patchset fixes a host of coverity issues in memory subsystem introduced with recent DPDK memory hotplug patchset. Coverity issues fixed: - 272601 - leaking fd - 272560 - double close fd - 272568 - leaking fd - 272570 - leaking fd - 272589 - dereference before null check - 272602 - freeing wro

[dpdk-dev] [PATCH v4 1/9] mem: use strlcpy instead of snprintf

2018-04-27 Thread Anatoly Burakov
Signed-off-by: Anatoly Burakov Acked-by: Bruce Richardson --- Notes: One other instance of using snprintf is left alone as it is expected to be addressed by another patch [1]. [1] http://dpdk.org/dev/patchwork/patch/38301/ lib/librte_eal/common/eal_common_memalloc.c | 5 +++--

[dpdk-dev] [PATCH v2 3/3] bus/dpaa: optimize physical to virtual address searching

2018-04-27 Thread Shreyansh Jain
With Hotplugging memory support, the order of memseg has been changed from physically contiguous to virtual contiguous. DPAA bus and drivers depend on PA to VA address conversion for I/O. This patch creates a list of blocks requested to be pinned to the DPAA mempool. For searching physical address

[dpdk-dev] [PATCH v2 2/3] bus/fslmc: optimize physical to virtual address searching

2018-04-27 Thread Shreyansh Jain
With Hotplugging memory support, the order of memseg has been changed from physically contiguous to virtual contiguous. FSLMC bus and dpaa2 drivers depend on PA to VA address conversion when in Physical addressing mode. This patch creates a list of blocks requested to be pinned to the DPAA2 mempoo

[dpdk-dev] [PATCH v2 1/3] crypto/dpaa_sec: remove ctx based offset for PA-VA conversion

2018-04-27 Thread Shreyansh Jain
Crypto requires physical to virtual address conversion for descriptors. Prior to memory hotplugging this was based on memseg iteration assuming memsegs are all physical contiguous and using cached start address fast calculations can be done. This assumption now stands invalid with memory hotpluggin

[dpdk-dev] [PATCH v2 0/3] Optimization for DPAA/DPAA2 for PA/VA Addressing

2018-04-27 Thread Shreyansh Jain
Once the hotplugging (6b42f7563) patchset were merged, DPAA2 Physical Addressing mode and DPAA observed drastic performance drop (~95%) This was because of an inherent assumption while doing some memory translation that memsegs would be physically contiguous This series attempts to add a workaroun

Re: [dpdk-dev] [PATCH] eal: fix threads block on barrier

2018-04-27 Thread Stephen Hemminger
On Fri, 27 Apr 2018 16:41:42 + Jianfeng Tan wrote: > Below commit introduced pthread barrier for synchronization. > But two IPC threads block on the barrier, and never wake up. > > (gdb) bt > #0 futex_wait (private=0, expected=0, futex_word=0x7fffcff4) > at ../sysdeps/unix/sys

Re: [dpdk-dev] [PATCH v3 3/9] mem: fix potential double close

2018-04-27 Thread Burakov, Anatoly
On 27-Apr-18 4:15 PM, Bruce Richardson wrote: On Wed, Apr 25, 2018 at 10:56:41AM +0100, Anatoly Burakov wrote: We were closing descriptor before checking if mapping has failed, but if it did, we did a second close afterwards. Fix it by moving closing descriptor to after we check if mmap has succ

Re: [dpdk-dev] [PATCH] eal: add request to map reserved physical memory

2018-04-27 Thread Burakov, Anatoly
On 27-Apr-18 5:30 PM, Scott Branden wrote: Hi Anatoly, We'd appreciate your input so we can come to a solution of supporting the necessary memory allocations? Hi Scott, I'm currently starting to work on a prototype that will be at least RFC'd (if not v1'd) during 18.08 timeframe. Basicall

Re: [dpdk-dev] [PATCH v3 3/5] eal: set name when creating a control thread

2018-04-27 Thread Burakov, Anatoly
On 27-Apr-18 5:17 PM, Tan, Jianfeng wrote: On 4/27/2018 11:46 PM, Tan, Jianfeng wrote: Hi Olivier, After this patch, I find the two IPC threads block at pthread_barrier_wait(), and never wake up. Please refer below for more information. The system is Ubuntu 16.04. On 4/24/2018 10:46 PM, O

Re: [dpdk-dev] [PATCH] eal: fix threads block on barrier

2018-04-27 Thread Thomas Monjalon
27/04/2018 18:41, Jianfeng Tan: > Below commit introduced pthread barrier for synchronization. > But two IPC threads block on the barrier, and never wake up. > > (gdb) bt > #0 futex_wait (private=0, expected=0, futex_word=0x7fffcff4) > at ../sysdeps/unix/sysv/linux/futex-internal.h:

Re: [dpdk-dev] [PATCH v3 5/9] mem: fix potential resource leak

2018-04-27 Thread Burakov, Anatoly
On 27-Apr-18 5:27 PM, Bruce Richardson wrote: On Fri, Apr 27, 2018 at 04:55:51PM +0100, Burakov, Anatoly wrote: On 27-Apr-18 4:21 PM, Bruce Richardson wrote: On Wed, Apr 25, 2018 at 10:56:43AM +0100, Anatoly Burakov wrote: Normally, tailq entry should have a valid fd by the time we attempt to

Re: [dpdk-dev] [PATCH v9 00/10] eal: replace calls to rte_panic and refrain from new instances

2018-04-27 Thread Thomas Monjalon
27/04/2018 18:31, Arnon Warshavsky: > On Fri, Apr 27, 2018, 17:22 Thomas Monjalon wrote: > > What is the status of this patchset? > > It seems not ready for RC1 (today). > > I don't want to push it in RC2 because it changes too many things. > > So it's today or wait for 18.08. What do you think? >

[dpdk-dev] [PATCH] eal: fix threads block on barrier

2018-04-27 Thread Jianfeng Tan
Below commit introduced pthread barrier for synchronization. But two IPC threads block on the barrier, and never wake up. (gdb) bt #0 futex_wait (private=0, expected=0, futex_word=0x7fffcff4) at ../sysdeps/unix/sysv/linux/futex-internal.h:61 #1 futex_wait_simple (private=0, expec

Re: [dpdk-dev] [PATCH] mem: unmap unneeded space

2018-04-27 Thread Bruce Richardson
On Thu, Apr 19, 2018 at 05:35:25PM +0100, Anatoly Burakov wrote: > When we ask to reserve virtual areas, we usually include > alignment in the mapping size, and that memory ends up > being wasted. Wasting a gigabyte of VA space while trying to > reserve one gigabyte is pretty expensive on 32-bit, s

Re: [dpdk-dev] [PATCH] mem: unmap unneeded space

2018-04-27 Thread Bruce Richardson
On Thu, Apr 19, 2018 at 05:35:25PM +0100, Anatoly Burakov wrote: > When we ask to reserve virtual areas, we usually include > alignment in the mapping size, and that memory ends up > being wasted. Wasting a gigabyte of VA space while trying to > reserve one gigabyte is pretty expensive on 32-bit, s

Re: [dpdk-dev] [PATCH v9 00/10] eal: replace calls to rte_panic and refrain from new instances

2018-04-27 Thread Arnon Warshavsky
On Fri, Apr 27, 2018, 17:22 Thomas Monjalon wrote: > 26/04/2018 08:20, Arnon Warshavsky: > > The purpose of this patch series is to cleanup the library code > > from paths that end up aborting the process, > > and move to checking error values, in order to allow the running process > > perform an

Re: [dpdk-dev] [PATCH] eal: add request to map reserved physical memory

2018-04-27 Thread Scott Branden
Hi Anatoly, We'd appreciate your input so we can come to a solution of supporting the necessary memory allocations? On 23 April 2018 at 02:23, Srinath Mannam wrote: > Hi Anatoly, > > Our requirement is, that separate memory segment (speed memory window) > need to be allocated outside huge pages

Re: [dpdk-dev] [PATCH v8 2/9] ethdev: add switch identifier parameter to port

2018-04-27 Thread Ferruh Yigit
On 4/26/2018 11:40 AM, Declan Doherty wrote: > Introduces a new port attribute to ethdev port's which denotes the > switch domain a port belongs to. By default all port's switch > identifiers are set to RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID. Ports > which supported the concept of switch domains can

Re: [dpdk-dev] [PATCH v3 5/9] mem: fix potential resource leak

2018-04-27 Thread Bruce Richardson
On Fri, Apr 27, 2018 at 04:55:51PM +0100, Burakov, Anatoly wrote: > On 27-Apr-18 4:21 PM, Bruce Richardson wrote: > > On Wed, Apr 25, 2018 at 10:56:43AM +0100, Anatoly Burakov wrote: > > > Normally, tailq entry should have a valid fd by the time we attempt > > > to map the segment. However, in case

Re: [dpdk-dev] [PATCH v3 3/5] eal: set name when creating a control thread

2018-04-27 Thread Tan, Jianfeng
On 4/27/2018 11:46 PM, Tan, Jianfeng wrote: Hi Olivier, After this patch, I find the two IPC threads block at pthread_barrier_wait(), and never wake up. Please refer below for more information. The system is Ubuntu 16.04. On 4/24/2018 10:46 PM, Olivier Matz wrote: To avoid code duplicatio

[dpdk-dev] [PATCH 3/3] bus/dpaa: optimize physical to virtual address searching

2018-04-27 Thread Shreyansh Jain
With Hotplugging memory support, the order of memseg has been changed from physically contiguous to virtual contiguous. DPAA bus and drivers depend on PA to VA address conversion for I/O. This patch creates a list of blocks requested to be pinned to the DPAA mempool. For searching physical address

[dpdk-dev] [PATCH 1/3] crypto/dpaa_sec: remove ctx based offset for PA-VA conversion

2018-04-27 Thread Shreyansh Jain
Crypto requires physical to virtual address conversion for descriptors. Prior to memory hotplugging this was based on memseg iteration assuming memsegs are all physical contiguous and using cached start address fast calculations can be done. This assumption now stands invalid with memory hotpluggin

[dpdk-dev] [PATCH 2/3] bus/fslmc: optimize physical to virtual address searching

2018-04-27 Thread Shreyansh Jain
With Hotplugging memory support, the order of memseg has been changed from physically contiguous to virtual contiguous. FSLMC bus and dpaa2 drivers depend on PA to VA address conversion when in Physical addressing mode. This patch creates a list of blocks requested to be pinned to the DPAA2 mempoo

[dpdk-dev] [PATCH 0/3] Optimization for DPAA/DPAA2 for PA/VA Addressing

2018-04-27 Thread Shreyansh Jain
Once the hotplugging (6b42f7563) patchset were merged, DPAA2 Physical Addressing mode and DPAA observed drastic performance drop (~95%) This was because of an inherent assumption while doing some memory translation that memsegs would be physically contiguous This series attempts to add a workaroun

Re: [dpdk-dev] [PATCH v2 3/3] malloc: fix potential dereferencing of NULL pointer

2018-04-27 Thread Burakov, Anatoly
On 27-Apr-18 4:57 PM, Van Haaren, Harry wrote: From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Anatoly Burakov Sent: Wednesday, April 25, 2018 11:16 AM To: dev@dpdk.org Cc: tho...@monjalon.net; Burakov, Anatoly Subject: [dpdk-dev] [PATCH v2 3/3] malloc: fix potential dereferencing of NULL p

Re: [dpdk-dev] [PATCH v2 3/3] malloc: fix potential dereferencing of NULL pointer

2018-04-27 Thread Van Haaren, Harry
> From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Anatoly Burakov > Sent: Wednesday, April 25, 2018 11:16 AM > To: dev@dpdk.org > Cc: tho...@monjalon.net; Burakov, Anatoly > Subject: [dpdk-dev] [PATCH v2 3/3] malloc: fix potential dereferencing of NULL > pointer > > Previous code checked for

Re: [dpdk-dev] [PATCH v2 2/3] malloc: fix potential out-of-bounds array access

2018-04-27 Thread Van Haaren, Harry
> From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Anatoly Burakov > Sent: Wednesday, April 25, 2018 11:16 AM > To: dev@dpdk.org > Cc: tho...@monjalon.net; Burakov, Anatoly > Subject: [dpdk-dev] [PATCH v2 2/3] malloc: fix potential out-of-bounds array > access > > Technically, while the point

Re: [dpdk-dev] [PATCH v2 1/3] malloc: replace snprintf with strlcpy

2018-04-27 Thread Van Haaren, Harry
> From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Anatoly Burakov > Sent: Wednesday, April 25, 2018 11:16 AM > To: dev@dpdk.org > Cc: tho...@monjalon.net > Subject: [dpdk-dev] [PATCH v2 1/3] malloc: replace snprintf with strlcpy > > Signed-off-by: Anatoly Burakov Acked-by: Harry van Haaren

Re: [dpdk-dev] [PATCH v3 5/9] mem: fix potential resource leak

2018-04-27 Thread Burakov, Anatoly
On 27-Apr-18 4:21 PM, Bruce Richardson wrote: On Wed, Apr 25, 2018 at 10:56:43AM +0100, Anatoly Burakov wrote: Normally, tailq entry should have a valid fd by the time we attempt to map the segment. However, in case it doesn't, we're leaking fd, so fix it. Coverity issue: 272570 Fixes: 2a04139

Re: [dpdk-dev] [PATCH] lib: clear experimental version tag in linker scripts

2018-04-27 Thread Ferruh Yigit
On 4/27/2018 4:42 PM, Neil Horman wrote: > On Fri, Apr 27, 2018 at 04:17:55PM +0100, Ferruh Yigit wrote: >> Remove version tag from experimental block in linker version scripts >> (.map files). >> >> That label is not used by linker and information only. It is useful >> for version blocks but not u

Re: [dpdk-dev] [PATCH v3 5/9] mem: fix potential resource leak

2018-04-27 Thread Bruce Richardson
On Fri, Apr 27, 2018 at 04:49:03PM +0100, Burakov, Anatoly wrote: > On 27-Apr-18 4:21 PM, Bruce Richardson wrote: > > On Wed, Apr 25, 2018 at 10:56:43AM +0100, Anatoly Burakov wrote: > > > Normally, tailq entry should have a valid fd by the time we attempt > > > to map the segment. However, in case

Re: [dpdk-dev] [PATCH v3 5/9] mem: fix potential resource leak

2018-04-27 Thread Burakov, Anatoly
On 27-Apr-18 4:21 PM, Bruce Richardson wrote: On Wed, Apr 25, 2018 at 10:56:43AM +0100, Anatoly Burakov wrote: Normally, tailq entry should have a valid fd by the time we attempt to map the segment. However, in case it doesn't, we're leaking fd, so fix it. Coverity issue: 272570 Fixes: 2a04139

Re: [dpdk-dev] [PATCH v3 4/9] mem: fix potential resource leak

2018-04-27 Thread Bruce Richardson
On Fri, Apr 27, 2018 at 04:39:34PM +0100, Burakov, Anatoly wrote: > On 27-Apr-18 4:18 PM, Bruce Richardson wrote: > > On Wed, Apr 25, 2018 at 10:56:42AM +0100, Anatoly Burakov wrote: > > > We close fd if we managed to find it in the list of allocated > > > segment lists (which should always be the

Re: [dpdk-dev] [PATCH v3 3/5] eal: set name when creating a control thread

2018-04-27 Thread Tan, Jianfeng
Hi Olivier, After this patch, I find the two IPC threads block at pthread_barrier_wait(), and never wake up. Please refer below for more information. The system is Ubuntu 16.04. On 4/24/2018 10:46 PM, Olivier Matz wrote: To avoid code duplication, add a parameter to rte_ctrl_thread_create()

Re: [dpdk-dev] [PATCH v3 9/9] mem: fix possible use-after-free

2018-04-27 Thread Bruce Richardson
On Wed, Apr 25, 2018 at 10:56:47AM +0100, Anatoly Burakov wrote: > If user has specified a flag to unmap the area right after mapping it, > we were passing an already-unmapped pointer to RTE_LOG. This is not an > issue since RTE_LOG doesn't actually dereference the pointer, but fix > it anyway by m

Re: [dpdk-dev] [PATCH] lib: clear experimental version tag in linker scripts

2018-04-27 Thread Neil Horman
On Fri, Apr 27, 2018 at 04:17:55PM +0100, Ferruh Yigit wrote: > Remove version tag from experimental block in linker version scripts > (.map files). > > That label is not used by linker and information only. It is useful > for version blocks but not useful for experimental block but confusing. > R

Re: [dpdk-dev] [PATCH v3 4/9] mem: fix potential resource leak

2018-04-27 Thread Burakov, Anatoly
On 27-Apr-18 4:18 PM, Bruce Richardson wrote: On Wed, Apr 25, 2018 at 10:56:42AM +0100, Anatoly Burakov wrote: We close fd if we managed to find it in the list of allocated segment lists (which should always be the case under normal conditions), but if we didn't, the fd was leaking. Close it if

Re: [dpdk-dev] [PATCH v3 8/9] mem: fix statement having no effect

2018-04-27 Thread Bruce Richardson
On Wed, Apr 25, 2018 at 10:56:46AM +0100, Anatoly Burakov wrote: > Coverity reports these lines as having no effect. Technically, we do > want for those lines to have no effect, however they would've likely > been optimized out. Add volatile qualifiers to ensure the code has > effects. > > Coverit

  1   2   3   >