[dpdk-dev] [PATCH] net/i40e: add comment for flow RSS parse function

2018-04-08 Thread Wei Zhao
This patch add comment for flow rss parse function in order to explain some important info. Fixes: ecad87d22383 ("net/i40e: move RSS to flow API") Signed-off-by: Wei Zhao --- drivers/net/i40e/i40e_flow.c | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/net/i40e/i40e_flo

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

2018-04-08 Thread Padam Jeet Singh
> On 06-Apr-2018, at 11:12 PM, Yong Wang wrote: > > Padam, > > As far as I know, this feature works. What DPDK version did you use? DPDK Version 17.05 > Is there any port reconfiguration (stop/start/mtu change, etc) that could > lose your vlan offload settings (a dump of the port config at

Re: [dpdk-dev] [PATCH v3 07/21] net/virtio: implement transmit path for packed queues

2018-04-08 Thread Jens Freimann
On Sun, Apr 08, 2018 at 12:51:32PM +0800, Tiwei Bie wrote: On Thu, Apr 05, 2018 at 12:10:17PM +0200, Jens Freimann wrote: [...] diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c index a8aa87b32..9f9b5a8f8 100644 --- a/drivers/net/virtio/virtio_rxtx.c +++ b/drivers/

Re: [dpdk-dev] [PATCH v3 20/21] net/virtio: add support for event suppression

2018-04-08 Thread Jens Freimann
On Sun, Apr 08, 2018 at 02:07:50PM +0800, Tiwei Bie wrote: On Thu, Apr 05, 2018 at 12:10:30PM +0200, Jens Freimann wrote: Signed-off-by: Jens Freimann --- drivers/net/virtio/virtio_ethdev.c | 2 +- drivers/net/virtio/virtio_ethdev.h | 2 +- drivers/net/virtio/virtio_rxtx.c | 15 +++- d

Re: [dpdk-dev] [PATCH v5 01/18] net/axgbe: add minimal dev init and uninit support

2018-04-08 Thread Kumar, Ravi1
> >-Original Message- >From: Ferruh Yigit [mailto:ferruh.yi...@intel.com] >Sent: Friday, April 06, 2018 9:26 PM >To: Kumar, Ravi1 ; dev@dpdk.org >Subject: Re: [PATCH v5 01/18] net/axgbe: add minimal dev init and uninit >support > >On 4/6/2018 1:36 PM, Ravi Kumar wrote: >> Add ethernet pol

[dpdk-dev] [PATCH v2] net/bnx2x: convert to new Rx offloads API

2018-04-08 Thread Rasesh Mody
From: Harish Patil Ethdev RX offloads API has changed since: commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API") This patch makes use of DEV_RX_OFFLOAD_JUMBO_FRAME offload flag to advertise jumbo frame support. Signed-off-by: Harish Patil --- drivers/net/bnx2x/bnx2x_ethdev.c |

Re: [dpdk-dev] [PATCH 3/8] net/dpaa: fix the array overrun

2018-04-08 Thread Shreyansh Jain
On Thursday 05 April 2018 02:24 PM, Hemant Agrawal wrote: Fixes: 62f53995caaf ("net/dpaa: add frame count based tail drop with CGR") Coverity issue: 268342 Cc: sta...@dpdk.org Signed-off-by: Hemant Agrawal --- Acked-By: Shreyansh Jain

Re: [dpdk-dev] [PATCH v3 00/10] add framework to load and execute BPF code

2018-04-08 Thread Jerin Jacob
-Original Message- > Date: Fri, 6 Apr 2018 19:49:32 +0100 > From: Konstantin Ananyev > To: dev@dpdk.org > CC: Konstantin Ananyev > Subject: [dpdk-dev] [PATCH v3 00/10] add framework to load and execute BPF > code > X-Mailer: git-send-email 1.7.0.7 > > BPF is used quite intensively insid

[dpdk-dev] [PATCH v2 14/14] net/qede: update PMD version to 2.8.0.1

2018-04-08 Thread Rasesh Mody
Signed-off-by: Rasesh Mody --- drivers/net/qede/qede_ethdev.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/qede/qede_ethdev.h b/drivers/net/qede/qede_ethdev.h index baae22d..4737c8f 100644 --- a/drivers/net/qede/qede_ethdev.h +++ b/drivers/net/qede/qede_ethde

[dpdk-dev] [PATCH v2 13/14] net/qede/base: add packet pacing support

2018-04-08 Thread Rasesh Mody
Add packet pacing support for PFs. ecore client can request for enabling packet pacing at init time, if requested then ecore is going to skip MCoS and SRIOV configurations. Signed-off-by: Rasesh Mody --- drivers/net/qede/base/ecore.h | 16 ++- drivers/net/qede/b

Re: [dpdk-dev] [PATCH v5 08/18] net/axgbe: add transmit and receive queue setup apis

2018-04-08 Thread Rosen, Rami
One comment below. -Original Message- From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Ravi Kumar Sent: Friday, April 06, 2018 15:37 To: dev@dpdk.org Cc: Yigit, Ferruh Subject: [dpdk-dev] [PATCH v5 08/18] net/axgbe: add transmit and receive queue setup apis Add support for data path

Re: [dpdk-dev] [PATCH 00/14] net/qede/base: update PMD version to 2.8.0.1

2018-04-08 Thread Mody, Rasesh
Hi Ferruh, > From: Ferruh Yigit [mailto:ferruh.yi...@intel.com] > Sent: Friday, April 06, 2018 2:03 AM > To: Mody, Rasesh ; dev@dpdk.org > Cc: Dept-Eng DPDK Dev > Subject: Re: [PATCH 00/14] net/qede/base: update PMD version to 2.8.0.1 > > On 4/1/2018 6:46 AM, Rasesh Mody wrote: > > Hi, > > > > Th

[dpdk-dev] [PATCH v2 12/14] net/qede/base: fix to support OVLAN mode

2018-04-08 Thread Rasesh Mody
This fix allows driver to program NIC configuration to support OVLAN mode in multi-function scenario Signed-off-by: Rasesh Mody --- drivers/net/qede/base/ecore.h |6 ++ drivers/net/qede/base/ecore_dcbx.c|5 + drivers/net/qede/base/ecore_dcbx_api.h|1 +

[dpdk-dev] [PATCH v2 10/14] net/qede/base: add stats counter for link state

2018-04-08 Thread Rasesh Mody
Add link_change_count counter to track number of link state transitions Signed-off-by: Rasesh Mody --- drivers/net/qede/base/ecore_dev_api.h |1 + drivers/net/qede/base/ecore_l2.c | 10 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/net/qede/base/eco

[dpdk-dev] [PATCH v2 09/14] net/qede/base: refine error handling

2018-04-08 Thread Rasesh Mody
Adjust the verbosity of the log messages and add preventive checks for errors. Signed-off-by: Rasesh Mody --- drivers/net/qede/base/ecore_cxt.c | 20 ++-- drivers/net/qede/base/ecore_dcbx.c|2 +- drivers/net/qede/base/ecore_dev.c | 179 - driver

[dpdk-dev] [PATCH v2 08/14] net/qede/base: add MFW support for driver load timeout

2018-04-08 Thread Rasesh Mody
Add SPQ timeout base driver parameter support management FW timeout values other than default and none. Have fallback mechanism for old MFWs. Reduce the default timeout to 1 sec. Signed-off-by: Rasesh Mody --- drivers/net/qede/base/ecore_dev.c | 66 +++-- driver

[dpdk-dev] [PATCH v2 11/14] net/qede/base: add APIs for xcvr

2018-04-08 Thread Rasesh Mody
Add API to query transceiver info and to retrieve link speed. Signed-off-by: Rasesh Mody --- drivers/net/qede/base/ecore_mcp.c | 199 - drivers/net/qede/base/ecore_mcp_api.h | 46 drivers/net/qede/base/mcp_public.h|1 + 3 files changed, 243

[dpdk-dev] [PATCH v2 03/14] net/qede/base: add DMAE sanity check

2018-04-08 Thread Rasesh Mody
Add DMA engine sanity check during the engine initialization and before PF inititialization Signed-off-by: Rasesh Mody --- drivers/net/qede/base/ecore_dev.c |5 +++ drivers/net/qede/base/ecore_hw.c | 71 drivers/net/qede/base/ecore_hw.h |

[dpdk-dev] [PATCH v2 05/14] net/qede/base: symantic changes

2018-04-08 Thread Rasesh Mody
The changes included in this patch are for - formatting - comment rework/addtions - relocate FW info, version related code - convert: __le16 to u16 __le32 to u32 etc. Signed-off-by: Rasesh Mody --- drivers/net/qede/base/ecore_hsi_common.h | 89 +++- drivers/net

[dpdk-dev] [PATCH v2 07/14] net/qede/base: allow changing VF MAC address

2018-04-08 Thread Rasesh Mody
This patch allows VF to change its own MAC address regardless of MAC set by PF Signed-off-by: Rasesh Mody --- drivers/net/qede/base/ecore_iov_api.h | 11 ++ drivers/net/qede/base/ecore_proto_if.h |3 +++ drivers/net/qede/base/ecore_sriov.c| 36 +--

[dpdk-dev] [PATCH v2 06/14] net/qede/base: add new chain API

2018-04-08 Thread Rasesh Mody
Add new API ecore_chain_set_cons() and fix page index setting in ecore_chain_set_prod(). The new API is for future use. Signed-off-by: Rasesh Mody --- drivers/net/qede/base/ecore_chain.h | 49 ++- 1 file changed, 48 insertions(+), 1 deletion(-) diff --git a/dri

[dpdk-dev] [PATCH v2 04/14] net/qede/base: upgrade FW to 8.33.12.0

2018-04-08 Thread Rasesh Mody
This patch adds changes to support new firmware 8.33.12.0. The changes consist of FW bug fixes and enhancements. Signed-off-by: Rasesh Mody --- drivers/net/qede/base/common_hsi.h|8 +- drivers/net/qede/base/ecore_cxt.c | 10 +- drivers/net/qede/base/ecore_cxt.h

[dpdk-dev] [PATCH v2 02/14] net/qede/base: protect DMAE transactions

2018-04-08 Thread Rasesh Mody
Protect DMAE transactions with a spinlock instead of a mutex Signed-off-by: Rasesh Mody --- drivers/net/qede/base/ecore.h |6 -- drivers/net/qede/base/ecore_dev.c |6 +++--- drivers/net/qede/base/ecore_hw.c | 31 --- 3 files changed, 27 insertions(+

[dpdk-dev] [PATCH v2 01/14] net/qede/base: use path ID for HW init

2018-04-08 Thread Rasesh Mody
Use the path ID as the phase ID when running the engine phase of the HW init Signed-off-by: Rasesh Mody --- drivers/net/qede/base/ecore_dev.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/qede/base/ecore_dev.c b/drivers/net/qede/base/ecore_dev.c index 744d

[dpdk-dev] [PATCH v2 00/14] net/qede/base: update PMD version to 2.8.0.1

2018-04-08 Thread Rasesh Mody
Hi, This patch set updates QEDE base driver to use FW version 8.33.12.0. It contains some base driver enhancements and fixes. The PMD version is updated to 2.8.0.1. Changes in v2: - address 32 bit compilation errors Thanks! -Rasesh Rasesh Mody (14): net/qede/base: use path ID for HW init n

Re: [dpdk-dev] [PATCH v2 5/7] bpf: introduce basic RX/TX BPF filters

2018-04-08 Thread Jerin Jacob
-Original Message- > Date: Thu, 5 Apr 2018 12:51:16 + > From: "Ananyev, Konstantin" > To: Jerin Jacob > CC: "dev@dpdk.org" > Subject: RE: [dpdk-dev] [PATCH v2 5/7] bpf: introduce basic RX/TX BPF > filters > > > Hi Jerin, > > > > > > > > > > > > > > > > > > > +/* > > > > > > > +

[dpdk-dev] [PATCH v2] net/i40e: change warning log to flow error set

2018-04-08 Thread Wei Zhao
There is a specific error set function for flow error configuration, so change to this mode. Fixes: ecad87d22383 ("net/i40e: move RSS to flow API") Signed-off-by: Wei Zhao Tested-by: Peng Yuan --- v2: -fix spelling mistake in comment. --- drivers/net/i40e/i40e_flow.c | 22 +---

Re: [dpdk-dev] [PATCH v3 0/5] ixgbe: fix bugs or just improve.

2018-04-08 Thread Tonghao Zhang
On Wed, Apr 4, 2018 at 10:48 AM, Zhang, Qi Z wrote: > > >> -Original Message- >> From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Tonghao Zhang >> Sent: Thursday, March 8, 2018 6:57 PM >> To: Xing, Beilei ; Dai, Wei ; >> Zhang, >> Helin ; Lu, Wenzhuo >> Cc: dev@dpdk.org; Tonghao Zhan

Re: [dpdk-dev] [PATCH] net/ixgbe: allow for setting 2.5G and 5G speeds on X550

2018-04-08 Thread Lu, Wenzhuo
Hi, > -Original Message- > From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Martin Weiser > Sent: Friday, January 26, 2018 5:30 PM > To: Lu, Wenzhuo ; Ananyev, Konstantin > > Cc: dev@dpdk.org; Martin Weiser > Subject: [dpdk-dev] [PATCH] net/ixgbe: allow for setting 2.5G and 5G speeds

Re: [dpdk-dev] Question on documentation / Mellanox ConnectX-3

2018-04-08 Thread Marcelo Ricardo Leitner
On Thu, Apr 05, 2018 at 11:26:21AM +0200, Adrien Mazarguil wrote: > On Tue, Apr 03, 2018 at 02:59:38PM -0300, Marcelo Ricardo Leitner wrote: > > Hi, > > > > http://docs.openvswitch.org/en/latest/howto/dpdk/ says: > > > > Some NICs (i.e. Mellanox ConnectX-3) have only one PCI address > > associated

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

2018-04-08 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 v4 49/70] eal: replace memseg with memseg lists

2018-04-08 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 v4 68/70] eal: add memory validator callback

2018-04-08 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 v4 61/70] eal: add support for multiprocess memory hotplug

2018-04-08 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 v4 65/70] bus/fslmc: move vfio DMA map into bus probe

2018-04-08 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 v4 64/70] vfio: enable support for mem event callbacks

2018-04-08 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. Signed-off-by: Anatoly Burakov --- Notes: v4: - Fix PP

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

2018-04-08 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 v4 67/70] eal: enable non-legacy memory mode

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

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

2018-04-08 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 v4 63/70] eal: enable callbacks on malloc/free and mp sync

2018-04-08 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 --- lib/librte_eal/common/malloc_heap.c| 21 +

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

2018-04-08 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. Signed-off-by: Shreyansh Jain Signed-off-by: Anatoly Burakov --- drivers/bus/fslmc/fslmc_vfio.c | 150 ++

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

2018-04-08 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 v4 58/70] eal: share hugepage info primary and secondary

2018-04-08 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 --- lib/librte_eal/bsdapp/eal/eal.c

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

2018-04-08 Thread Anatoly Burakov
Secondary initialization will just sync memory map with primary process. Signed-off-by: Anatoly Burakov --- Notes: v3: - Improved handling of EAL hugepage info lib/librte_eal/common/eal_common_memory.c | 1 + lib/librte_eal/linuxapp/eal/eal_memory.c | 18 +++--- 2 files c

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

2018-04-08 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 v4 69/70] eal: enable validation before new page allocation

2018-04-08 Thread Anatoly Burakov
Signed-off-by: Anatoly Burakov --- 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..f8daf84 100644 --- a/lib/librte_eal/common/malloc_heap.c +

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

2018-04-08 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 --- lib/librte_eal/bsdapp/eal/eal_memalloc.c | 15 +++ lib/librte_eal/c

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

2018-04-08 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 v4 56/70] eal: read hugepage counts from node-specific sysfs path

2018-04-08 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 v4 53/70] eal: add "single file segments" command-line option

2018-04-08 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 v4 48/70] eal: add rte_fbarray

2018-04-08 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 v4 50/70] eal: replace memzone array with fbarray

2018-04-08 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 v4 46/70] vfio: allow to map other memory regions

2018-04-08 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 v4 47/70] eal: add "legacy memory" option

2018-04-08 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 v4 51/70] eal: add support for mapping hugepages at runtime

2018-04-08 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 v4 38/70] bus/fslmc: use iova2virt instead of memseg iteration

2018-04-08 Thread Anatoly Burakov
Reduce dependency on internal details of EAL memory subsystem, and simplify code. Signed-off-by: Anatoly Burakov --- Notes: v4: - Fixed usage of experimental API's v3: - Added this patch drivers/bus/fslmc/portal/dpaa2_hw_pvt.h | 13 + drivers/event/dpaa2/Makefi

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

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

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

2018-04-08 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 --- lib/librte_eal/common/eal_common_memzone.c | 42 +++--- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/lib/librte_eal

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

2018-04-08 Thread Anatoly Burakov
Reduce dependency on internal details of EAL memory subsystem, and simplify code. Signed-off-by: Anatoly Burakov --- Notes: v4: - Fixed usage of experimental API's v3: - Added this patch drivers/bus/dpaa/rte_dpaa_bus.h | 12 +--- drivers/mempool/dpaa/Makefile|

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

2018-04-08 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 --- lib/librte_eal/common/eal_common_memory.c | 30 ++ lib/librte_eal/common/include/rte_memory.h | 12 lib/librte_

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

2018-04-08 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 --- lib/librte_eal/common/eal_commo

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

2018-04-08 Thread Anatoly Burakov
Reduce dependency on internal details of EAL memory subsystem, and simplify code. Signed-off-by: Anatoly Burakov --- drivers/net/virtio/virtio_user/vhost_kernel.c | 83 +++ 1 file changed, 35 insertions(+), 48 deletions(-) diff --git a/drivers/net/virtio/virtio_user/vhos

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

2018-04-08 Thread Anatoly Burakov
Reduce dependency on internal details of EAL memory subsystem, and simplify code. Signed-off-by: Anatoly Burakov --- drivers/net/mlx5/mlx5_mr.c | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/drivers/net/mlx5/mlx5_mr.c b/drivers/net/mlx5/mlx5_mr.c index 2b

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

2018-04-08 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 --- lib/librte_eal/common/eal_common_memory.c | 37

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

2018-04-08 Thread Anatoly Burakov
Reduce dependency on internal details of EAL memory subsystem, and simplify code. Signed-off-by: Anatoly Burakov Acked-by: Shreyansh Jain --- drivers/bus/fslmc/fslmc_vfio.c | 78 ++ 1 file changed, 41 insertions(+), 37 deletions(-) diff --git a/drivers/b

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

2018-04-08 Thread Anatoly Burakov
Reduce dependency on internal details of EAL memory subsystem, and simplify code. Signed-off-by: Anatoly Burakov --- drivers/net/mlx4/mlx4_mr.c | 17 +++-- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/drivers/net/mlx4/mlx4_mr.c b/drivers/net/mlx4/mlx4_mr.c index 9a1

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

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

[dpdk-dev] [PATCH v4 22/70] net/virtio: use contiguous allocation for DMA memory

2018-04-08 Thread Anatoly Burakov
All hardware drivers should allocate IOVA-contiguous memzones for their hardware resources. Signed-off-by: Anatoly Burakov Reviewed-by: Venkatesh Srinivas Reviewed-by: Maxime Coquelin --- Notes: v4: - Use new memzone flag instead of new API v3: - Moved patch earlier in the

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

2018-04-08 Thread Anatoly Burakov
Reduce dependency on internal details of EAL memory subsystem, and simplify code. Signed-off-by: Anatoly Burakov --- lib/librte_eal/linuxapp/eal/eal_vfio.c | 108 +++-- 1 file changed, 63 insertions(+), 45 deletions(-) diff --git a/lib/librte_eal/linuxapp/eal/eal_vfi

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

2018-04-08 Thread Anatoly Burakov
Reduce dependency on internal details of EAL memory subsystem, and simplify code. Signed-off-by: Anatoly Burakov --- lib/librte_mempool/Makefile | 3 +++ lib/librte_mempool/meson.build | 3 +++ lib/librte_mempool/rte_mempool.c | 24 3 files changed, 18 insertion

[dpdk-dev] [PATCH v4 14/70] net/avf: use contiguous allocation for DMA memory

2018-04-08 Thread Anatoly Burakov
All hardware drivers should allocate IOVA-contiguous memzones for their hardware resources. Signed-off-by: Anatoly Burakov --- Notes: v4: - Use new memzone flag instead of new API - Remove experimental API from build files v3: - Add experimental API to build files

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

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

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

2018-04-08 Thread Anatoly Burakov
Reduce dependency on internal details of EAL memory subsystem, and simplify code. Signed-off-by: Anatoly Burakov --- test/test/test_malloc.c | 40 +++- test/test/test_memory.c | 23 +++-- test/test/test_memzone.c | 53

[dpdk-dev] [PATCH v4 16/70] net/bnxt: use contiguous allocation for DMA memory

2018-04-08 Thread Anatoly Burakov
All hardware drivers should allocate IOVA-contiguous memzones for their hardware resources. Signed-off-by: Anatoly Burakov --- Notes: v4: - Use new memzone flag instead of new API - Remove experimental API from build files v3: - Added this driver to the list of modified

[dpdk-dev] [PATCH v4 24/70] mempool: add support for the new allocation methods

2018-04-08 Thread Anatoly Burakov
If a user has specified that the zone should have contiguous memory, use the new _contig allocation API's instead of normal ones. Otherwise, account for the fact that unless we're in IOVA_AS_VA mode, we cannot guarantee that the pages would be physically contiguous, so we calculate the memzone size

[dpdk-dev] [PATCH v4 23/70] net/vmxnet3: use contiguous allocation for DMA memory

2018-04-08 Thread Anatoly Burakov
All hardware drivers should allocate IOVA-contiguous memzones for their hardware resources. Signed-off-by: Anatoly Burakov --- Notes: v4: - Use new memzone flag instead of new API - Remove experimental API from build files v3: - Add experimental API to build files

[dpdk-dev] [PATCH v4 10/70] eal: add backend support for contiguous allocation

2018-04-08 Thread Anatoly Burakov
No major changes, just add some checks in a few key places, and a new parameter to pass around. Also, add a function to check malloc element for physical contiguousness. For now, assume hugepage memory is always contiguous, while non-hugepage memory will be checked. Signed-off-by: Anatoly Burakov

[dpdk-dev] [PATCH v4 21/70] net/qede: use contiguous allocation for DMA memory

2018-04-08 Thread Anatoly Burakov
All hardware drivers should allocate IOVA-contiguous memzones for their hardware resources. Signed-off-by: Anatoly Burakov Acked-by: Harish Patil --- Notes: v4: - Use new memzone flag instead of new API - Remove experimental API from build files v3: - Add experimental A

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

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

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

2018-04-08 Thread Anatoly Burakov
Reduce dependency on internal details of EAL memory subsystem, and simplify code. Signed-off-by: Anatoly Burakov --- drivers/bus/pci/Makefile| 3 +++ drivers/bus/pci/linux/pci.c | 26 ++ drivers/bus/pci/meson.build | 3 +++ 3 files changed, 20 insertions(+), 12 dele

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

2018-04-08 Thread Anatoly Burakov
Reduce dependency on internal details of EAL memory subsystem, and simplify code. Signed-off-by: Anatoly Burakov --- drivers/net/mlx5/Makefile | 3 +++ drivers/net/mlx5/mlx5.c | 24 +++- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/drivers/net/mlx5/Makef

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

2018-04-08 Thread Anatoly Burakov
Reduce dependency on internal details of EAL memory subsystem, and simplify code. Signed-off-by: Anatoly Burakov --- lib/librte_eal/linuxapp/eal/eal_vfio.c | 45 -- 1 file changed, 21 insertions(+), 24 deletions(-) diff --git a/lib/librte_eal/linuxapp/eal/eal_vfi

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

2018-04-08 Thread Anatoly Burakov
All hardware drivers should allocate IOVA-contiguous memzones for their hardware resources. Signed-off-by: Anatoly Burakov --- Notes: v4: - Use new memzone flag instead of new API - Remove experimental API from build files v3: - Add experimental API to build files

[dpdk-dev] [PATCH v4 25/70] eal: add function to walk all memsegs

2018-04-08 Thread Anatoly Burakov
For code that might need to iterate over list of allocated segments, using this API will make it more resilient to internal API changes and will prevent copying the same iteration code over and over again. Additionally, down the line there will be locking implemented, so users of this API will not

[dpdk-dev] [PATCH v4 07/70] eal: make malloc free list remove public

2018-04-08 Thread Anatoly Burakov
We will need to be able to remove entries from free lists from heaps during certain events, such as rollbacks, or when freeing memory to the system (where a previously element disappears and thus can no longer be in the free list). Signed-off-by: Anatoly Burakov --- lib/librte_eal/common/malloc_

[dpdk-dev] [PATCH v4 13/70] crypto/qat: use contiguous allocation for DMA memory

2018-04-08 Thread Anatoly Burakov
All hardware drivers should allocate IOVA-contiguous memzones for their hardware resources. Also, remove the weird page alignment code. Signed-off-by: Anatoly Burakov Acked-by: Fiona Trahe --- Notes: v4: - Replace new API with new memzone flag v3: - Move the patch earlier

[dpdk-dev] [PATCH v4 19/70] net/enic: use contiguous allocation for DMA memory

2018-04-08 Thread Anatoly Burakov
All hardware drivers should allocate IOVA-contiguous memzones for their hardware resources. Signed-off-by: Anatoly Burakov Acked-by: John Daley --- Notes: v4: - Use new memzone flag instead of new API - Remove experimental API from build files v3: - Add experimental API

[dpdk-dev] [PATCH v4 01/70] eal: move get_virtual_area out of linuxapp eal_memory.c

2018-04-08 Thread Anatoly Burakov
Move get_virtual_area out of linuxapp EAL memory and make it common to EAL, so that other code could reserve virtual areas as well. Signed-off-by: Anatoly Burakov --- Notes: v3: replace uint64_t with size_t for size variables lib/librte_eal/common/eal_common_memory.c | 101

[dpdk-dev] [PATCH v4 18/70] net/ena: use contiguous allocation for DMA memory

2018-04-08 Thread Anatoly Burakov
All hardware drivers should allocate IOVA-contiguous memzones for their hardware resources. Signed-off-by: Anatoly Burakov Acked-by: Michal Krawczyk --- Notes: v4: - Use new memzone flag instead of new API - Remove experimental API from build files v3: - Add experimenta

[dpdk-dev] [PATCH v4 15/70] net/bnx2x: use contiguous allocation for DMA memory

2018-04-08 Thread Anatoly Burakov
All hardware drivers should allocate IOVA-contiguous memzones for their hardware resources. Signed-off-by: Anatoly Burakov --- Notes: v4: - Use new memzone flag instead of new API - Remove experimental API from build files v3: - Add experimental API to build files

[dpdk-dev] [PATCH v4 11/70] eal: enable reserving physically contiguous memzones

2018-04-08 Thread Anatoly Burakov
This adds a new flag to request reserved memzone to be IOVA contiguous. This is useful for allocating hardware resources like NIC rings/queues etc.For now, hugepage memory is always contiguous, but we need to prepare the drivers for the switch. Signed-off-by: Anatoly Burakov --- Notes: v4:

[dpdk-dev] [PATCH v4 17/70] net/cxgbe: use contiguous allocation for DMA memory

2018-04-08 Thread Anatoly Burakov
All hardware drivers should allocate IOVA-contiguous memzones for their hardware resources. Signed-off-by: Anatoly Burakov --- Notes: v4: - Use new memzone flag instead of new API - Remove experimental API from build files v3: - Add experimental API to build files

[dpdk-dev] [PATCH v4 12/70] ethdev: use contiguous allocation for DMA memory

2018-04-08 Thread Anatoly Burakov
All hardware drivers should allocate IOVA-contiguous memzones for their hardware resources. This fixes the following drivers in one go: grep -Rl rte_eth_dma_zone_reserve drivers/ drivers/net/avf/avf_rxtx.c drivers/net/thunderx/nicvf_ethdev.c drivers/net/e1000/igb_rxtx.c drivers/net/e1000/em_rxtx

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

2018-04-08 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 --- Notes: v3: clarified commit message lib/librte_eal/common/malloc_elem.c | 4 ++-- lib/librte_eal/common/malloc_elem.h | 2 +-

[dpdk-dev] [PATCH v4 00/70] Memory Hotplug for DPDK

2018-04-08 Thread Anatoly Burakov
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: - General outline of memory hotplug changes [3] The vast

[dpdk-dev] [PATCH v4 09/70] eal: replace panics with error messages in malloc

2018-04-08 Thread Anatoly Burakov
We shouldn't ever panic in system libraries, let alone in such core ones as EAL, so replace all panic messages with error messages. Signed-off-by: Anatoly Burakov --- lib/librte_eal/common/rte_malloc.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/librte_eal/com

[dpdk-dev] [PATCH v4 03/70] eal: make malloc heap a doubly-linked list

2018-04-08 Thread Anatoly Burakov
As we are preparing for dynamic memory allocation, we need to be able to handle holes in our malloc heap, hence we're switching to doubly linked list, and prepare infrastructure to support it. Since our heap is now aware where are our first and last elements, there is no longer any need to have a

[dpdk-dev] [PATCH v4 04/70] eal: add function to dump malloc heap contents

2018-04-08 Thread Anatoly Burakov
Malloc heap is now a doubly linked list, so it's now possible to iterate over each malloc element regardless of its state. Signed-off-by: Anatoly Burakov --- Notes: v3: mark function as experimental lib/librte_eal/common/include/rte_malloc.h | 10 ++ lib/librte_eal/common/malloc_el

[dpdk-dev] [PATCH v4 06/70] eal: make malloc_elem_join_adjacent_free public

2018-04-08 Thread Anatoly Burakov
Down the line, we will need to join free segments to determine whether the resulting contiguous free space is bigger than a page size, allowing to free some memory back to the system. Signed-off-by: Anatoly Burakov --- lib/librte_eal/common/malloc_elem.c | 6 +++--- lib/librte_eal/common/malloc_

[dpdk-dev] [PATCH v4 02/70] eal: move all locking to heap

2018-04-08 Thread Anatoly Burakov
Down the line, we will need to do everything from the heap as any alloc or free may trigger alloc/free OS memory, which would involve growing/shrinking heap. Signed-off-by: Anatoly Burakov --- lib/librte_eal/common/malloc_elem.c | 16 ++-- lib/librte_eal/common/malloc_heap.c | 38 +++

  1   2   >