[dpdk-dev] [PATCH] net/vhost: fix vhost invalid state

2018-04-09 Thread Junjie Chen
dev_start sets *dev_attached* after setup queues, this sets device to invalid state since no frontend is attached. Also destroy_device set *started* to zero which makes *allow_queuing* always zero until dev_start get called again. Actually, we should not determine queues existence by *dev_attached*

Re: [dpdk-dev] [PATCH v3] net/mlx4: support CRC strip toggling

2018-04-09 Thread Shahaf Shuler
Monday, March 26, 2018 12:35 PM, Adrien Mazarguil: > Subject: Re: [PATCH v3] net/mlx4: support CRC strip toggling > > On Sun, Mar 25, 2018 at 08:19:29PM +, Ophir Munk wrote: > > Previous to this commit mlx4 CRC stripping was executed by default and > > there was no verbs API to disable it. > >

Re: [dpdk-dev] [PATCH v5 4/4] testpmd: make use of per-PMD TxRx parameters

2018-04-09 Thread Shreyansh Jain
On Tuesday 10 April 2018 11:39 AM, Remy Horton wrote: On 10/04/2018 05:18, Shreyansh Jain wrote: [..] I'll add in the snippet above. 18.05 integration deadline has I think passed, but documentation changes will still get in. @thomas you won't be integrating these default conf patches in 18.05

[dpdk-dev] [PATCH v1] net/failsafe: add TCP TSO default Tx capability

2018-04-09 Thread Ophir Munk
Add DEV_TX_OFFLOAD_TCP_TSO to failsafe Tx offload default capabilities. The net result of failsafe Tx capabilities is the logical AND of Tx capabilities among all failsafe sub_devices and failsafe own default capabilities. Signed-off-by: Ophir Munk --- drivers/net/failsafe/failsafe_ops.c | 3 ++-

[dpdk-dev] [PATCH] ethdev: fix link status query

2018-04-09 Thread Shahaf Shuler
When application works with LSC interrupts the ethdev layer skips the PMD callback and update according to the link status exists on device data. It is because it assumes the link status on the device data is the correct one since any link change is processed by the application. As multiple PMDs i

Re: [dpdk-dev] vmxnet3 RX VLAN Strip offload incorrect behaviour

2018-04-09 Thread Yong Wang
When using 4095, I assume you enabled trunk mode on ESX vswitch. What ESX version did you use? Is the vswitch standard switch or DVS? We have tested over ESX6.0 and onwards plus DPDK 17.05 and it should work. On 4/8/18, 11:22 PM, "Padam Jeet Singh" wrote: > On 06-Apr-2018, at 11:12

[dpdk-dev] [PATCH v2] net/mlx5: fix link status initialization

2018-04-09 Thread Shahaf Shuler
Following commit 7ba5320baa32 ("net/mlx5: fix link status behavior") The initial link status is no longer set as part of the port start. When LSC interrupts are enabled, ethdev layer reads the link status directly from the device data instead of using the PMD callback. This may cause application t

Re: [dpdk-dev] [PATCH v5 4/4] testpmd: make use of per-PMD TxRx parameters

2018-04-09 Thread Remy Horton
On 10/04/2018 05:18, Shreyansh Jain wrote: [..] I'll add in the snippet above. 18.05 integration deadline has I think passed, but documentation changes will still get in. @thomas you won't be integrating these default conf patches in 18.05? I meant that since the v5 and v6 will only differ

Re: [dpdk-dev] [dpdk-dev, v1, 1/5] eventdev: add caps API and PMD callbacks for crypto adapter

2018-04-09 Thread Jerin Jacob
-Original Message- > Date: Wed, 4 Apr 2018 12:26:18 +0530 > From: Abhinandan Gujjar > To: jerin.ja...@caviumnetworks.com, hemant.agra...@nxp.com, > akhil.go...@nxp.com, dev@dpdk.org > CC: pablo.de.lara.gua...@intel.com, declan.dohe...@intel.com, > narender.vang...@intel.com, abhinandan.g

Re: [dpdk-dev] [PATCH v3 1/5] lib/ethdev: support for inline IPsec events

2018-04-09 Thread Anoob Joseph
Hi Thomas, Can you review the patch and let me know if you have any comments. Thanks, Anoob On 03/04/18 19:57, Anoob Joseph wrote: Adding maintainers of testpmd & lib/ethdev Thanks, Anoob On 21/03/18 16:41, Anoob Joseph wrote: Adding support for IPsec events in rte_eth_event framework. In in

Re: [dpdk-dev] [PATCH v1] doc: add SPDX Licence to doc files

2018-04-09 Thread Hemant Agrawal
On 4/9/2018 7:24 PM, Ferruh Yigit wrote: On 4/9/2018 2:11 PM, Marko Kovacevic wrote: Added SPDX headers to doc files to have them aligned with the other doc files. Signed-off-by: Marko Kovacevic <...> doc/guides/rel_notes/release_16_04.rst | 3 +++ doc/guides/rel_notes/release

Re: [dpdk-dev] [PATCH v5 4/4] testpmd: make use of per-PMD TxRx parameters

2018-04-09 Thread Shreyansh Jain
> -Original Message- > From: Remy Horton [mailto:remy.hor...@intel.com] > Sent: Monday, April 9, 2018 8:09 PM > To: Shreyansh Jain ; dev@dpdk.org > Cc: John McNamara ; Wenzhuo Lu > ; Jingjing Wu ; Qi Zhang > ; Beilei Xing ; Thomas > Monjalon > Subject: Re: [dpdk-dev] [PATCH v5 4/4] testpmd

