Akhil,
I'm probably missing a point somewhere but I don't follow the suggestions. To
me, ethdev, cryptodev, eventdev, etc. are device abstractions, whereas the
proposed ENQ mode isn't at the same level.
The DEQ mode is a device abstraction for cryptodev->eventdev (whether h/w or
s/w based), but
On 03/03/2018 04:46 PM, Anatoly Burakov wrote:
This fixes the following drivers in one go:
Does it mean that these drivers are broken in the middle of patch set
and fixed now?
If so, it would be good to avoid it. It breaks bisect.
grep -Rl rte_eth_dma_zone_reserve drivers/
drivers/net/avf/
Signed-off-by: Anatoly Burakov
---
Notes:
It is not 100% clear that second call to memzone_reserve
is allocating DMA memory. Corrections welcome.
drivers/net/enic/enic_main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/enic/enic_main.c b/drivers/n
Signed-off-by: Anatoly Burakov
---
Notes:
Not sure if DMA-capable memzones are needed for vmxnet3.
Corrections welcome.
drivers/net/vmxnet3/vmxnet3_ethdev.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c
b/drivers/net/vmx
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
Signed-off-by: Anatoly Burakov
---
drivers/net/avf/avf_ethdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/avf/avf_ethdev.c b/drivers/net/avf/avf_ethdev.c
index 4df6617..f69d697 100644
--- a/drivers/net/avf/avf_ethdev.c
+++ b/drivers/net/avf/avf_ethdev.c
@@ -1
This set of changes enables rte_malloc to allocate and free memory
as needed. 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 allocate more memory. The reverse happens with
free - we free an element, check it
Signed-off-by: Anatoly Burakov
---
Notes:
Not sure if virtio needs to allocate DMA-capable memory,
being a software driver and all. Corrections welcome.
drivers/net/virtio/virtio_ethdev.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/virtio/virt
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
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
Add a new (non-legacy) memory init path for EAL. It uses the
new memory hotplug facilities, although it's only being run
at startup.
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
The test was expecting memory already being allocated on all sockets,
and thus was failing because calling rte_malloc could trigger memory
hotplug event and allocate memory where there was none before.
Fix it to instead report availability of memory on specific sockets
by attempting to allocate a
Signed-off-by: Anatoly Burakov
---
drivers/net/ena/base/ena_plat_dpdk.h | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ena/base/ena_plat_dpdk.h
b/drivers/net/ena/base/ena_plat_dpdk.h
index 8cba319..c1ebf00 100644
--- a/drivers/net/ena/base/ena_plat_dpdk.h
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.
For single-file segments, we
For now, this option does nothing, but it will be useful in
dynamic memory allocation down the line. Currently, DPDK stores
all pages as separate files in hugetlbfs. This option will allow
storing all pages in one file (one file per socket, per page size).
Signed-off-by: Anatoly Burakov
---
lib/
Signed-off-by: Anatoly Burakov
---
Notes:
Doing "grep -R rte_memzone_reserve drivers/net/qede" returns the following:
drivers/net/qede/qede_fdir.c: mz = rte_memzone_reserve_aligned(mz_name,
QEDE_MAX_FDIR_PKT_LEN,
drivers/net/qede/base/bcm_osal.c: mz =
rte_memzone_reserve_al
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
Signed-off-by: Anatoly Burakov
---
Notes:
It is not 100% clear that all users of this function
need to allocate DMA memory. Corrections welcome.
drivers/net/i40e/i40e_ethdev.c | 2 +-
drivers/net/i40e/i40e_rxtx.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/d
Signed-off-by: Anatoly Burakov
---
Notes:
It is not 100% clear if this memzone is used for DMA,
corrections welcome.
drivers/net/cxgbe/sge.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/cxgbe/sge.c b/drivers/net/cxgbe/sge.c
index 3d5aa59..e31474c 100
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.c
drivers/net/fm10k/fm10k_ethdev.c
drivers/net/vmxnet3/vmxnet3_rxtx.c
drivers/net/liquidio/l
Signed-off-by: Anatoly Burakov
---
lib/librte_eal/linuxapp/eal/eal_memalloc.c | 11 +++
1 file changed, 11 insertions(+)
diff --git a/lib/librte_eal/linuxapp/eal/eal_memalloc.c
b/lib/librte_eal/linuxapp/eal/eal_memalloc.c
index bbeeeba..c03e7bc 100644
--- a/lib/librte_eal/linuxapp/eal/e
Signed-off-by: Anatoly Burakov
---
drivers/crypto/qat/qat_qp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/crypto/qat/qat_qp.c b/drivers/crypto/qat/qat_qp.c
index 87b9ce0..3f8ed4d 100644
--- a/drivers/crypto/qat/qat_qp.c
+++ b/drivers/crypto/qat/qat_qp.c
@@ -95
Signed-off-by: Anatoly Burakov
---
drivers/net/bnx2x/bnx2x.c | 2 +-
drivers/net/bnx2x/bnx2x_rxtx.c | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/bnx2x/bnx2x.c b/drivers/net/bnx2x/bnx2x.c
index fb02d0f..81f5dae 100644
--- a/drivers/net/bnx2x/bnx2x.c
+++
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
for legacy memory mode, attach to primary's memseg list, and
map hugepages as before.
for non-legacy mode, preallocate all VA space and then do a
sync of local memory map.
Signed-off-by: Anatoly Burakov
---
lib/librte_eal/bsdapp/eal/eal_hugepage_info.c | 7 ++
lib/librte_eal/common/eal_commo
No major changes, just add some checks in a few key places, and
a new parameter to pass around.
Signed-off-by: Anatoly Burakov
---
lib/librte_eal/common/eal_common_memzone.c | 20 +++---
lib/librte_eal/common/malloc_elem.c| 101 ++---
lib/librte_eal/common/malloc
Also, rewrite VFIO to rely on memory callbacks instead of manually
registering memory with VFIO. Callbacks will only be registered if
VFIO is enabled.
Signed-off-by: Anatoly Burakov
---
lib/librte_eal/common/malloc_heap.c| 21 +
lib/librte_eal/linuxapp/eal/eal_memalloc.c
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
This adds a new set of _contig API's to rte_memzone.
Signed-off-by: Anatoly Burakov
---
lib/librte_eal/common/eal_common_memzone.c | 44
lib/librte_eal/common/include/rte_memzone.h | 154
2 files changed, 198 insertions(+)
diff --git a/lib/librte_eal/comm
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
This will be helpful down the line when we implement support for
allocating physically contiguous memory. We can no longer guarantee
physically contiguous memory unless we're in IOVA_AS_VA mode, but
we can certainly try and see if we succeed. In addition, this would
be useful for e.g. PMD's who may
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
---
lib/librte_eal/common/include/rte_malloc.h | 9 +
lib/librte_eal/common/malloc_elem.c| 24
lib/l
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
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/common/eal_memalloc.h | 3 +
lib/librte_eal/lin
In preparation for implementing multiprocess support, we are adding
a version number and write locks to memseg lists.
There are two ways of implementing multiprocess support for memory
hotplug: either all information about mapped memory is shared
between processes, and secondary processes simply a
Signed-off-by: Anatoly Burakov
---
lib/librte_eal/common/malloc_elem.c | 4 ++--
lib/librte_eal/common/malloc_elem.h | 2 +-
lib/librte_eal/common/malloc_heap.c | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/lib/librte_eal/common/malloc_elem.c
b/lib/librte_eal/common/ma
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
Signed-off-by: Anatoly Burakov
---
lib/librte_eal/common/malloc_elem.c | 12 ++--
lib/librte_eal/common/malloc_elem.h | 3 +++
2 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/lib/librte_eal/common/malloc_elem.c
b/lib/librte_eal/common/malloc_elem.c
index 2291ee1..008f5a3
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 +++
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
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
---
lib/librte_eal/common/eal_common_memory.c | 101 ++
lib/librte_eal/common/eal_private.h | 33 +++
We need this function to join newly allocated segments with the heap.
Signed-off-by: Anatoly Burakov
---
lib/librte_eal/common/malloc_elem.c | 6 +++---
lib/librte_eal/common/malloc_elem.h | 3 +++
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/lib/librte_eal/common/malloc_elem.c
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):
- IPC bugfixes patchset [2]
- IPC improvements patchset [3]
- IPC asynchronous request API patch [4]
- Function to return num
Signed-off-by: Anatoly Burakov
---
test/test/commands.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/test/test/commands.c b/test/test/commands.c
index cf0b726..6bfdc02 100644
--- a/test/test/commands.c
+++ b/test/test/commands.c
@@ -137,6 +137,8 @@ static void cmd_dump_parsed(void *pars
On 02-Mar-18 6:51 PM, Stephen Hemminger wrote:
On Tue, 27 Feb 2018 14:59:29 +
Anatoly Burakov wrote:
This API is similar to the blocking API that is already present,
but reply will be received in a separate callback by the caller.
Under the hood, we create a separate thread to deal with r
On 02-Mar-18 6:48 PM, Stephen Hemminger wrote:
On Tue, 27 Feb 2018 14:59:29 +
Anatoly Burakov wrote:
+rte_mp_request_async(struct rte_mp_msg *req, const struct timespec *ts)
{
+ struct sync_request *dummy;
+ struct async_request_shared_param *param = NULL;
+ struct rte_
Thanks , I forget do "set portlist " cmd.
But there is another problem is
1. enable testpmd bond active-backup mode , do send packet test , packet
backtrack ,from some port out and then this port back.
2. down the active physical link , then testpmd show receive LSC event
,show port info all , fi
47 matches
Mail list logo