Nelio Laranjeiro [Thu, 12 Jul 2018 09:30:59 +0000 (11:30 +0200)]
net/mlx5: use a macro for the RSS key size
ConnectX 4-5 support only 40 bytes of RSS key, using a compiled size
hash key is not necessary.
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Nelio Laranjeiro [Thu, 12 Jul 2018 09:30:58 +0000 (11:30 +0200)]
net/mlx5: add mark/flag flow action
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Nelio Laranjeiro [Thu, 12 Jul 2018 09:30:57 +0000 (11:30 +0200)]
net/mlx5: add flow TCP item
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Nelio Laranjeiro [Thu, 12 Jul 2018 09:30:56 +0000 (11:30 +0200)]
net/mlx5: add flow UDP item
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Nelio Laranjeiro [Thu, 12 Jul 2018 09:30:55 +0000 (11:30 +0200)]
net/mlx5: add flow IPv6 item
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Nelio Laranjeiro [Thu, 12 Jul 2018 09:30:54 +0000 (11:30 +0200)]
net/mlx5: add flow IPv4 item
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Nelio Laranjeiro [Thu, 12 Jul 2018 09:30:53 +0000 (11:30 +0200)]
net/mlx5: add flow VLAN item
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Nelio Laranjeiro [Thu, 12 Jul 2018 09:30:52 +0000 (11:30 +0200)]
net/mlx5: add flow stop/start
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Nelio Laranjeiro [Thu, 12 Jul 2018 09:30:51 +0000 (11:30 +0200)]
net/mlx5: add flow queue action
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Nelio Laranjeiro [Thu, 12 Jul 2018 09:30:50 +0000 (11:30 +0200)]
net/mlx5: support flow Ethernet item along with drop action
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Nelio Laranjeiro [Thu, 12 Jul 2018 09:30:49 +0000 (11:30 +0200)]
net/mlx5: replace verbs priorities by flow
Previous work introduce verbs priorities, whereas the PMD is making
translation between Flow priority into Verbs. Rename this to make more
sense on what the PMD has to translate.
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Nelio Laranjeiro [Thu, 12 Jul 2018 09:30:48 +0000 (11:30 +0200)]
net/mlx5: handle drop queues as regular queues
Drop queues are essentially used in flows due to Verbs API, the
information if the fate of the flow is a drop or not is already present
in the flow. Due to this, drop queues can be fully mapped on regular
queues.
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Nelio Laranjeiro [Thu, 12 Jul 2018 09:30:47 +0000 (11:30 +0200)]
net/mlx5: remove flow support
This start a series to re-work the flow engine in mlx5 to easily support
flow conversion to Verbs or TC. This is necessary to handle both regular
flows and representors flows.
As the full file needs to be clean-up to re-write all items/actions
processing, this patch starts to disable the regular code and only let the
PMD to start in isolated mode.
After this patch flow API will not be usable.
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Adrien Mazarguil [Tue, 10 Jul 2018 16:04:58 +0000 (18:04 +0200)]
net/mlx5: add parameter for port representors
Prior to this patch, all port representors detected on a given device were
probed and Ethernet devices instantiated for each of them.
This patch adds support for the standard "representor" parameter, which
implies that port representors are not probed by default anymore, except
for the list provided through device arguments.
(Patch based on prior work from Yuanhan Liu)
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Reviewed-by: Xueming Li <xuemingl@mellanox.com>
Adrien Mazarguil [Tue, 10 Jul 2018 16:04:56 +0000 (18:04 +0200)]
net/mlx5: probe port representors in natural order
Port representors are probed in whatever unspecified order
ibv_get_device_list() returns them.
This is counterintuitive to users since DPDK port IDs assignment almost
never follows the same sequence as representor IDs. Additionally, the
master device does not necessarily inherit the lowest DPDK port ID.
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Adrien Mazarguil [Tue, 10 Jul 2018 16:04:54 +0000 (18:04 +0200)]
net/mlx5: probe all port representors
Probe existing port representors in addition to their master device and
associate them automatically.
To avoid collision between Ethernet devices, they are named as follows:
- "{DBDF}" for master/switch devices.
- "{DBDF}_representor_{rep}" with "rep" starting from 0 for port
representors.
(Patch based on prior work from Yuanhan Liu)
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Reviewed-by: Xueming Li <xuemingl@mellanox.com>
Adrien Mazarguil [Tue, 10 Jul 2018 16:04:52 +0000 (18:04 +0200)]
net/mlx5: add port representor awareness
The current PCI probing method is not aware of Verbs port representors,
which appear as standard Verbs devices bound to the same PCI address and
cannot be distinguished.
Problem is that more often than not, the wrong Verbs device is used,
resulting in unexpected traffic.
This patch makes the driver discard representors to only use the master
device. If unable to identify it (e.g. kernel drivers not recent enough),
either:
- There is only one matching device which isn't identified as a
representor, in that case use it.
- Otherwise log an error and do not probe the device.
(Patch based on prior work from Yuanhan Liu)
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Reviewed-by: Xueming Li <xuemingl@mellanox.com>
Adrien Mazarguil [Tue, 10 Jul 2018 16:04:50 +0000 (18:04 +0200)]
net/mlx5: re-indent generic probing function
Since commit "net/mlx5: drop useless support for several Verbs ports"
removed an inner loop, mlx5_dev_spawn() is left with an unnecessary indent
level.
This patch eliminates a block, moves its local variables to function scope,
and re-indents its contents (diff best viewed with --ignore-all-space).
No functional impact.
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Reviewed-by: Xueming Li <xuemingl@mellanox.com>
Adrien Mazarguil [Tue, 10 Jul 2018 16:04:48 +0000 (18:04 +0200)]
net/mlx5: split PCI from generic probing
All the generic probing code needs is an IB device. While this device is
currently supplied by a PCI lookup, other methods will be added soon.
This patch divides the original function, which has become huge over time,
as follows:
1. PCI-specific (mlx5_pci_probe()).
2. Verbs device (mlx5_dev_spawn()).
(Patch based on prior work from Yuanhan Liu)
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Reviewed-by: Xueming Li <xuemingl@mellanox.com>
Adrien Mazarguil [Tue, 10 Jul 2018 16:04:46 +0000 (18:04 +0200)]
net/mlx5: drop useless support for several Verbs ports
Unlike mlx4 from which this capability was inherited, mlx5 devices expose
exactly one Verbs port per PCI bus address. Each physical port gets
assigned its own bus address with a single Verbs port.
While harmless, this code requires an extra loop that would get in the way
of subsequent refactoring.
No functional impact.
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Adrien Mazarguil [Tue, 10 Jul 2018 16:04:44 +0000 (18:04 +0200)]
net/mlx5: remove redundant objects in probe function
This patch gets rid of redundant calls to open the device and query its
attributes in order to simplify the code.
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Reviewed-by: Xueming Li <xuemingl@mellanox.com>
Adrien Mazarguil [Tue, 10 Jul 2018 16:04:42 +0000 (18:04 +0200)]
net/mlx5: rename confusing object in probe function
There are several attribute objects in this function:
- IB device attributes (struct ibv_device_attr_ex device_attr).
- Direct Verbs attributes (struct mlx5dv_context attrs_out).
- Port attributes (struct ibv_port_attr).
- IB device attributes again (struct ibv_device_attr_ex device_attr_ex).
"attrs_out" is both odd and initialized using a nonstandard syntax. Rename
it "dv_attr" for consistency.
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Reviewed-by: Xueming Li <xuemingl@mellanox.com>
Moti Haimovsky [Tue, 10 Jul 2018 10:45:54 +0000 (13:45 +0300)]
net/mlx4: support hardware TSO
Implement support for hardware TSO.
Signed-off-by: Moti Haimovsky <motih@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Pablo de Lara [Fri, 13 Jul 2018 04:51:03 +0000 (05:51 +0100)]
test/power: fix 32-bit build
Compilation issue:
test/test/test_power_acpi_cpufreq.c:556:31:
error: format ‘%lx’ expects argument of type ‘long unsigned int’,
but argument 2 has type ‘uint64_t {aka long long unsigned int}’
printf("ACPI: Capabilities %lx\n", caps.capabilities);
~~^ ~~~~~~~~~~~~~~~~~
%llx
Fixes:
39e38d583075 ("test/power: add unit test for get capabilities API")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
Nelio Laranjeiro [Fri, 13 Jul 2018 09:11:30 +0000 (11:11 +0200)]
ethdev: fix missing function in map file
Add rte_flow_expand_rss in map file and tag it as experimental.
Fixes:
4ed05fcd441b ("ethdev: add flow API to expand RSS flows")
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Thomas Monjalon [Fri, 13 Jul 2018 13:36:51 +0000 (15:36 +0200)]
doc: fix lists in release notes
Some blank lines and hyphens are missing, so lists were badly
interpreted and rendered.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Anatoly Burakov [Fri, 13 Jul 2018 12:48:04 +0000 (13:48 +0100)]
mem: support --in-memory mode
Implement the final piece of the in-memory mode puzzle - enable running
DPDK entirely in memory, without creating any files.
To do it, use mmap with MAP_HUGETLB and size flags to enable DPDK to work
without hugetlbfs mountpoints. In order to enable this, a few things needed
to be changed.
First of all, we need to allow empty hugetlbfs mountpoints in
hugepage_info, and handle them correctly (by not trying to create any
files and lock any directories).
Next, we need to reorder the mapping sequence, because the page is not
really allocated until the page fault, and we cannot get its IOVA
address before we trigger the page fault.
Finally, decide at compile time whether we are going to be supporting
anonymous hugepages or not, because we cannot check for it at runtime.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Anatoly Burakov [Fri, 13 Jul 2018 12:48:03 +0000 (13:48 +0100)]
eal: add --in-memory option
This command-line option will cause DPDK to operate entirely in
memory and not create any shared files at runtime, including any
shared configuration or hugetlbfs files. This is useful for debug
purposes, as well as for certain use cases like containers or
automatic memory cleanup.
Currently, this option acts as a strict superset of --no-shconf and
--huge-unlink commands.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Anatoly Burakov [Fri, 13 Jul 2018 12:48:02 +0000 (13:48 +0100)]
mem: support --huge-unlink mode
Unlink hugepages after creating them, to honor the hugepage-unlink mode.
We cannot resize non-existing files, so make single file segments
explicitly unsupported.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Anatoly Burakov [Fri, 13 Jul 2018 12:48:01 +0000 (13:48 +0100)]
eal: do not create runtime dir in --no-shconf mode
Now that the rest of the EAL is adjusted to not create any shared
files, prevent runtime directory from ever being created.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Anatoly Burakov [Fri, 13 Jul 2018 12:48:00 +0000 (13:48 +0100)]
eal: support --no-shconf in hugepage data file
Do not create a shared hugepage data file if we were asked to
not create any shared files.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Anatoly Burakov [Fri, 13 Jul 2018 12:47:59 +0000 (13:47 +0100)]
eal: support --no-shconf for hugepage info
Do not create any shared hugepage size info files if we were
asked to not create any shared files.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Anatoly Burakov [Fri, 13 Jul 2018 12:47:58 +0000 (13:47 +0100)]
ipc: support --no-shconf mode
IPC is an inter-process communication mechanism. Since no secondaries
can ever be expected to run in no-shconf mode, IPC will be useless, so
do not enable it in the first place. In the interests of API usage
convenience, we will still allow registering callbacks, but obviously
they won't ever be triggered.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Anatoly Burakov [Fri, 13 Jul 2018 12:47:57 +0000 (13:47 +0100)]
fbarray: support --no-shconf mode
When using --no-shconf option, the expectation is that no multiprocess
will be supported as no shared files are created. However, fbarray still
creates some shared files that prevent multiple processes with the same
prefix from starting.
Fix this by avoiding creating shared files whenever noshconf option is
specified. Since virtual areas we get from eal_get_virtual_area() are
read-only, remap them as writable.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Anatoly Burakov [Fri, 13 Jul 2018 10:44:48 +0000 (11:44 +0100)]
eal: move runtime config file to new location
As per deprecation notice [1], move DPDK runtime config to default
DPDK runtime data location. Also, remove the deprecation notice and
update release notes to indicate the changes.
[1] http://dpdk.org/patch/40418
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Anatoly Burakov [Tue, 26 Jun 2018 10:53:18 +0000 (11:53 +0100)]
doc: add IPC callback limitations
For asynchronous requests, user callback may be triggered either from
IPC thread or from interrupt thread. Because of this, delivery of
other interrupt-based events such as alarms may not be possible inside
the asynchronous IPC request callback handler. Document this
limitation.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Anatoly Burakov [Tue, 26 Jun 2018 10:53:17 +0000 (11:53 +0100)]
ipc: remove thread for async requests
Previously, we were using two IPC threads - one to handle messages
and synchronous requests, and another to handle asynchronous requests.
To handle replies for an async request, rte_mp_handle woke up the
rte_mp_handle_async thread to process through pthread_cond variable.
Change it to handle asynchronous messages within the main IPC thread.
To handle timeout events, for each async request which is sent,
we set an alarm for it. If its reply is received before timeout,
we will cancel the alarm when we handle the reply; otherwise,
alarm will invoke the async_reply_handle() as the alarm callback.
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Suggested-by: Thomas Monjalon <thomas@monjalon.net>
Jianfeng Tan [Tue, 26 Jun 2018 10:53:16 +0000 (11:53 +0100)]
eal: bring forward init of interrupt handling
Next commit will make asynchronous IPC requests rely on alarm API,
which in turn relies on interrupts to work. Therefore, move the EAL
interrupt initialization before IPC initialization to avoid breaking
IPC in the next commit.
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Anatoly Burakov [Tue, 26 Jun 2018 10:53:15 +0000 (11:53 +0100)]
eal/bsd: support alarm API
Implement EAL alarm API support for FreeBSD. The implementation
is largely identical to that of Linux version, with one key
difference.
The alarm API is a little Linux-centric in that it is expecting
the alarm API to manage alarm timeouts without involvement of the
interrupt thread. This works on Linux because in Linux, there's
timerfd API which allows waiting for timer events on an fd.
On FreeBSD, however, there are no timerfd's, and timer events are
set up directly in kevent. There is no way to pass information from
the alarm API to the interrupt thread, so we also add a little
back-channel magic to get soonest alarm timeout from the alarm API.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Anatoly Burakov [Tue, 26 Jun 2018 10:53:14 +0000 (11:53 +0100)]
eal/bsd: add interrupt thread
Add interrupt thread to FreeBSD. It is largely a copy-paste from
Linuxapp interrupt thread, except for a few key differences:
* Use kevent instead of epoll
* Do not recreate the event queue on adding/removing interrupt
sources, add/remove them to/from the queue on the fly instead
* No support for UIO/VFIO handles
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Jianfeng Tan [Tue, 26 Jun 2018 10:53:13 +0000 (11:53 +0100)]
eal/linux: use libc malloc in interrupt handling
IPC uses interrupts API internally, and memory subsystem uses IPC.
Therefore, IPC should not use rte_malloc to avoid circular dependency.
Switch to using regular glibc malloc in interrupts API.
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Jianfeng Tan [Tue, 26 Jun 2018 10:53:12 +0000 (11:53 +0100)]
eal/linux: use libc malloc in alarm
Alarm API is going to be used by IPC internally. However, because
memory subsystem depends on IPC, alarm API cannot use rte_malloc as
it creates a circular dependency.
To avoid such chicken and egg problem, we change to use glibc malloc
in the alarm API.
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Anatoly Burakov [Fri, 1 Jun 2018 09:08:12 +0000 (10:08 +0100)]
vfio: fix uninitialized variable
Some static analyzers complain about it, even though
value is never used if not initialized. To avoid additional
false positives about a potential null-pointer dereferences,
also add a null-check.
Bugzilla ID: 58
Fixes:
ea2dc1066870 ("vfio: add multi container support")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Anatoly Burakov [Fri, 1 Jun 2018 09:08:11 +0000 (10:08 +0100)]
eal/linux: fix uninitialized value
The value is not used, but some static analyzers may give out a
warning. Fix it by assigning default value of zero.
Bugzilla ID: 58
Fixes:
cdc242f260e7 ("eal/linux: support running as unprivileged user")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Anatoly Burakov [Fri, 1 Jun 2018 09:08:10 +0000 (10:08 +0100)]
eal/linux: fix invalid syntax in interrupts
Parentheses were missing. It worked because macro is enclosed in
parentheses, so syntax was valid after macro expansion.
Bugzilla ID: 58
Fixes:
0a45657a6794 ("pci: rework interrupt handling")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Anatoly Burakov [Thu, 31 May 2018 17:35:33 +0000 (18:35 +0100)]
eal: add option to limit memory allocation on sockets
Previously, it was possible to limit maximum amount of memory
allowed for allocation by creating validator callbacks. Although a
powerful tool, it's a bit of a hassle and requires modifying the
application for it to work with DPDK example applications.
Fix this by adding a new parameter "--socket-limit", with syntax
similar to "--socket-mem", which would set per-socket memory
allocation limits, and set up a default validator callback to deny
all allocations above the limit.
This option is incompatible with legacy mode, as validator callbacks
are not supported there.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Anatoly Burakov [Thu, 31 May 2018 09:51:01 +0000 (10:51 +0100)]
memzone: improve zero-length reserve
Currently, reserving zero-length memzones is done by looking at
malloc statistics, and reserving biggest sized element found in those
statistics. This has two issues.
First, there is a race condition. The heap is unlocked between the
time we check stats, and the time we reserve malloc element for memzone.
This may lead to inability to reserve the memzone we wanted to reserve,
because another allocation might have taken place and biggest sized
element may no longer be available.
Second, the size returned by malloc statistics does not include any
alignment information, which is worked around by being conservative and
subtracting alignment length from the final result. This leads to
fragmentation and reserving memzones that could have been bigger but
aren't.
Fix all of this by using earlier-introduced operation to reserve
biggest possible malloc element. This, however, comes with a trade-off,
because we can only lock one heap at a time. So, if we check the first
available heap and find *any* element at all, that element will be
considered "the biggest", even though other heaps might have bigger
elements. We cannot know what other heaps have before we try and
allocate it, and it is not a good idea to lock all of the heaps at
the same time, so, we will just document this limitation and
encourage users to reserve memzones with socket id properly set.
Also, fixup unit tests to account for the new behavior.
Fixes:
fafcc11985a2 ("mem: rework memzone to be allocated by malloc")
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Anatoly Burakov [Thu, 31 May 2018 09:51:00 +0000 (10:51 +0100)]
malloc: allow reserving biggest element
Add an internal-only function to allocate biggest element from
the heap. Nominally, it supports SOCKET_ID_ANY as its socket
argument, but it's essentially useless because other sockets
will only be allocated from if the entire heap on current or
specified socket is busy.
Still, asking to reserve a biggest element will allow fixing
race condition in memzone reserve that has been there for a
long time.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Remy Horton <remy.horton@intel.com>
Anatoly Burakov [Thu, 31 May 2018 09:50:59 +0000 (10:50 +0100)]
malloc: add finding biggest free IOVA-contiguous element
Adding internal-only function to find biggest free IOVA-contiguous
malloc element. This is not exposed to external API.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Remy Horton <remy.horton@intel.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Anatoly Burakov [Thu, 31 May 2018 17:05:40 +0000 (18:05 +0100)]
malloc: fix pad erasing
Previously, when joining adjacent free elements, we were erasing
trailer and header, but did not erase the padding. Fix this by
accounting for padding on erase, and do not erase padding twice
by adjusting data pointer and data len to not include padding.
Fixes:
bb372060dad4 ("malloc: make heap a doubly-linked list")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Anatoly Burakov [Tue, 12 Jun 2018 09:46:16 +0000 (10:46 +0100)]
mem: provide thread-unsafe memseg list walk variant
Sometimes, user code needs to walk memseg list while being inside
a memory-related callback. Rather than making everyone copy around
the same iteration code and depending on DPDK internals, provide an
official way to do memseg_list_walk() inside callbacks.
Also, remove existing reimplementation from memalloc code and use
the new API instead.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Anatoly Burakov [Tue, 12 Jun 2018 09:46:15 +0000 (10:46 +0100)]
mem: provide thread-unsafe memseg walk variant
Sometimes, user code needs to walk memseg list while being inside
a memory-related callback. Rather than making everyone copy around
the same iteration code and depending on DPDK internals, provide an
official way to do memseg_walk() inside callbacks.
Also, remove existing reimplementation from sPAPR VFIO code and use
the new API instead.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Anatoly Burakov [Tue, 12 Jun 2018 09:46:14 +0000 (10:46 +0100)]
mem: provide thread-unsafe contig walk variant
Sometimes, user code needs to walk memseg list while being inside
a memory-related callback. Rather than making everyone copy around
the same iteration code and depending on DPDK internals, provide an
official way to do memseg_contig_walk() inside callbacks.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Anatoly Burakov [Thu, 31 May 2018 16:11:47 +0000 (17:11 +0100)]
mem: mark pages as freeable on exit
When rte_eal_cleanup() is called, it is expected that DPDK will be able to
release all of its memory back to the system. However, if pages are marked
as unfreeable, the pages will not be released back. Fix this to mark all
pages as freeable on calling rte_eal_cleanup(), but only do it for primary
process, as secondaries can come and go.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Anatoly Burakov [Mon, 11 Jun 2018 20:55:42 +0000 (21:55 +0100)]
mem: allocate in reverse to reduce fragmentation
Currently, all hugepages are allocated from lower VA address to
higher VA address, while malloc heap allocates from higher VA
address to lower VA address. This results in heap fragmentation
over time due to multiple reserves leaving small space below the
allocated elements.
Fix this by allocating VA memory from the top, thereby reducing
fragmentation and lowering overall memory usage.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Anatoly Burakov [Mon, 11 Jun 2018 20:55:41 +0000 (21:55 +0100)]
test/fbarray: add autotests
Introduce a suite of autotests to cover functionality of fbarray.
This will check for invalid parameters, check API return values and
errno codes, and will also do some basic functionality checks on the
indexing code.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Anatoly Burakov [Mon, 11 Jun 2018 20:55:40 +0000 (21:55 +0100)]
fbarray: add reverse finding of contiguous
Add a function to return starting point of current contiguous
block, going backwards. All semantics are kept the same as the
existing function, with the only difference being that given the
same input, results will be returned in reverse order.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Anatoly Burakov [Mon, 11 Jun 2018 20:55:39 +0000 (21:55 +0100)]
fbarray: add reverse finding of chunk
Add a function to look for N used/free slots, but going backwards
instead of forwards. All semantics are kept similar to the existing
function, with the difference being that given the same input, the
same results will be returned in reverse order.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Anatoly Burakov [Mon, 11 Jun 2018 20:55:38 +0000 (21:55 +0100)]
fbarray: add reverse finding
Add function to look up used/free indexes starting from specified
index, but going backwards instead of forward. Semantics are kept
similar to the existing function, except for the fact that, given
the same input, the results returned will be in reverse order.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Anatoly Burakov [Mon, 11 Jun 2018 20:55:37 +0000 (21:55 +0100)]
fbarray: reduce duplication in element finding
Just code move to put all checks and calls in one place.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Anatoly Burakov [Mon, 11 Jun 2018 20:55:36 +0000 (21:55 +0100)]
fbarray: reduce duplication in chunk finding
Mostly code move, aside from more quick checks done to avoid
doing computations in obviously hopeless cases.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Anatoly Burakov [Mon, 11 Jun 2018 20:55:35 +0000 (21:55 +0100)]
fbarray: reduce duplication in contiguous finding
Mostly a code move, to have all code related to find_contig in
one place. This slightly changes the API in that previously,
calling find_contig_free() on a full fbarray would've been
an error, but equivalent call to find_contig_used() on an empty
array does not return an error, leading to an inconsistency in
the API.
The decision was made to not treat this condition as an error,
because it is equivalent to calling find_contig() on an index
that just happens to be used/free, which is not an error and
will return 0.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Anatoly Burakov [Mon, 11 Jun 2018 20:55:34 +0000 (21:55 +0100)]
fbarray: fix errno values returned from functions
Errno values are supposed to be positive, yet they were negative.
This changes API, so not backporting.
Fixes:
c44d09811b40 ("eal: add shared indexed file-backed array")
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Anatoly Burakov [Thu, 28 Jun 2018 11:41:49 +0000 (12:41 +0100)]
mem: make segment preallocation OS-specific
In the perfect world, it wouldn't matter how much memory was
preallocated because most of it was always going to be private
anonymous zero-page mappings for the duration of the program.
However, in practice, due to peculiarities of FreeBSD, we need
to additionally limit memory allocation there. This patch moves
the segment preallocation to EAL private functions that will be
implemented by an OS-specific EAL rather than being in the common
memory-related code.
Since there is no support for growing/shrinking memory use at
runtime on FreeBSD anyway, this does not inhibit any functionality
but makes core dumps faster even on default settings.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Anatoly Burakov [Thu, 28 Jun 2018 11:41:48 +0000 (12:41 +0100)]
eal/bsd: concatenate adjacent memory segments
Previously, memory allocator always left holes between mapped
contigmem segments, even if they were IOVA-contiguous. Fix this
by remembering last IOVA address and memseg index, and checking
against those when mapping new contigmem segments.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Anatoly Burakov [Thu, 28 Jun 2018 11:41:47 +0000 (12:41 +0100)]
eal/bsd: fix memory segment index display
Segment index was set to 0 at start but was never incremented.
This has no consequences other than displayed number of segments
allocated at initialization. Fix this by incrementing it after
displaying.
Fixes:
66cc45e293ed ("mem: replace memseg with memseg lists")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Dariusz Stojaczyk [Tue, 10 Jul 2018 10:44:47 +0000 (12:44 +0200)]
eal: fix return codes on control thread failure
This function returned positive error numbers instead
of negative ones as desbribed in the doc. What's worse,
multiple of its callers only check for (rc < 0) to detect
failure.
It was incorrectly assumed that pthread_create
and pthread_setaffinity_np return negative errnos. They
always returns positive ones, so this patch negates their
return values before returning.
Fixes:
9e5afc72c909 ("eal: add function to create control threads")
Cc: stable@dpdk.org
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: Olivier Matz <olivier.matz@6wind.com>
Dariusz Stojaczyk [Tue, 10 Jul 2018 10:44:46 +0000 (12:44 +0200)]
eal: fix return codes on thread naming failure
The doc says this function returns negative errno
on error, but it currently returns either -1 or
positive errno.
It was incorrectly assumed that pthread_setname_np()
returns negative error numbers. It always returns
positive ones, so this patch negates its return value
before returning.
Fixes:
3901ed99c2f8 ("eal: fix thread naming on FreeBSD")
Cc: stable@dpdk.org
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: Olivier Matz <olivier.matz@6wind.com>
Dariusz Stojaczyk [Tue, 10 Jul 2018 10:44:45 +0000 (12:44 +0200)]
eal: ignore failure of naming a control thread
The error is not fatal and we can physically continue
creating the thread. It simply won't have a name.
If rte_thread_setname() fails, we will just print
a debug log now. EAL does the same for lcore threads.
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: Olivier Matz <olivier.matz@6wind.com>
Dariusz Stojaczyk [Mon, 18 Jun 2018 19:53:09 +0000 (21:53 +0200)]
mem: do not use --base-virtaddr in secondary processes
Since secondary process' address space is highly dictated
by the primary process' mappings, it doesn't make much
sense to use base-virtaddr for secondary processes.
This patch is intended to fix PCI resource mapping
in secondary processes using the same base-virtaddr
as their primary processes. PCI uses the end of the hugepage
memory area to map all resources. [pci_find_max_end_va()]
It works for primary processes, but can't be mapped 1:1
by secondary ones, as the same addresses are currently always
occupied by shadow memseg lists, which were created with
eal_get_virtual_area(NULL, ...).
```
PRIMARY PROCESS
0x6e00e00000 388K rw-s- fbarray_memseg-2048k-1-3
0x6e01000000 16777216K r---- [ anon ]
0x7201000000 16K rw-s- resource0
SECONDARY PROCESS
0x6e00e00000 388K rw-s- fbarray_memseg-2048k-1-3
0x6e01000000 16777216K r---- [ anon ]
0x7201000000 4K rw-s- fbarray_memseg-1048576k-0-0_203213
```
Fixes:
524e43c2ad9a ("mem: prepare memseg lists for multiprocess sync")
Cc: stable@dpdk.org
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Dariusz Stojaczyk [Fri, 15 Jun 2018 15:13:04 +0000 (17:13 +0200)]
mem: fix alignment requested with --base-virtaddr
Whenever a calculated base-virtaddr offset had to be
manually aligned to requested page_sz, we did not take
account of that alignment in incrementing the base-virtaddr
offset further. The next requested virtual area could print
a warning "hint [...] not respected!" and let the system
pick an address instead. As a result, this breaks secondary
process support on many system configurations.
Fixes:
b7cc54187ea4 ("mem: move virtual area function in common directory")
Cc: stable@dpdk.org
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Dariusz Stojaczyk [Wed, 13 Jun 2018 19:08:14 +0000 (21:08 +0200)]
mem: fix alignment of requested virtual areas
Although the alignment mechanism works as intended, the
`no_align` bool flag was set incorrectly. We were aligning
buffers that didn't need extra alignment, and weren't
aligning ones that really needed it.
Fixes:
b7cc54187ea4 ("mem: move virtual area function in common directory")
Cc: stable@dpdk.org
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Dariusz Stojaczyk [Mon, 4 Jun 2018 05:33:41 +0000 (07:33 +0200)]
mem: avoid crash on memseg query with invalid address
When trying to use it with an address that's not
managed by DPDK it would segfault due to a missing
check. The doc says this function returns either
a pointer or NULL, so let it do so.
Fixes:
66cc45e293ed ("mem: replace memseg with memseg lists")
Cc: stable@dpdk.org
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Dariusz Stojaczyk [Fri, 1 Jun 2018 12:59:20 +0000 (14:59 +0200)]
mem: do not unmap overlapping region on mmap failure
This isn't documented in the manuals, but a failed
mmap(..., MAP_FIXED) may still unmap overlapping
regions. In such case, we need to remap these regions
back into our address space to ensure mem contiguity.
We do it unconditionally now on mmap failure just to
be safe.
Verified on Linux 4.9.0-4-amd64. I was getting
ENOMEM when trying to map hugetlbfs with no space
left, and the previous anonymous mapping was still
being removed.
Fixes:
582bed1e1d1d ("mem: support mapping hugepages at runtime")
Cc: stable@dpdk.org
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Dariusz Stojaczyk [Fri, 1 Jun 2018 12:59:19 +0000 (14:59 +0200)]
mem: do not leave unmapped holes in EAL memory area
EAL reserves a huge area in virtual address space
to provide virtual address contiguity for e.g.
future memory extensions (memory hotplug). During
memory hotplug, if the hugepage mmap succeeds but
doesn't suffice EAL's requiriments, the EAL would
unmap this mapping straight away, leaving a hole in
its virtual memory area and making it available
to everyone. As EAL still thinks it owns the entire
region, it may try to mmap it later with MAP_FIXED,
possibly overriding a user's mapping that was made
in the meantime.
This patch ensures each hole is mapped back by EAL,
so that it won't be available to anyone else.
Fixes:
582bed1e1d1d ("mem: support mapping hugepages at runtime")
Cc: stable@dpdk.org
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Nelio Laranjeiro [Wed, 11 Jul 2018 06:49:35 +0000 (08:49 +0200)]
ethdev: fix flow expansion matching types
Node RSS types are generally covering more RSS kind than the user is
requesting, it should accept to expand even if only a single bit is
remains after masking. Setting the correct RSS kind for the rule
remains the driver job.
Fixes:
4ed05fcd441b ("ethdev: add flow API to expand RSS flows")
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Xueming Li [Sat, 26 May 2018 15:15:20 +0000 (23:15 +0800)]
app/testpmd: distribute queues to cores
Current topology distribute forwarding streams to lcores by port, this
make unbalanced loading when port number larger than 2:
lcore 0: P0Q0->P1Q0, P0Q1->P1Q1
locre 1: P1Q0->P0Q0, P1Q1->P0Q1
If only one port has traffic, only one locre get fully loaded and the
other one get no forwarding. Performance is bad as only one core doing
forwarding in such case.
This patch distributes forwarding streams by queue, try to get streams
of each port handled by different lcore:
lcore 0: P0Q0->P1Q0, P1Q0->P1Q0
locre 1: P0Q1->P0Q1, P1Q1->P0Q1
Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Yipeng Wang [Tue, 10 Jul 2018 17:00:01 +0000 (10:00 -0700)]
hash: add API to query the key count
Add a new function, rte_hash_count, to return the number of keys that
are currently stored in the hash table. Corresponding test functions are
added into hash_test and hash_multiwriter test.
Signed-off-by: Yipeng Wang <yipeng1.wang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Yipeng Wang [Tue, 10 Jul 2018 17:00:00 +0000 (10:00 -0700)]
test/hash: add test for read/write concurrency
This commits add a new test case for testing read/write concurrency.
Signed-off-by: Yipeng Wang <yipeng1.wang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Yipeng Wang [Tue, 10 Jul 2018 16:59:59 +0000 (09:59 -0700)]
test/hash: update for read/write concurrency perf
New code is added to support read-write concurrency for
rte_hash. Due to the newly added code in critial path,
the perf test is modified to show any performance impact.
It is still a single-thread test.
Signed-off-by: Yipeng Wang <yipeng1.wang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Yipeng Wang [Tue, 10 Jul 2018 16:59:58 +0000 (09:59 -0700)]
hash: support read/write concurrency
The existing implementation of librte_hash does not support read-write
concurrency. This commit implements read-write safety using rte_rwlock
and rte_rwlock TM version if hardware transactional memory is available.
Both multi-writer and read-write concurrency is protected by rte_rwlock
now. The x86 specific header file is removed since the x86 specific RTM
function is not called directly by rte hash now.
Signed-off-by: Yipeng Wang <yipeng1.wang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Yipeng Wang [Tue, 10 Jul 2018 16:59:57 +0000 (09:59 -0700)]
hash: move duplicated code into functions
This commit refactors the hash table lookup/add/del code
to remove some code duplication. Processing on primary bucket can
also apply to secondary bucket with same code.
Signed-off-by: Yipeng Wang <yipeng1.wang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Yipeng Wang [Tue, 10 Jul 2018 16:59:56 +0000 (09:59 -0700)]
hash: fix key slot size accuracy
This commit calculates the needed key slot size more
accurately. The previous local cache fix requires
the free slot ring to be larger than actually needed.
The calculation of the value is inaccurate.
Fixes:
5915699153d7 ("hash: fix scaling by reducing contention")
Cc: stable@dpdk.org
Signed-off-by: Yipeng Wang <yipeng1.wang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Yipeng Wang [Tue, 10 Jul 2018 16:59:55 +0000 (09:59 -0700)]
hash: fix a multi-writer race condition
Current multi-writer implementation uses Intel TSX to
protect the cuckoo path moving but not the cuckoo
path searching. After searching, we need to verify again if
the same empty slot still exists at the beginning of the TSX
region. Otherwise another writer could occupy the empty slot
before the TSX region. Current code does not verify.
Fixes:
be856325cba3 ("hash: add scalable multi-writer insertion with Intel TSX")
Cc: stable@dpdk.org
Signed-off-by: Yipeng Wang <yipeng1.wang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Yipeng Wang [Tue, 10 Jul 2018 16:59:54 +0000 (09:59 -0700)]
hash: fix multiwriter lock memory allocation
When malloc for multiwriter_lock, the align should be
RTE_CACHE_LINE_SIZE rather than LCORE_CACHE_SIZE.
Also there should be check to verify the success of
rte_malloc.
Fixes:
be856325cba3 ("hash: add scalable multi-writer insertion with Intel TSX")
Cc: stable@dpdk.org
Signed-off-by: Yipeng Wang <yipeng1.wang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Pavan Nikhilesh [Tue, 3 Jul 2018 04:50:41 +0000 (10:20 +0530)]
mempool/octeontx: fix pool to aura mapping
HW needs each pool to be mapped to an aura set of 16 auras.
Previously, pool to aura mapping was considered to be 1:1.
Fixes:
02fd6c744350 ("mempool/octeontx: support allocation")
Cc: stable@dpdk.org
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Radu Nicolau [Mon, 11 Jun 2018 10:03:23 +0000 (11:03 +0100)]
examples/l3fwd-power: add high/regular perf cores options
Added high/regular performance core pinning configuration options
that can be used in place of the existing 'config' option.
'--high-perf-cores CORELIST' option allow the user to specify a
high performance cores list; if this option is not used and the
'perf-config' option is used, the application will query the
system using the rte_power library in order to get a list of
available high performance cores. The cores that are considered
high performance are the cores that have turbo enabled.
'--perf-config (port,queue,hi_perf,lcore_index)'
option is similar to the existing config option, the cores are specified
as indices for bins containing high or regular performance cores.
Example:
l3fwd-power -l 6,7 -- -p 0xff \
--high-perf-cores 6 --perf-config="(0,0,0,0),(1,0,1,0)"
cores 6 and 7 are used, core 6 is specified as a high performance core.
port 0 queue 0 will use a regular performance core, index 0 (core 7)
port 1 queue 0 will use a high performance core, index 0 (core 6)
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: David Hunt <david.hunt@intel.com>
Radu Nicolau [Mon, 11 Jun 2018 10:03:22 +0000 (11:03 +0100)]
test/power: add unit test for get capabilities API
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: David Hunt <david.hunt@intel.com>
Radu Nicolau [Mon, 11 Jun 2018 10:03:21 +0000 (11:03 +0100)]
power: add get capabilities API
New API added, rte_power_get_capabilities(), that allows the
application to query the power and performance capabilities
of the CPU cores.
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: David Hunt <david.hunt@intel.com>
Jasvinder Singh [Tue, 10 Jul 2018 20:43:39 +0000 (21:43 +0100)]
examples/ip_pipeline: remove commands restriction
Currently, some CLI commands (for examples- add or delete pipeline
table entries, add meter profile etc.) fails to execute when
application pipeline threads are not running. Therefore,
command for enabling pipeline on the thread is required to be
executed first or specified in the script file before any of
such commands.
This patch removes above restriction and adds support for
executing all CLI commands regardless of the pipeline thread state.
Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Jasvinder Singh [Fri, 6 Jul 2018 17:21:16 +0000 (18:21 +0100)]
app/testpmd: rework softnic forward mode
Modied the testpmd softnic forwarding mode as per the
changes in softnic PMD.
To run testpmd application with softnic fwd mode, following
command is used;
$ ./testpmd -c 0xc -n 4 --vdev 'net_softnic0,firmware=script.cli'
-- -i --forward-mode=softnic
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Jasvinder Singh [Fri, 6 Jul 2018 17:21:15 +0000 (18:21 +0100)]
net/softnic: add firmware script
Add default firmware script for softnic.
Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Jasvinder Singh [Fri, 6 Jul 2018 17:21:14 +0000 (18:21 +0100)]
net/softnic: implement start and stop
Implements softnic start and stop function.
Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Jasvinder Singh [Fri, 6 Jul 2018 17:21:13 +0000 (18:21 +0100)]
net/softnic: setup Rx/Tx queues
Implements softnic receive and transmit queues setup using swq object.
Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Jasvinder Singh [Fri, 6 Jul 2018 17:21:12 +0000 (18:21 +0100)]
net/softnic: add command for TTL action
Add cli commands for ttl action in softnic pipeline objects.
Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Jasvinder Singh [Fri, 6 Jul 2018 17:21:11 +0000 (18:21 +0100)]
net/softnic: add command for meter action
Add cli commands for meter action in softnic pipeline objects.
Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Jasvinder Singh [Fri, 6 Jul 2018 17:21:10 +0000 (18:21 +0100)]
net/softnic: add command to read stats
Add cli commands to read port and table stats of
softnic pipeline objects.
Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Jasvinder Singh [Fri, 6 Jul 2018 17:21:09 +0000 (18:21 +0100)]
net/softnic: add command for pipeline table entries
Add cli commands for table entries in softnic pipeline objects.
Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Jasvinder Singh [Fri, 6 Jul 2018 17:21:08 +0000 (18:21 +0100)]
net/softnic: add command to enable/disable pipeline
Add cli commands to enable and disable pipelines on specific threads in
softnic.
Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Jasvinder Singh [Fri, 8 Jun 2018 12:41:48 +0000 (13:41 +0100)]
net/softnic: add command to create objects
Add cli commands to create softnic objects such as mempool, swq,
pipeline, etc.
Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>