Re: [dpdk-dev] [PATCH 3/6] drivers: use SPDX tag for RehiveTech copyright files

2018-04-09 Thread Hemant Agrawal
On 4/10/2018 3:45 AM, Jan Viktorin wrote: Replace the BSD license header with the SPDX tag for files with only an RehiveTech copyright on them. Signed-off-by: Jan Viktorin --- drivers/bus/vdev/rte_bus_vdev.h | 32 ++-- drivers/bus/vdev/vdev.c | 32 ++--

Re: [dpdk-dev] [PATCH 4/6] test: use SPDX tag for RehiveTech copyright files

2018-04-09 Thread Hemant Agrawal
On 4/10/2018 3:45 AM, Jan Viktorin wrote: Replace the BSD license header with the SPDX tag for files with only an RehiveTech copyright on them. Signed-off-by: Jan Viktorin --- test/test/resource.c | 33 ++--- test/test/resource.h | 33 ++-

Re: [dpdk-dev] [PATCH 5/6] config: use SPDX tag for RehiveTech copyright files

2018-04-09 Thread Hemant Agrawal
On 4/10/2018 3:45 AM, Jan Viktorin wrote: Replace the BSD license header with the SPDX tag for files with only an RehiveTech copyright on them. Signed-off-by: Jan Viktorin --- config/defconfig_arm-armv7a-linuxapp-gcc | 31 ++- 1 file changed, 2 insertions(+), 29 d

Re: [dpdk-dev] [PATCH 2/6] lib: use SPDX tag for RehiveTech copyright files

2018-04-09 Thread Hemant Agrawal
On 4/10/2018 3:45 AM, Jan Viktorin wrote: Replace the BSD license header with the SPDX tag for files with only an RehiveTech copyright on them. Signed-off-by: Jan Viktorin --- .../common/include/arch/arm/rte_atomic.h | 32 ++ .../common/include/arch/arm/rte_atom

Re: [dpdk-dev] [PATCH 1/6] mk: use SPDX tag for RehiveTech copyright files

2018-04-09 Thread Hemant Agrawal
On 4/10/2018 3:45 AM, Jan Viktorin wrote: Replace the BSD license header with the SPDX tag for files with only an RehiveTech copyright on them. Signed-off-by: Jan Viktorin --- mk/arch/arm/rte.vars.mk | 32 ++-- mk/machine/armv7a/rte.vars.mk | 31 ++--

Re: [dpdk-dev] [PATCH v2] net/i40e: fix flow RSS queue index check error

2018-04-09 Thread Zhao1, Wei
> -Original Message- > From: Zhang, Qi Z > Sent: Monday, April 9, 2018 9:57 PM > To: Zhao1, Wei ; dev@dpdk.org > Cc: sta...@dpdk.org > Subject: RE: [PATCH v2] net/i40e: fix flow RSS queue index check error > > > > > -Original Message- > > From: Zhao1, Wei > > Sent: Monday, Apri

Re: [dpdk-dev] [PATCH v2 1/6] mbuf: add buffer offset field for flexible indirection

2018-04-09 Thread Yongseok Koh
On Mon, Apr 09, 2018 at 06:04:34PM +0200, Olivier Matz wrote: > Hi Yongseok, > > On Tue, Apr 03, 2018 at 05:12:06PM -0700, Yongseok Koh wrote: > > On Tue, Apr 03, 2018 at 10:26:15AM +0200, Olivier Matz wrote: > > > Hi, > > > > > > On Mon, Apr 02, 2018 at 11:50:03AM -0700, Yongseok Koh wrote: > >

Re: [dpdk-dev] [PATCH v2] net/i40e: fix flow RSS queue index check error

2018-04-09 Thread Zhao1, Wei
> -Original Message- > From: Zhang, Qi Z > Sent: Monday, April 9, 2018 9:57 PM > To: Zhao1, Wei ; dev@dpdk.org > Cc: sta...@dpdk.org > Subject: RE: [PATCH v2] net/i40e: fix flow RSS queue index check error > > > > > -Original Message- > > From: Zhao1, Wei > > Sent: Monday, Apri

Re: [dpdk-dev] [PATCH 6/6] lib: use SPDX tag for Cavium & RehiveTech copyright files

2018-04-09 Thread Jerin Jacob
-Original Message- > Date: Tue, 10 Apr 2018 00:15:58 +0200 > From: Jan Viktorin > To: dev@dpdk.org > CC: jerin.ja...@caviumnetworks.com, Thomas Monjalon , > Hemant Agrawal , Jan Viktorin > > Subject: [PATCH 6/6] lib: use SPDX tag for Cavium & RehiveTech copyright > files > X-Mailer: gi

[dpdk-dev] [PATCH v4 3/3] doc: add Broadcom Stingray SoC support to release notes

2018-04-09 Thread Ajit Khaparde
From: Scott Branden Update 18.05 release notes to indicate support for Broadcom Stingray SoC support. Signed-off-by: Scott Branden --- doc/guides/rel_notes/release_18_05.rst | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/doc/guides/rel_notes/release_18_05.

[dpdk-dev] [PATCH v4 2/3] net/bnxt: add support for Stingray PF devices ids

2018-04-09 Thread Ajit Khaparde
From: Scott Branden Add support for Stingray PF devices ids: BCM58802 = 0xd802 BCM58804 = 0xd804 BCM58808 = 0x16f0 Signed-off-by: Scott Branden --- drivers/net/bnxt/bnxt_ethdev.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_et

[dpdk-dev] [PATCH v4 0/3] bnxt patchset to support Stingray product family

2018-04-09 Thread Ajit Khaparde
Patchset adding support for Broadcom Stingray product family Scott Branden (3): introduce Broadcom Stingray net/bnxt: add support for Stingray PF devices ids doc: add Broadcom Stingray SoC support to release notes config/defconfig_arm64-stingray-linuxapp-gcc | 16 doc/guid

[dpdk-dev] [PATCH v4 1/3] introduce Broadcom Stingray

2018-04-09 Thread Ajit Khaparde
From: Scott Branden Add Broadcom Stingray machine support based on armv8. For product brief see: https://www.broadcom.com/products/ethernet-connectivity/controllers/bcm58800 Signed-off-by: Scott Branden Signed-off-by: Ajit Khaparde --- config/defconfig_arm64-stingray-linuxapp-gcc | 16 ++

Re: [dpdk-dev] [RFC 0/2] TAP TSO Implementation

2018-04-09 Thread Ophir Munk
Patch sent for this release. > -Original Message- > From: Ferruh Yigit [mailto:ferruh.yi...@intel.com] > Sent: Monday, April 09, 2018 7:39 PM > To: Ophir Munk ; dev@dpdk.org; Pascal Mazon > > Cc: Thomas Monjalon ; Olga Shern > > Subject: Re: [dpdk-dev] [RFC 0/2] TAP TSO Implementation >

Re: [dpdk-dev] [PATCH] examples/ip_pipeline: fix freebsd build error

2018-04-09 Thread Thomas Monjalon
09/04/2018 14:06, Jasvinder Singh: > IP_Pipeline app is not supported in FreeBSD environment. Therefore, > skip it while building the sample apps on FreeBSD. > > Fixes: 4bbf8e30aa5e ("examples/ip_pipeline: add CLI interface") > Fixes: 2f74ae28e23f ("examples/ip_pipeline: add tap object") > > Sign

[dpdk-dev] [PATCH v1 2/2] net/tap: support TSO (TCP Segment Offload)

2018-04-09 Thread Ophir Munk
This commit implements TCP segmentation offload in TAP. librte_gso library is used to segment large TCP payloads (e.g. packets of 64K bytes size) into smaller MTU size buffers. By supporting TSO offload capability in software a TAP device can be used as a failsafe sub device and be paired with anot

[dpdk-dev] [PATCH v1 0/2] TAP TSO

2018-04-09 Thread Ophir Munk
This patch implements TAP TSO (TSP segmentation offload) in SW. It uses dpdk library librte_gso. Dpdk librte_gso library segments large TCP payloads (e.g. 64K bytes) into smaller size buffers. By supporting TSO offload capability in software a TAP device can be used as a failsafe sub device and be

[dpdk-dev] [PATCH v1 1/2] net/tap: calculate checksums of multi segs packets

2018-04-09 Thread Ophir Munk
Prior to this commit IP/UDP/TCP checksum offload calculations were skipped in case of a multi segments packet. This commit enables TAP checksum calculations for multi segments packets. The only restriction is that the first segment must contain all headers of layers 2, 3 and 4 (where layer 4 header

[dpdk-dev] [PATCH 4/6] test: use SPDX tag for RehiveTech copyright files

2018-04-09 Thread Jan Viktorin
Replace the BSD license header with the SPDX tag for files with only an RehiveTech copyright on them. Signed-off-by: Jan Viktorin --- test/test/resource.c | 33 ++--- test/test/resource.h | 33 ++--- test/test/test_resource.c | 33

[dpdk-dev] [PATCH 5/6] config: use SPDX tag for RehiveTech copyright files

2018-04-09 Thread Jan Viktorin
Replace the BSD license header with the SPDX tag for files with only an RehiveTech copyright on them. Signed-off-by: Jan Viktorin --- config/defconfig_arm-armv7a-linuxapp-gcc | 31 ++- 1 file changed, 2 insertions(+), 29 deletions(-) diff --git a/config/defconfig_arm

[dpdk-dev] [PATCH 3/6] drivers: use SPDX tag for RehiveTech copyright files

2018-04-09 Thread Jan Viktorin
Replace the BSD license header with the SPDX tag for files with only an RehiveTech copyright on them. Signed-off-by: Jan Viktorin --- drivers/bus/vdev/rte_bus_vdev.h | 32 ++-- drivers/bus/vdev/vdev.c | 32 ++-- 2 files changed, 4 i

[dpdk-dev] [PATCH 6/6] lib: use SPDX tag for Cavium & RehiveTech copyright files

2018-04-09 Thread Jan Viktorin
Replace the BSD license header with the SPDX tag for files with a RehiveTech and Cavium copyright on them. Signed-off-by: Jan Viktorin --- lib/librte_eal/common/arch/arm/rte_cpuflags.c | 34 +++ 1 file changed, 3 insertions(+), 31 deletions(-) diff --git a/lib/librte_eal

[dpdk-dev] [PATCH 1/6] mk: use SPDX tag for RehiveTech copyright files

2018-04-09 Thread Jan Viktorin
Replace the BSD license header with the SPDX tag for files with only an RehiveTech copyright on them. Signed-off-by: Jan Viktorin --- mk/arch/arm/rte.vars.mk | 32 ++-- mk/machine/armv7a/rte.vars.mk | 31 ++- 2 files changed, 4 insert

[dpdk-dev] [PATCH 0/6] Use SPDX identifier of RehiveTech code

2018-04-09 Thread Jan Viktorin
Hi all, I've updated all relevant code to SPDX license. The last commit also updates the Cavium copyright, I've separated it for clarity otherwise it can be squashed into 02. Jan Jan Viktorin (6): mk: use SPDX tag for RehiveTech copyright files lib: use SPDX tag for RehiveTech copyright file

[dpdk-dev] [PATCH 2/6] lib: use SPDX tag for RehiveTech copyright files

2018-04-09 Thread Jan Viktorin
Replace the BSD license header with the SPDX tag for files with only an RehiveTech copyright on them. Signed-off-by: Jan Viktorin --- .../common/include/arch/arm/rte_atomic.h | 32 ++ .../common/include/arch/arm/rte_atomic_32.h| 32 ++ ..

[dpdk-dev] [PATCH v4 09/11] event/octeontx: optimize timer adapter resolution parameters

2018-04-09 Thread Pavan Nikhilesh
When application sets `RTE_EVENT_TIMER_ADAPTER_F_ADJUST_RES` flag while creating adapter underlying driver is free to optimize the resolution for best possible configuration. Signed-off-by: Pavan Nikhilesh Acked-by: Jerin Jacob --- drivers/event/octeontx/timvf_evdev.c | 52 +

[dpdk-dev] [PATCH v4 11/11] doc: update eventdev OcteonTx documentation

2018-04-09 Thread Pavan Nikhilesh
Signed-off-by: Pavan Nikhilesh Acked-by: Jerin Jacob --- MAINTAINERS | 4 doc/guides/eventdevs/octeontx.rst | 29 + 2 files changed, 33 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 7e966580b..c201e0f7f 100644 --- a/MAINTAINER

[dpdk-dev] [PATCH v4 10/11] event/octeontx: add option to use fpavf as chunk pool

2018-04-09 Thread Pavan Nikhilesh
Add compile-time configurable option to force TIMvf to use Octeontx FPAvf pool manager as its chunk pool. When FPAvf is used as pool manager the TIMvf automatically frees the chunks to FPAvf through gpool-id. Signed-off-by: Pavan Nikhilesh --- drivers/event/octeontx/timvf_evdev.c | 22 +

[dpdk-dev] [PATCH v4 08/11] event/octeontx: add burst mode for timer arm

2018-04-09 Thread Pavan Nikhilesh
Signed-off-by: Pavan Nikhilesh --- drivers/event/octeontx/timvf_evdev.c | 3 + drivers/event/octeontx/timvf_evdev.h | 7 ++ drivers/event/octeontx/timvf_worker.c | 53 +++ drivers/event/octeontx/timvf_worker.h | 95 +++ 4 files changed, 158 insertions(+) d

[dpdk-dev] [PATCH v4 05/11] event/octeontx: add event timer stats get and reset

2018-04-09 Thread Pavan Nikhilesh
Add functions to get and reset event timer adapter stats. Signed-off-by: Pavan Nikhilesh --- drivers/event/octeontx/ssovf_evdev.c | 14 - drivers/event/octeontx/timvf_evdev.c | 30 +++- drivers/event/octeontx/timvf_evdev.h | 3 +++ 3 files changed, 45 inserti

[dpdk-dev] [PATCH v4 06/11] event/octeontx: add multiproducer timer arm and cancel

2018-04-09 Thread Pavan Nikhilesh
Signed-off-by: Pavan Nikhilesh Acked-by: Jerin Jacob --- drivers/event/octeontx/Makefile | 5 + drivers/event/octeontx/meson.build| 1 + drivers/event/octeontx/timvf_evdev.c | 9 +- drivers/event/octeontx/timvf_evdev.h | 35 drivers/event/octeontx/timvf_worker.c | 107 +++

[dpdk-dev] [PATCH v4 04/11] event/octeontx: add support to start and stop timer device

2018-04-09 Thread Pavan Nikhilesh
When application requests to start the timer adapter through `rte_event_timer_adapter_start`, Octeontx TIMvf ring does the following: - Uses mbox to communicate TIMpf driver about, * SCLK frequency used to convert ns<->cycles. * program the ring control parameters and start the ring. * get th

[dpdk-dev] [PATCH v4 07/11] event/octeontx: add single producer timer arm variant

2018-04-09 Thread Pavan Nikhilesh
When application creates the timer adapter by passing `RTE_EVENT_TIMER_ADAPTER_F_SP_PUT` flag, we can optimize the arm sequence by removing the locking overhead. Signed-off-by: Pavan Nikhilesh --- drivers/event/octeontx/timvf_evdev.c | 19 --- drivers/event/octeontx/timvf_evdev.h | 5

[dpdk-dev] [PATCH v4 03/11] event/octeontx: add support to create and free timer adapter

2018-04-09 Thread Pavan Nikhilesh
When the application requests to create a timer device, Octeontx TIM create does the following: - Get the requested TIMvf ring based on adapter_id. - Verify the config parameters supplied. - Allocate memory required for * Buckets based on min and max timeout supplied. * Allocate the chunk pool

[dpdk-dev] [PATCH v4 02/11] event/octeontx: add support to probe timvf PCIe devices

2018-04-09 Thread Pavan Nikhilesh
On Octeontx HW, each event timer device is enumerated as separate SRIOV VF PCIe device. In order to expose as a event timer device: On PCIe probe, the driver stores the information associated with the PCIe device and later when appliacation requests for a event timer device through `rte_event_time

[dpdk-dev] [PATCH v4 01/11] usertools: add Cavium TIM as an event device

2018-04-09 Thread Pavan Nikhilesh
Signed-off-by: Pavan Nikhilesh Acked-by: Jerin Jacob --- usertools/dpdk-devbind.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/usertools/dpdk-devbind.py b/usertools/dpdk-devbind.py index ff4b186e8..d0c420906 100755 --- a/usertools/dpdk-devbind.py +++ b/usertools/dpdk-

[dpdk-dev] [PATCH v4 00/11] event/octeontx: add event timer adapter driver

2018-04-09 Thread Pavan Nikhilesh
The event timer adapter[1] provides APIs to configure an event timer device that allows an application to arm timers which on expiry push events to an event device such as OcteonTx SSO. The OcteonTx TIM is a co-processor that can be configured as an event timer adapter which can be used by an appli

Re: [dpdk-dev] [PATCH v5 00/70] Memory Hotplug for DPDK

2018-04-09 Thread gowrishankar muthukrishnan
On Monday 09 April 2018 11:30 PM, Anatoly Burakov wrote: This patchset introduces dynamic memory allocation for DPDK (aka memory hotplug). Based upon RFC submitted in December [1]. Dependencies (to be applied in specified order): - EAL IOVA fix [2] Deprecation notices relevant to this patchset:

[dpdk-dev] [PATCH] vhost/crypto: fix session id printf

2018-04-09 Thread Fan Zhang
Fixes: 85a2d5cab96f ("vhost/crypto: add virtio-crypto user message structure") Signed-off-by: Fan Zhang --- lib/librte_vhost/vhost_crypto.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/librte_vhost/vhost_crypto.c b/lib/librte_vhost/vhost_crypto.c index d

[dpdk-dev] [PATCH] examples/vhost_crypto: fix parsing

2018-04-09 Thread Fan Zhang
Fixes: 2ce5bd8c442d ("examples/vhost_crypto: add vhost crypto sample application") This patch fixes the parsing of cryptodev id in the cmdline. Signed-off-by: Fan Zhang --- examples/vhost_crypto/main.c | 5 - 1 file changed, 5 deletions(-) diff --git a/examples/vhost_crypto/main.c b/examp

[dpdk-dev] [PATCH] vhost/crypto: fix makefile

2018-04-09 Thread Fan Zhang
Fixes: 7b5ad7beee17 ("vhost/crypto: update makefile") Signed-off-by: Fan Zhang --- lib/librte_vhost/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/librte_vhost/Makefile b/lib/librte_vhost/Makefile index 2cc65f95e..92c267475 100644 --- a/lib/librte_vhost/Makefi

[dpdk-dev] [PATCH v5 64/70] vfio: enable support for mem event callbacks

2018-04-09 Thread Anatoly Burakov
Enable callbacks on first device attach, disable callbacks on last device attach. PPC64 IOMMU does memseg walk, which will cause a deadlock on trying to do it inside a callback, so provide a local, thread-unsafe copy of memseg walk. PPC64 IOMMU also may remap the entire memory map for DMA while a

[dpdk-dev] [PATCH v5 68/70] eal: add memory validator callback

2018-04-09 Thread Anatoly Burakov
This API will enable application to register for notifications on page allocations that are about to happen, giving the application a chance to allow or deny the allocation when total memory utilization as a result would be above specified limit on specified socket. Signed-off-by: Anatoly Burakov

[dpdk-dev] [PATCH v5 70/70] eal: prevent preallocated pages from being freed

2018-04-09 Thread Anatoly Burakov
It is common sense to expect for DPDK process to not deallocate any pages that were preallocated by "-m" or "--socket-mem" flags - yet, currently, DPDK memory subsystem will do exactly that once it finds that the pages are unused. Fix this by marking pages as unfreebale, and preventing malloc from

[dpdk-dev] [PATCH v5 61/70] eal: add support for multiprocess memory hotplug

2018-04-09 Thread Anatoly Burakov
This enables multiprocess synchronization for memory hotplug requests at runtime (as opposed to initialization). Basic workflow is the following. Primary process always does initial mapping and unmapping, and secondary processes always follow primary page map. Only one allocation request can be ac

[dpdk-dev] [PATCH v5 69/70] eal: enable validation before new page allocation

2018-04-09 Thread Anatoly Burakov
Signed-off-by: Anatoly Burakov Tested-by: Santosh Shukla Tested-by: Hemant Agrawal --- lib/librte_eal/common/malloc_heap.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/librte_eal/common/malloc_heap.c b/lib/librte_eal/common/malloc_heap.c index 18c7b69..f8da

[dpdk-dev] [PATCH v5 67/70] eal: enable non-legacy memory mode

2018-04-09 Thread Anatoly Burakov
Now that every other piece of the puzzle is in place, enable non-legacy init mode. Signed-off-by: Anatoly Burakov Tested-by: Santosh Shukla Tested-by: Hemant Agrawal --- lib/librte_eal/linuxapp/eal/eal.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/

[dpdk-dev] [PATCH v5 66/70] bus/fslmc: enable support for mem event callbacks for vfio

2018-04-09 Thread Anatoly Burakov
VFIO needs to map and unmap segments for DMA whenever they become available or unavailable, so register a callback for memory events, and provide map/unmap functions. Remove unneeded check for number of segments, as in non-legacy mode this now becomes a valid scenario. Signed-off-by: Shreyansh Ja

[dpdk-dev] [PATCH v5 65/70] bus/fslmc: move vfio DMA map into bus probe

2018-04-09 Thread Anatoly Burakov
fslmc bus needs to map all allocated memory for VFIO before device probe. This bus doesn't support hotplug, so at the time of this call, all possible device that could be present, are present. This will also be the place where we install VFIO callback, although this change will come in the next pat

[dpdk-dev] [PATCH v5 63/70] eal: enable callbacks on malloc/free and mp sync

2018-04-09 Thread Anatoly Burakov
Callbacks will be triggered just after allocation and just before deallocation, to ensure that memory address space referenced in the callback is always valid by the time callback is called. Signed-off-by: Anatoly Burakov Tested-by: Santosh Shukla Tested-by: Hemant Agrawal --- lib/librte_eal/c

[dpdk-dev] [PATCH v5 62/70] eal: add support for callbacks on memory hotplug

2018-04-09 Thread Anatoly Burakov
Each process will have its own callbacks. Callbacks will indicate whether it's allocation and deallocation that's happened, and will also provide start VA address and length of allocated block. Since memory hotplug isn't supported on FreeBSD and in legacy mem mode, it will not be possible to regis

[dpdk-dev] [PATCH v5 54/70] eal: add API to check if memory is contiguous

2018-04-09 Thread Anatoly Burakov
For now, memory is always contiguous because legacy mem mode is enabled unconditionally, but this function will be helpful down the line when we implement support for allocating physically non-contiguous memory. We can no longer guarantee physically contiguous memory unless we're in legacy or IOVA_

[dpdk-dev] [PATCH v5 60/70] eal: enable memory hotplug support in rte_malloc

2018-04-09 Thread Anatoly Burakov
This set of changes enables rte_malloc to allocate and free memory as needed. Currently, it is disabled because legacy mem mode is enabled unconditionally. The way it works is, first malloc checks if there is enough memory already allocated to satisfy user's request. If there isn't, we try and all

[dpdk-dev] [PATCH v5 59/70] eal: add secondary process init with memory hotplug

2018-04-09 Thread Anatoly Burakov
Secondary initialization will just sync memory map with primary process. Signed-off-by: Anatoly Burakov Tested-by: Santosh Shukla Tested-by: Hemant Agrawal --- Notes: v3: - Improved handling of EAL hugepage info lib/librte_eal/common/eal_common_memory.c | 1 + lib/librte_eal/linuxap

[dpdk-dev] [PATCH v5 55/70] eal: prepare memseg lists for multiprocess sync

2018-04-09 Thread Anatoly Burakov
In preparation for implementing multiprocess support, we are adding a version number to memseg lists. We will not need any locks, because memory hotplug will have a global lock (so any time memory map and thus version number might change, we will already be holding a lock). There are two ways of i

[dpdk-dev] [PATCH v5 58/70] eal: share hugepage info primary and secondary

2018-04-09 Thread Anatoly Burakov
Since we are going to need to map hugepages in both primary and secondary processes, we need to know where we should look for hugetlbfs mountpoints. So, share those with secondary processes, and map them on init. Signed-off-by: Anatoly Burakov Tested-by: Santosh Shukla Tested-by: Hemant Agrawal

[dpdk-dev] [PATCH v5 57/70] eal: make use of memory hotplug for init

2018-04-09 Thread Anatoly Burakov
Add a new (non-legacy) memory init path for EAL. It uses the new memory hotplug facilities. If no -m or --socket-mem switches were specified, the new init will not allocate anything, whereas if those switches were passed, appropriate amounts of pages would be requested, just like for legacy init.

[dpdk-dev] [PATCH v5 49/70] eal: replace memseg with memseg lists

2018-04-09 Thread Anatoly Burakov
Before, we were aggregating multiple pages into one memseg, so the number of memsegs was small. Now, each page gets its own memseg, so the list of memsegs is huge. To accommodate the new memseg list size and to keep the under-the-hood workings sane, the memseg list is now not just a single list, bu

[dpdk-dev] [PATCH v5 52/70] eal: add support for unmapping pages at runtime

2018-04-09 Thread Anatoly Burakov
This isn't used anywhere yet, but the support is now there. Also, adding cleanup to allocation procedures, so that if we fail to allocate everything we asked for, we can free all of it back. Signed-off-by: Anatoly Burakov Tested-by: Santosh Shukla Tested-by: Hemant Agrawal --- lib/librte_eal/b

[dpdk-dev] [PATCH v5 56/70] eal: read hugepage counts from node-specific sysfs path

2018-04-09 Thread Anatoly Burakov
For non-legacy memory init mode, instead of looking at generic sysfs path, look at sysfs paths pertaining to each NUMA node for hugepage counts. Note that per-NUMA node path does not provide information regarding reserved pages, so we might not get the best info from these paths, but this saves us

[dpdk-dev] [PATCH v5 50/70] eal: replace memzone array with fbarray

2018-04-09 Thread Anatoly Burakov
It's there, so we might as well use it. Some operations will be sped up by that. Since we have to allocate an fbarray for memzones, we have to do it before we initialize memory subsystem, because that, in secondary processes, will (later) allocate more fbarrays than the primary process, which will

[dpdk-dev] [PATCH v5 51/70] eal: add support for mapping hugepages at runtime

2018-04-09 Thread Anatoly Burakov
Nothing uses this code yet. The bulk of it is copied from old memory allocation code (linuxapp eal_memory.c). We provide an EAL-internal API to allocate either one page or multiple pages, guaranteeing that we'll get contiguous VA for all of the pages that we requested. Not supported on FreeBSD. L

[dpdk-dev] [PATCH v5 53/70] eal: add "single file segments" command-line option

2018-04-09 Thread Anatoly Burakov
Currently, DPDK stores all pages as separate files in hugetlbfs. This option will allow storing all pages in one file (one file per memseg list). We do this by using fallocate() calls on FreeBSD, however this is only supported on fairly recent (4.3+) kernels, so ftruncate() fallback is provided to

[dpdk-dev] [PATCH v5 48/70] eal: add rte_fbarray

2018-04-09 Thread Anatoly Burakov
rte_fbarray is a simple indexed array stored in shared memory via mapping files into memory. Rationale for its existence is the following: since we are going to map memory page-by-page, there could be quite a lot of memory segments to keep track of (for smaller page sizes, page count can easily rea

[dpdk-dev] [PATCH v5 47/70] eal: add "legacy memory" option

2018-04-09 Thread Anatoly Burakov
This adds a "--legacy-mem" command-line switch. It will be used to go back to the old memory behavior, one where we can't dynamically allocate/free memory (the downside), but one where the user can get physically contiguous memory, like before (the upside). For now, nothing but the legacy behavior

[dpdk-dev] [PATCH v5 46/70] vfio: allow to map other memory regions

2018-04-09 Thread Anatoly Burakov
Currently it is not possible to use memory that is not owned by DPDK to perform DMA. This scenarion might be used in vhost applications (like SPDK) where guest send its own memory table. To fill this gap provide API to allow registering arbitrary address in VFIO container. Signed-off-by: Pawel Wod

[dpdk-dev] [PATCH v5 44/70] net/mlx5: use virt2memseg instead of iteration

2018-04-09 Thread Anatoly Burakov
Reduce dependency on internal details of EAL memory subsystem, and simplify code. Signed-off-by: Anatoly Burakov Tested-by: Santosh Shukla Tested-by: Hemant Agrawal --- Notes: v5: - Remove unused variable drivers/net/mlx5/mlx5_mr.c | 19 --- 1 file changed, 8 insertio

[dpdk-dev] [PATCH v5 45/70] eal: use memzone walk instead of iteration

2018-04-09 Thread Anatoly Burakov
Simplify memzone dump code to use memzone walk, to not maintain the same memzone iteration code twice. Signed-off-by: Anatoly Burakov Tested-by: Santosh Shukla Tested-by: Hemant Agrawal --- lib/librte_eal/common/eal_common_memzone.c | 42 +++--- 1 file changed, 21 inser

[dpdk-dev] [PATCH v5 40/70] eal: add virt2memseg function

2018-04-09 Thread Anatoly Burakov
This can be used as a virt2iova function that only looks up memory that is owned by DPDK (as opposed to doing pagemap walks). Using this will result in less dependency on internals of mem API. Signed-off-by: Anatoly Burakov Tested-by: Santosh Shukla Tested-by: Hemant Agrawal --- lib/librte_eal

[dpdk-dev] [PATCH v5 43/70] net/mlx4: use virt2memseg instead of iteration

2018-04-09 Thread Anatoly Burakov
Reduce dependency on internal details of EAL memory subsystem, and simplify code. Signed-off-by: Anatoly Burakov Tested-by: Santosh Shukla Tested-by: Hemant Agrawal --- Notes: v5: - Remove unused variable drivers/net/mlx4/mlx4_mr.c | 18 +++--- 1 file changed, 7 insertion

[dpdk-dev] [PATCH v5 41/70] bus/fslmc: use virt2memseg instead of iteration

2018-04-09 Thread Anatoly Burakov
Reduce dependency on internal details of EAL memory subsystem, and simplify code. Signed-off-by: Anatoly Burakov Tested-by: Santosh Shukla Tested-by: Hemant Agrawal --- drivers/bus/fslmc/portal/dpaa2_hw_pvt.h | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/d

[dpdk-dev] [PATCH v5 42/70] crypto/dpaa_sec: use virt2memseg instead of iteration

2018-04-09 Thread Anatoly Burakov
Reduce dependency on internal details of EAL memory subsystem, and simplify code. Signed-off-by: Anatoly Burakov Tested-by: Santosh Shukla Tested-by: Hemant Agrawal --- drivers/crypto/dpaa_sec/dpaa_sec.c | 19 +-- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/d

[dpdk-dev] [PATCH v5 39/70] crypto/dpaa_sec: use iova2virt instead of memseg iteration

2018-04-09 Thread Anatoly Burakov
Reduce dependency on internal details of EAL memory subsystem, and simplify code. Signed-off-by: Anatoly Burakov Tested-by: Santosh Shukla Tested-by: Hemant Agrawal --- drivers/crypto/dpaa_sec/dpaa_sec.c | 11 +-- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/drivers/cr

[dpdk-dev] [PATCH v5 38/70] bus/fslmc: use iova2virt instead of memseg iteration

2018-04-09 Thread Anatoly Burakov
Reduce dependency on internal details of EAL memory subsystem, and simplify code. Signed-off-by: Anatoly Burakov Tested-by: Santosh Shukla Tested-by: Hemant Agrawal --- Notes: v4: - Fixed usage of experimental API's v3: - Added this patch drivers/bus/fslmc/portal/dpaa2_h

[dpdk-dev] [PATCH v5 36/70] eal: add iova2virt function

2018-04-09 Thread Anatoly Burakov
This is reverse lookup of PA to VA. Using this will make other code less dependent on internals of mem API. Signed-off-by: Anatoly Burakov Tested-by: Santosh Shukla Tested-by: Hemant Agrawal --- lib/librte_eal/common/eal_common_memory.c | 30 ++ lib/librte_eal/comm

[dpdk-dev] [PATCH v5 34/70] eal: add contig walk function

2018-04-09 Thread Anatoly Burakov
This function is meant to walk over first segment of each VA-contiguous group of memsegs. For future users of this function, this is done so that there is less dependency on internals of mem API and less noise later change sets. Signed-off-by: Anatoly Burakov Tested-by: Santosh Shukla Tested-by

[dpdk-dev] [PATCH v5 37/70] bus/dpaa: use iova2virt instead of memseg iteration

2018-04-09 Thread Anatoly Burakov
Reduce dependency on internal details of EAL memory subsystem, and simplify code. Signed-off-by: Anatoly Burakov Tested-by: Santosh Shukla Tested-by: Hemant Agrawal --- Notes: v4: - Fixed usage of experimental API's v3: - Added this patch drivers/bus/dpaa/rte_dpaa_bus.h

[dpdk-dev] [PATCH v5 33/70] vfio/spapr: use memseg walk instead of iteration

2018-04-09 Thread Anatoly Burakov
Reduce dependency on internal details of EAL memory subsystem, and simplify code. Signed-off-by: Anatoly Burakov Tested-by: Santosh Shukla Tested-by: Hemant Agrawal --- Notes: v5: - Add missing window creation lib/librte_eal/linuxapp/eal/eal_vfio.c | 113 -

[dpdk-dev] [PATCH v5 35/70] virtio: use memseg contig walk instead of iteration

2018-04-09 Thread Anatoly Burakov
Reduce dependency on internal details of EAL memory subsystem, and simplify code. Signed-off-by: Anatoly Burakov Tested-by: Santosh Shukla Tested-by: Hemant Agrawal --- drivers/net/virtio/virtio_user/vhost_kernel.c | 83 +++ 1 file changed, 35 insertions(+), 48 deletion

[dpdk-dev] [PATCH v5 08/70] eal: make malloc free return resulting malloc element

2018-04-09 Thread Anatoly Burakov
This will be needed because we need to know how big is the new empty space, to check whether we can free some pages as a result. Signed-off-by: Anatoly Burakov Tested-by: Santosh Shukla Tested-by: Hemant Agrawal --- Notes: v4: clarified commit message lib/librte_eal/common/malloc_elem.c

[dpdk-dev] [PATCH v5 28/70] net/mlx5: use memseg walk instead of iteration

2018-04-09 Thread Anatoly Burakov
Reduce dependency on internal details of EAL memory subsystem, and simplify code. Signed-off-by: Anatoly Burakov Tested-by: Santosh Shukla Tested-by: Hemant Agrawal --- drivers/net/mlx5/Makefile | 3 +++ drivers/net/mlx5/mlx5.c | 24 +++- 2 files changed, 18 insertions(+

[dpdk-dev] [PATCH v5 31/70] test: use memseg walk instead of iteration

2018-04-09 Thread Anatoly Burakov
Reduce dependency on internal details of EAL memory subsystem, and simplify code. Signed-off-by: Anatoly Burakov Tested-by: Santosh Shukla Tested-by: Hemant Agrawal --- test/test/test_malloc.c | 40 +++- test/test/test_memory.c | 23 +++-- test

[dpdk-dev] [PATCH v5 32/70] vfio/type1: use memseg walk instead of iteration

2018-04-09 Thread Anatoly Burakov
Reduce dependency on internal details of EAL memory subsystem, and simplify code. Signed-off-by: Anatoly Burakov Tested-by: Santosh Shukla Tested-by: Hemant Agrawal --- lib/librte_eal/linuxapp/eal/eal_vfio.c | 45 -- 1 file changed, 21 insertions(+), 24 deletion

[dpdk-dev] [PATCH v5 29/70] eal: use memseg walk instead of iteration

2018-04-09 Thread Anatoly Burakov
Reduce dependency on internal details of EAL memory subsystem, and simplify code. Signed-off-by: Anatoly Burakov Tested-by: Santosh Shukla Tested-by: Hemant Agrawal --- lib/librte_eal/bsdapp/eal/eal.c | 25 +++- lib/librte_eal/common/eal_common_memory.c | 67 -

[dpdk-dev] [PATCH v5 30/70] mempool: use memseg walk instead of iteration

2018-04-09 Thread Anatoly Burakov
Reduce dependency on internal details of EAL memory subsystem, and simplify code. Signed-off-by: Anatoly Burakov Tested-by: Santosh Shukla Tested-by: Hemant Agrawal --- lib/librte_mempool/Makefile | 3 +++ lib/librte_mempool/meson.build | 3 +++ lib/librte_mempool/rte_mempool.c | 24 +

[dpdk-dev] [PATCH v5 26/70] bus/fslmc: use memseg walk instead of iteration

2018-04-09 Thread Anatoly Burakov
Reduce dependency on internal details of EAL memory subsystem, and simplify code. Signed-off-by: Anatoly Burakov Acked-by: Shreyansh Jain Tested-by: Santosh Shukla Tested-by: Hemant Agrawal --- drivers/bus/fslmc/fslmc_vfio.c | 78 ++ 1 file changed, 41

[dpdk-dev] [PATCH v5 20/70] net/i40e: use contiguous allocation for DMA memory

2018-04-09 Thread Anatoly Burakov
All hardware drivers should allocate IOVA-contiguous memzones for their hardware resources. Signed-off-by: Anatoly Burakov Tested-by: Santosh Shukla Tested-by: Hemant Agrawal --- Notes: v4: - Use new memzone flag instead of new API - Remove experimental API from build files

[dpdk-dev] [PATCH v5 27/70] bus/pci: use memseg walk instead of iteration

2018-04-09 Thread Anatoly Burakov
Reduce dependency on internal details of EAL memory subsystem, and simplify code. Signed-off-by: Anatoly Burakov Tested-by: Santosh Shukla Tested-by: Hemant Agrawal --- drivers/bus/pci/Makefile| 3 +++ drivers/bus/pci/linux/pci.c | 26 ++ drivers/bus/pci/meson.buil

  1   2   3   >