dpdk.git
6 years agotest/pipeline: fix type of table entry parameter
Jasvinder Singh [Mon, 14 May 2018 13:35:24 +0000 (14:35 +0100)]
test/pipeline: fix type of table entry parameter

Fixes the wrong argument in table action miss function.

Fixes: 4c387fcdf777 ("pipeline: add new functions for action handlers")
Cc: stable@dpdk.org
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
6 years agoexamples/ipsec-secgw: fix IP address parsing
Kirill Rybalchenko [Mon, 14 May 2018 10:00:51 +0000 (11:00 +0100)]
examples/ipsec-secgw: fix IP address parsing

In strlcpy function parameters there was no allowance for
null terminator, so ip address was copied without last character.

Fixes: ae943ebe1ed3 ("examples/ipsec-secgw: replace strncpy with strlcpy")
Cc: stable@dpdk.org
Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
6 years agoapp/testpmd: fix log after detach
Zhiyong Yang [Mon, 14 May 2018 03:20:48 +0000 (11:20 +0800)]
app/testpmd: fix log after detach

The second parameter "name" in the function rte_eth_dev_detach
has been already redefined as "char *name __rte_unused",
"port_id" is printed instead of "name" in testpmd.

Fixes: b65ecf199324 ("devargs: rename legacy API")
Cc: stable@dpdk.org
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Acked-by: Matan Azrad <matan@mellanox.com>
6 years agoconfig: increase max lcore to 16 for DPAA
Shreyansh Jain [Mon, 14 May 2018 10:05:00 +0000 (15:35 +0530)]
config: increase max lcore to 16 for DPAA

With this change, DPAA and DPAA2 configuration compiled applications
are interoperable without any impact on the functional behavior.

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
6 years agoraw/ifpga/base: fix build with icc
Tianfei Zhang [Mon, 14 May 2018 09:58:37 +0000 (17:58 +0800)]
raw/ifpga/base: fix build with icc

fix compile error on icc compiler

Fixes: 56bb54ea1bdf ("raw/ifpga/base: add Intel FPGA OPAE share code")

Signed-off-by: Tianfei Zhang <tianfei.zhang@intel.com>
Tested-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
6 years agoexamples/performance-thread: fix return type of threads
David Hunt [Mon, 14 May 2018 02:53:15 +0000 (03:53 +0100)]
examples/performance-thread: fix return type of threads

The function pthread_create() expects void *(*func) (void *)
for function pointer, however, lthread_func_t was defined as
void (*func) (void *), so now gcc 8.1 warns that the cast is
incorrect, causing a compilation failure. This patch changes
the declaration of lthread_func_t from returning a void to
returning a void*, and then changes the sample app in the
relevant places that are affected by the typedef change.

Fixes: 116819b9ed0d ("examples/performance-thread: add lthread subsystem")
Cc: stable@dpdk.org
Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
6 years agotest: fix build with icc
Abhinandan Gujjar [Mon, 14 May 2018 06:50:22 +0000 (12:20 +0530)]
test: fix build with icc

This patch provides fix for icc compilation issue with event
crypto adapter test application.
Currently, number of elements in the session mempool is defined
by max_nb_sessions & this is replaced with a macro.

Fixes: 3c2c535ecfc0 ("test: add event crypto adapter auto-test")

Reported-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Signed-off-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
6 years agoapp/testpmd: fix asynchronic port removal
Matan Azrad [Thu, 3 May 2018 10:31:48 +0000 (10:31 +0000)]
app/testpmd: fix asynchronic port removal

When a removable device is plugged-out, a RMV interrupt is invoked and
the application can catch the event in order to stop the device
management.

The Testpmd wrong behavior in this case is to detach the removed device
using the EAL detach API.

The EAL API does not invalidate the ethdev port and the port keeps
appearing as valid from the ethdev point of view.

Thus, the next operations for the ethtev port X may trigger an invalid
rte_device access. For example, calling "show port info X" may cause
segfault.

Moreover, the removed port is not removed from the Testpmd data-path
structures. Therefore, the invalid device may still be used by the
Testpmd data-path.

Call the Testpmd detach_port() function which uses the ethdev detach
API, and prepare the Testpmd forward ports database for a new
forwarding session without the detached port.

Fixes: 284c908cc588 ("app/testpmd: request device removal interrupt")
Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com>
6 years agoapp/testpmd: fix removed device link status asking
Matan Azrad [Thu, 3 May 2018 10:31:47 +0000 (10:31 +0000)]
app/testpmd: fix removed device link status asking

In the RMV device event callback, there is a call for the removed
device stop operation which triggers a link status operation for the
removed device.

It may casue an error from the removed device PMD.

Skip the link status operation in the above described case.

Fixes: 284c908cc588 ("app/testpmd: request device removal interrupt")
Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com>
6 years agoapp/testpmd: fix synchronic port hotplug
Matan Azrad [Thu, 3 May 2018 10:31:46 +0000 (10:31 +0000)]
app/testpmd: fix synchronic port hotplug

When the user uses the synchronic hot-plug commands, attach\detach, in
order to insert\remove a port from the system, the forward ports list
update is missed in the current implementation.

Thus, an invalid port may be used for data-path in case of detach
because the detached port was not removed from the forward port list.

In addition, a new port is not used for data-path in case of attach, as the
default behavior of Testpmd, because the attached port was not inserted
to the forward port list.

Update the forward port list in the above cases to allow the correct
port usage for data-path in the next packet forwarding start.

Fixes: edab33b1c01d ("app/testpmd: support port hotplug")
Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com>
6 years agoapp/testpmd: fix forward ports Rx flush
Matan Azrad [Thu, 3 May 2018 10:31:45 +0000 (10:31 +0000)]
app/testpmd: fix forward ports Rx flush

A port Rx queue flush is done when the packet forwarding starts in
order to clean the port statistics for a new traffic session.

The flush operation is wrongly called before the update of the new
forward ports, and may fail due to flush operation for an invalid port
configured by the old session.

Move the new forward port setup to be done before the Rx queue flush.

Fixes: 7741e4cf16c0 ("app/testpmd: VMDq and DCB updates")
Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com>
6 years agoapp/testpmd: fix forward ports update
Matan Azrad [Thu, 3 May 2018 10:31:44 +0000 (10:31 +0000)]
app/testpmd: fix forward ports update

When the forward ports are changed either by new portlist\portmask
configurations or by a port detachment, all the old forward streams
are freed and new streams are allocated to be aligned with the new
forward ports.

If the number of the forward ports drops to 0, there is an attempt
to wrongly allocate 0 memory for the streams.

Skip the streams memory allocation if no forward ports are configured.

Fixes: ce8d561418d4 ("app/testpmd: add port configuration settings")
Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com>
6 years agoapp/testpmd: fix valid ports prints
Matan Azrad [Thu, 3 May 2018 10:31:43 +0000 (10:31 +0000)]
app/testpmd: fix valid ports prints

There are several cases of an invalid port data access that causes the
printing of all the valid ports, for example, when the user asks to
receive a port information of an invalid port.

Wrongly, the port with id 0 is printed in all the above described
cases, regardless of its validity.

Print port 0 only if it is valid as done for the rest of the ports.

Fixes: af75078fece3 ("first public release")
Fixes: b6ea6408fbc7 ("ethdev: store numa_node per device")
Fixes: edab33b1c01d ("app/testpmd: support port hotplug")
Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com>
6 years agoapp/testpmd: fix slave port detection
Matan Azrad [Wed, 28 Mar 2018 11:17:53 +0000 (11:17 +0000)]
app/testpmd: fix slave port detection

Testpmd allows to create and control bonding devices by run time
command lines using the bonding PMD API.

Some bonding device slaves operations (close, stop, etc) should not be
used by the application and must be managed by the bonding PMD.

Thus, Testpmd manages slave flags to prevent the special operations
calls and when a slave is added to bonding device by a run time command
line, the flag is set.

There is one more way to define the slaves for a bonding device using
EAL command line and Testpmd doesn't set the slave flag in this case
what causes to the special operations to be called by Testpmd.

Add one more check to detect bonding slave device.

Fixes: 41b05095c4d1 ("app/testpmd: fix bonding start")
Fixes: 0e545d3047fe ("app/testpmd: check stopping port is not in bonding")
Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
6 years agoapp/testpmd: disable memory locking on FreeBSD
Anatoly Burakov [Thu, 3 May 2018 12:38:20 +0000 (13:38 +0100)]
app/testpmd: disable memory locking on FreeBSD

If mlockall() is called while allocated VA space is bigger than
amount of available RAM, FreeBSD kernel will deadlock and need
a hard reboot. We do allocate big amounts of memory because of
how new memory subsystem works, so calling mlockall() will cause
a deadlock. So, disable mlockall() by default on FreeBSD.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
6 years agoapp/testpmd: make locking memory configurable
Anatoly Burakov [Thu, 3 May 2018 12:38:19 +0000 (13:38 +0100)]
app/testpmd: make locking memory configurable

Add two new command-line parameters for either enabling or
disabling locking all memory at app startup.

Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Remy Horton <remy.horton@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
6 years agolib: clear experimental version tag in linker scripts
Ferruh Yigit [Fri, 27 Apr 2018 15:17:55 +0000 (16:17 +0100)]
lib: clear experimental version tag in linker scripts

Remove version tag from experimental block in linker version scripts
(.map files).

That label is not used by linker and information only. It is useful
for version blocks but not useful for experimental block but confusing.
Removing those labels.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
6 years agoipc: fix duplicate string copy in async request
Anatoly Burakov [Thu, 3 May 2018 10:35:26 +0000 (11:35 +0100)]
ipc: fix duplicate string copy in async request

Coverity issue: 272582
Fixes: 2147c0950580 ("ipc: clean up code")

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
6 years agomem: fix unmapping and marking segments as free
Anatoly Burakov [Thu, 3 May 2018 10:11:27 +0000 (11:11 +0100)]
mem: fix unmapping and marking segments as free

Currently, page deallocation might fail if allocator cannot get page
fd, which will leave VA space still mapped, and will also not mark
page as free.

Fix page deallocation function to always unmap space before trying
to get rid of the page itself, and always mark page as free even if
page deallocation failed.

Fixes: a5ff05d60fc5 ("mem: support unmapping pages at runtime")
Fixes: 1a7dc2252f28 ("mem: revert to using flock and add per-segment lockfiles")

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
6 years agomem: fix return code of freeing segment on failure
Anatoly Burakov [Thu, 3 May 2018 10:11:26 +0000 (11:11 +0100)]
mem: fix return code of freeing segment on failure

Return value should be zero for success, but if unlock and unlink
have succeeded, return value was 1, which triggered failure message
in calling code.

Fixes: a5ff05d60fc5 ("mem: support unmapping pages at runtime")

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
6 years agomem: fix index for unmapping segments on failure
Anatoly Burakov [Thu, 3 May 2018 10:11:25 +0000 (11:11 +0100)]
mem: fix index for unmapping segments on failure

Segment index was calculated incorrectly, causing free_seg to
attempt to free segments that do not exist.

Fixes: a5ff05d60fc5 ("mem: support unmapping pages at runtime")

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Tested-by: Yong Liu <yong.liu@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
6 years agomem: fix potential underflow on mem size calculation
Anatoly Burakov [Thu, 3 May 2018 13:03:19 +0000 (14:03 +0100)]
mem: fix potential underflow on mem size calculation

If total memory is already bigger than max memory, an underflow
will occur on subtraction. Fix it by simply stopping whenever
we already have amount of memory that is bigger than maximum.

Fixes: 66cc45e293ed ("mem: replace memseg with memseg lists")

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
6 years agomemzone: document reserving zero-length memzones
Anatoly Burakov [Thu, 3 May 2018 16:25:58 +0000 (17:25 +0100)]
memzone: document reserving zero-length memzones

Currently, reserving a memzone with length set to 0 will not trigger
any memory allocations, and memzone will instead be looking through
already allocated memory only. Document this limitation.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
6 years agomemzone: fix size on reserving biggest memzone
Anatoly Burakov [Thu, 3 May 2018 16:00:47 +0000 (17:00 +0100)]
memzone: fix size on reserving biggest memzone

Size of malloc heap elements include overhead, which should not
be counted as part of memzone.

Fixes: fafcc11985a2 ("mem: rework memzone to be allocated by malloc")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
6 years agomemzone: fix race condition on alloc failure
Anatoly Burakov [Thu, 3 May 2018 08:59:28 +0000 (09:59 +0100)]
memzone: fix race condition on alloc failure

Deallocation used the wrong function, which could have resulted in
race conditions because the function does not use locks internally.

Fixes: 1403f87d4fb8 ("malloc: enable memory hotplug support")

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
6 years agomem: unmap unneeded space
Anatoly Burakov [Mon, 30 Apr 2018 11:21:43 +0000 (12:21 +0100)]
mem: unmap unneeded space

When we ask to reserve virtual areas, we usually include
alignment in the mapping size, and that memory ends up
being wasted. Wasting a gigabyte of VA space while trying to
reserve one gigabyte is pretty expensive on 32-bit, so after
we're done mapping, unmap unneeded space.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
6 years agomem: check if allocation size is too big
Anatoly Burakov [Mon, 30 Apr 2018 11:21:42 +0000 (12:21 +0100)]
mem: check if allocation size is too big

Mapping size is a 64-bit integer, but mmap() will accept size_t for
size mappings. A user could request a mapping with an alignment, which
would have overflown size_t, so check if (size + alignment) will
overflow size_t.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
6 years agomem: fix typo in local function name
Thomas Monjalon [Tue, 1 May 2018 19:38:52 +0000 (21:38 +0200)]
mem: fix typo in local function name

Fixes: 582bed1e1d1d ("mem: support mapping hugepages at runtime")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
6 years agoeal: fix typo in doc of pointer offset macro
Thomas Monjalon [Tue, 1 May 2018 19:35:50 +0000 (21:35 +0200)]
eal: fix typo in doc of pointer offset macro

Fixes: af75078fece3 ("first public release")
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
6 years agoeal: fix mempool ops name parsing
Ivan Malov [Fri, 4 May 2018 10:31:54 +0000 (11:31 +0100)]
eal: fix mempool ops name parsing

The code aimed to pick and remember the value of
mempool ops name from EAL command line arguments does not
copy the string and remembers the pointer provided
by getopt_long() directly. The latter could be clobbered
later and result in reading wrong mbuf pool ops name
by rte_mempool library.

Typically, this flaw could be avoided by using strdup()
to remember the string value of the option.

Fixes: a103a97e7191 ("eal: allow user to override default mempool driver")
Cc: stable@dpdk.org
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
6 years agorawdev: remove dead code
Shreyansh Jain [Wed, 9 May 2018 15:26:10 +0000 (20:56 +0530)]
rawdev: remove dead code

Coverity issue: 260406
Fixes: c88b3f2558ed ("rawdev: introduce raw device library")
Cc: stable@dpdk.org
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
6 years agoraw/skeleton: remove dead code
Shreyansh Jain [Wed, 9 May 2018 15:26:09 +0000 (20:56 +0530)]
raw/skeleton: remove dead code

Coverity Issue: 260411
Fixes: 55ca1b0f2151 ("raw/skeleton: add test cases")
Cc: stable@dpdk.org
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
6 years agoraw/skeleton: fix resource leak in test
Shreyansh Jain [Wed, 9 May 2018 15:26:08 +0000 (20:56 +0530)]
raw/skeleton: fix resource leak in test

Coverity issue: 260402
Fixes: 55ca1b0f2151 ("raw/skeleton: add test cases")
Cc: stable@dpdk.org
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
6 years agobus/fslmc: remove dead code
Shreyansh Jain [Wed, 9 May 2018 15:27:52 +0000 (20:57 +0530)]
bus/fslmc: remove dead code

Coverity issue: 268338
Fixes: 828d51d8fc3e ("bus/fslmc: refactor scan and probe functions")
Cc: stable@dpdk.org
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
6 years agobus/fslmc: fix memory leak and cleanup
Shreyansh Jain [Wed, 9 May 2018 15:27:51 +0000 (20:57 +0530)]
bus/fslmc: fix memory leak and cleanup

Coverity issue: 268327
Fixes: 828d51d8fc3e ("bus/fslmc: refactor scan and probe functions")
Cc: stable@dpdk.org
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
6 years agobus/dpaa: improve dynamic logging
Hemant Agrawal [Wed, 25 Apr 2018 12:57:02 +0000 (18:27 +0530)]
bus/dpaa: improve dynamic logging

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
6 years agonet/dpaa: fix xstats implementation
Hemant Agrawal [Wed, 25 Apr 2018 12:57:01 +0000 (18:27 +0530)]
net/dpaa: fix xstats implementation

Some of the applications are expecting that if n is 0, it shall
return the supported number of stats. e.g. VPP

Fixes: b21ed3e2a16d ("net/dpaa: support extended statistics")
Cc: stable@dpdk.org
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
6 years agobus/fslmc: improve debug logging
Hemant Agrawal [Wed, 25 Apr 2018 12:57:00 +0000 (18:27 +0530)]
bus/fslmc: improve debug logging

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
6 years agobus/fslmc: support device blacklisting
Hemant Agrawal [Wed, 25 Apr 2018 12:56:59 +0000 (18:26 +0530)]
bus/fslmc: support device blacklisting

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
6 years agobus/dpaa: support device blacklisting
Hemant Agrawal [Wed, 25 Apr 2018 12:56:58 +0000 (18:26 +0530)]
bus/dpaa: support device blacklisting

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
6 years agokni: fix possible mbuf leaks and speed up port release
Yangchao Zhou [Thu, 19 Apr 2018 03:12:20 +0000 (11:12 +0800)]
kni: fix possible mbuf leaks and speed up port release

rx_q fifo can only be released by kernel thread. There may be
mbuf leaks in rx_q because kernel threads are randomly stopped.

When the kni is released and netdev is unregisterd, convert the
physical address mbufs in rx_q to the virtual address in free_q.
By the way, alloc_q can be processed together to speed up the
release rate in userspace.

In my test, it is improved from 300-500ms with a mempool that has
 131072 mbufs to 10ms(regardless of the specifications).

Suggested-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Yangchao Zhou <zhouyates@gmail.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agoexamples/vhost_scsi: replace strncpy with strlcpy
Reshma Pattan [Thu, 10 May 2018 12:05:44 +0000 (13:05 +0100)]
examples/vhost_scsi: replace strncpy with strlcpy

Use strlcpy instead of strncpy.

Fixes: db75c7af19 ("examples/vhost_scsi: introduce a new sample app")
Cc: stable@dpdk.org
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
6 years agoexamples/ipsec-secgw: replace strncpy with strlcpy
Reshma Pattan [Wed, 9 May 2018 16:11:06 +0000 (17:11 +0100)]
examples/ipsec-secgw: replace strncpy with strlcpy

Use strlcpy instead of strncpy.
Use strcpy where boundchecks on destination is not needed.

Fixes: 0d547ed037 ("examples/ipsec-secgw: support configuration file")
Fixes: 07b156199f ("examples/ipsec-secgw: fix configuration string termination")
Fixes: a1469c319f ("examples/ipsec-secgw: fix configuration parsing")
Cc: stable@dpdk.org
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
6 years agoexamples/quota_watermark: fix return type of threads
Reshma Pattan [Wed, 9 May 2018 11:35:28 +0000 (12:35 +0100)]
examples/quota_watermark: fix return type of threads

Gcc 8.0.1 reports incompatible cast between types i.e. from
`void (*)(void *)` to `(int (*)(void *)`.

Change the pipeline_stage prototype to retun int type
to fix the issue.

Fixes: a0ffcb257a ("examples/quota_watermark: correct code indentation")
Cc: stable@dpdk.org
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
6 years agotest/pipeline: fix return type of stub miss
David Hunt [Thu, 10 May 2018 07:38:15 +0000 (08:38 +0100)]
test/pipeline: fix return type of stub miss

New warning with gcc 8.1:
The table_action_stub_miss() function was incorrectly
declared as returning a typedef of
rte_pipeline_table_action_handler_miss, instead of what it
should have been, an int.
Changed this to declare the function as returning an int, and
now when the action_handler_miss is set to table_action_stub_miss
(cast as rte_pipeline_table_action_handler_miss), gcc 8.1 no
longer complains about the cast.

Fixes: 5205954791cb ("app/test: packet framework unit tests")
Cc: stable@dpdk.org
Signed-off-by: David Hunt <david.hunt@intel.com>
Reviewed-by: Reshma Pattan <reshma.pattan@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
6 years agotest/distributor: fix return type of thread function
David Hunt [Thu, 10 May 2018 01:25:38 +0000 (02:25 +0100)]
test/distributor: fix return type of thread function

New warning with gcc 8.1:
When casting the function pointer passed to
rte_eal_remote_launch() as an lcore_function_t *,
it expects the cast function to return an int, but
instead it was returning void. Fixed to return
an int.

Fixes: c3eabff124e6 ("distributor: add unit tests")
Cc: stable@dpdk.org
Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
6 years agotest/reorder: fix freeing mbuf twice
Reshma Pattan [Fri, 4 May 2018 10:47:06 +0000 (11:47 +0100)]
test/reorder: fix freeing mbuf twice

mbufs are being freed twice in error, once in rte_mempool_put_bulk()
and then in rte_reorder_free(). Refactor the code so that we use
rte_reorder_free() to free mbufs in the reorder buffer, and use
rte_pktmbuf_free() to free any unused or drained mbufs.

Fixes: d0c9b58d71 ("app/test: new reorder unit test")
Cc: stable@dpdk.org
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Reviewed-by: David Hunt <david.hunt@intel.com>
6 years agohash: explicit casts for truncation in CRC32c
Andy Green [Sat, 12 May 2018 02:00:37 +0000 (10:00 +0800)]
hash: explicit casts for truncation in CRC32c

In function 'crc32c_sse42_u64_mimic':
rte_hash_crc.h:402:40:
warning: conversion from 'uint64_t' {aka 'long unsigned int'}
to 'uint32_t' {aka 'unsigned int'} may change value [-Wconversion]
  init_val = crc32c_sse42_u32(d.u32[0], init_val);

Fixes: 00bf774bab0b ("hash: add assembly implementation of CRC32 intrinsics")
Cc: stable@dpdk.org
Signed-off-by: Andy Green <andy@warmcat.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
6 years agohash: move stack declaration at top of CRC32c function
Andy Green [Sat, 12 May 2018 02:00:32 +0000 (10:00 +0800)]
hash: move stack declaration at top of CRC32c function

In function 'crc32c_2words':
rte_hash_crc.h:347:2:
warning: ISO C90 forbids mixed declarations and code
[-Wdeclaration-after-statement]
  uint32_t crc, term1, term2;

Fixes: d983cf41698f ("hash: add software CRC32 implementation")
Cc: stable@dpdk.org
Signed-off-by: Andy Green <andy@warmcat.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
6 years agoethdev: explicit cast of buffered Tx number
Andy Green [Sat, 12 May 2018 02:00:27 +0000 (10:00 +0800)]
ethdev: explicit cast of buffered Tx number

In function 'rte_eth_tx_buffer_flush':
rte_ethdev.h:4248:55:
warning: conversion from 'int' to 'uint16_t'
{aka 'short unsigned int'} may change value [-Wconversion]
   buffer->error_callback(&buffer->pkts[sent], to_send - sent,

Fixes: d6c99e62c852 ("ethdev: add buffered Tx")
Cc: stable@dpdk.org
Signed-off-by: Andy Green <andy@warmcat.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
6 years agonet: move stack variable at top of VLAN strip function
Andy Green [Sat, 12 May 2018 02:00:17 +0000 (10:00 +0800)]
net: move stack variable at top of VLAN strip function

In function 'rte_vlan_strip':
rte_ether.h:357:2:
warning: ISO C90 forbids mixed declarations and code
[-Wdeclaration-after-statement]
  struct vlan_hdr *vh = (struct vlan_hdr *)(eh + 1);

Fixes: c974021a5949 ("ether: add soft vlan encap/decap")
Cc: stable@dpdk.org
Signed-off-by: Andy Green <andy@warmcat.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
6 years agospinlock/x86: move stack declaration before code
Andy Green [Sat, 12 May 2018 01:59:17 +0000 (09:59 +0800)]
spinlock/x86: move stack declaration before code

In function 'rte_try_tm':
rte_spinlock.h:82:2:
warning: ISO C90 forbids mixed declarations and code
[-Wdeclaration-after-statement]
  int retries = RTE_RTM_MAX_RETRIES;

Fixes: ba7468997ea6 ("spinlock: add HTM lock elision for x86")
Cc: stable@dpdk.org
Signed-off-by: Andy Green <andy@warmcat.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
6 years agoeal: declare trace buffer at top of own block
Andy Green [Sat, 12 May 2018 01:59:32 +0000 (09:59 +0800)]
eal: declare trace buffer at top of own block

rte_dev.h:54:2:
warning: ISO C90 forbids mixed declarations and
code [-Wdeclaration-after-statement]
  char buffer[vsnprintf(NULL, 0, fmt, ap) + 1];

Fixes: b974e4a40cb5 ("ethdev: make error checking macros public")
Cc: stable@dpdk.org
Signed-off-by: Andy Green <andy@warmcat.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
6 years agoeal: explicit cast of core id when getting index
Andy Green [Sat, 12 May 2018 01:59:07 +0000 (09:59 +0800)]
eal: explicit cast of core id when getting index

rte_lcore.h: In function 'rte_lcore_index':
rte_lcore.h:122:14:
warning: conversion to 'int' from 'unsigned int' may change
the sign of the result [-Wsign-conversion]
   lcore_id = rte_lcore_id();

Fixes: 5583037a7950 ("eal: get relative core index")
Cc: stable@dpdk.org
Signed-off-by: Andy Green <andy@warmcat.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
6 years agoeal: explicit cast of builtin for bsf32
Andy Green [Sat, 12 May 2018 01:58:57 +0000 (09:58 +0800)]
eal: explicit cast of builtin for bsf32

rte_common.h:416:9:
warning: conversion to 'uint32_t' {aka 'unsigned int'} from
'int' may change the sign of the result [-Wsign-conversion]
  return __builtin_ctz(v);
         ^~~~~~~~~~~~~~~~

The builtin is defined to return int, but we want to
return it as uint32_t.  Its only defined valid return
values are positive integers or zero, which is OK for
uint32_t.  So just add an explicit cast.

Fixes: 03f6bced5bba ("eal: use intrinsic function")
Cc: stable@dpdk.org
Signed-off-by: Andy Green <andy@warmcat.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
6 years agobus/fpga: use strlcpy instead of strncpy
Pablo de Lara [Sat, 12 May 2018 07:02:17 +0000 (08:02 +0100)]
bus/fpga: use strlcpy instead of strncpy

Gcc 8 reports a build error:

drivers/bus/ifpga/ifpga_bus.c:161:2: error: ‘strncpy’ specified
bound 256 equals destination size [-Werror=stringop-truncation]
  strncpy(afu_pr_conf.bs_path, path, sizeof(afu_pr_conf.bs_path));
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Fixes: 05fa3d4a6539 ("bus/ifpga: add Intel FPGA bus library")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
6 years agocrypto/ccp: add meson build
Ravi Kumar [Thu, 3 May 2018 07:19:23 +0000 (03:19 -0400)]
crypto/ccp: add meson build

Signed-off-by: Ravi Kumar <Ravi1.kumar@amd.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
6 years agobuild: ensure compatibility with future meson versions
Bruce Richardson [Fri, 27 Apr 2018 13:49:28 +0000 (14:49 +0100)]
build: ensure compatibility with future meson versions

Meson 0.46 fixed a bug where "extract_all_objects" would not recursively
extract objects not compiled from source for a target. To keep backward
compatibility, a "recursive" keyword-arg was added to make this optional.
The value is "false" by default for now, but will change to "true" in
future, so we hard-code it to "false" in our code to ensure future
compatibility.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
6 years agobuild: fix check for libbsd in meson
Bruce Richardson [Fri, 27 Apr 2018 13:49:27 +0000 (14:49 +0100)]
build: fix check for libbsd in meson

When we check for libbsd we were just checking for the library itself.
However, on some distros, e.g. CentOS, libbsd will be found even though
it's not usable by DPDK as it's missing the string header. Therefore we
should check for both the library and the header file.

Fixes: 5364de644a4b ("eal: support strlcpy function")

Signed-off-by: Bruce Richarson <bruce.richardson@intel.com>
Reported-by: Vladimir Medvedkin <medvedkinv@gmail.com>
Acked-by: Vladimir Medvedkin <medvedkinv@gmail.com>
Acked-by: Luca Boccassi <bluca@debian.org>
6 years agokernel: fix cross-build of Linux modules with meson
Bruce Richardson [Fri, 27 Apr 2018 13:49:26 +0000 (14:49 +0100)]
kernel: fix cross-build of Linux modules with meson

When cross-compiling, if no kernel_dir was specified, then the kernel
modules were still being compiled for the build machine. Fix this by
only building modules on cross-compile when we have a kernel_dir value
set. Print out a message indicating why we are skipping kernel
compilation, and in case that the headers for kernel compile are not
found, print a warning instead of erroring out.

Fixes: a52f4574f798 ("igb_uio: build with meson")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
6 years agonet/i40e: fix missing defines for non-AVX build
Bruce Richardson [Tue, 8 May 2018 20:10:17 +0000 (21:10 +0100)]
net/i40e: fix missing defines for non-AVX build

For non-AVX builds, the cflags used for compiling the i40e driver files
are not passed to the call to build the AVX-specific code path. This can
cause build failures.

../drivers/net/i40e/i40e_ethdev.h:888:42: error: ‘I40E_PFQF_HKEY_MAX_INDEX’ undeclared here (not in a function)

Fixes: e940646b20fa ("drivers/net: build Intel NIC PMDs with meson")

Reported-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Shreyansh Jain <shreyansh.jain@nxp.com>
6 years agodoc: add BPF library guide
Konstantin Ananyev [Thu, 10 May 2018 10:23:11 +0000 (11:23 +0100)]
doc: add BPF library guide

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agotest/bpf: introduce functional test
Konstantin Ananyev [Thu, 10 May 2018 10:23:10 +0000 (11:23 +0100)]
test/bpf: introduce functional test

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agotest/bpf: add samples
Konstantin Ananyev [Thu, 10 May 2018 10:23:09 +0000 (11:23 +0100)]
test/bpf: add samples

Add few simple eBPF programs as an example.

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agoapp/testpmd: add commands to load/unload BPF filters
Konstantin Ananyev [Thu, 10 May 2018 10:23:08 +0000 (11:23 +0100)]
app/testpmd: add commands to load/unload BPF filters

Introduce new testpmd commands to load/unload RX/TX BPF-based filters.

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agobpf: introduce basic Rx/Tx filters
Konstantin Ananyev [Thu, 10 May 2018 10:23:07 +0000 (11:23 +0100)]
bpf: introduce basic Rx/Tx filters

Introduce API to install BPF based filters on ethdev RX/TX path.
Current implementation is pure SW one, based on ethdev RX/TX
callback mechanism.

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agobpf: add JIT compilation for x86_64 ISA
Konstantin Ananyev [Thu, 10 May 2018 10:23:06 +0000 (11:23 +0100)]
bpf: add JIT compilation for x86_64 ISA

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agobpf: add more checks
Konstantin Ananyev [Thu, 10 May 2018 10:23:05 +0000 (11:23 +0100)]
bpf: add more checks

Add checks for:
 - all instructions are valid ones
   (known opcodes, correct syntax, valid reg/off/imm values, etc.)
 - no unreachable instructions
 - no loops
 - basic stack boundaries checks
 - division by zero

Still need to add checks for:
 - use/return only initialized registers and stack data.
 - memory boundaries violation

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agobpf: add ability to load eBPF program from ELF object file
Konstantin Ananyev [Thu, 10 May 2018 10:23:04 +0000 (11:23 +0100)]
bpf: add ability to load eBPF program from ELF object file

Introduce rte_bpf_elf_load() function to provide ability to
load eBPF program from ELF object file.
It also adds dependency on libelf.

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agobpf: add BPF loading and execution framework
Konstantin Ananyev [Thu, 10 May 2018 10:23:03 +0000 (11:23 +0100)]
bpf: add BPF loading and execution framework

librte_bpf provides a framework to load and execute eBPF bytecode
inside user-space dpdk based applications.
It supports basic set of features from eBPF spec
(https://www.kernel.org/doc/Documentation/networking/filter.txt).

Not currently supported features:
 - JIT
 - cBPF
 - tail-pointer call
 - eBPF MAP
 - skb
 - function calls for 32-bit apps
 - mbuf pointer as input parameter for 32-bit apps

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agoraw/ifpga: add Intel FPGA bus rawdev driver
Rosen Xu [Fri, 11 May 2018 08:31:31 +0000 (16:31 +0800)]
raw/ifpga: add Intel FPGA bus rawdev driver

Add Intel FPGA BUS Rawdev Driver which is based on
librte_rawdev library.

Signed-off-by: Rosen Xu <rosen.xu@intel.com>
Signed-off-by: Yanglong Wu <yanglong.wu@intel.com>
Signed-off-by: Tianfei Zhang <tianfei.zhang@intel.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Reviewed-by: Qi Zhang <qi.z.zhang@intel.com>
6 years agoraw/ifpga/base: add Intel FPGA OPAE share code
Tianfei Zhang [Fri, 11 May 2018 08:31:30 +0000 (16:31 +0800)]
raw/ifpga/base: add Intel FPGA OPAE share code

This patch adds Intel FPGA Open Programmable Acceleration
Engine (OPAE)[1] base driver code, in order to support Intel
FPGA devices under DPDK. The base code currently supports
Intel FPGA solutions including integrated solution (Intel(R)
Xeon(R) CPU with FPGAs) and discrete solution (Intel(R)
Programmable Acceleration Card with Intel(R) Arria(R) 10 FPGA)
and it could be extended to support more FPGA devices in the
future. Please refer to [1][2] for more introduction on OPAE
and Intel FPGAs.

[1] https://01.org/OPAE
[2] https://www.altera.com/solutions/acceleration-hub/overview.html

Signed-off-by: Tianfei Zhang <tianfei.zhang@intel.com>
Signed-off-by: Hao Wu <hao.wu@intel.com>
Signed-off-by: Yilun Xu <yilun.xu@intel.com>
Reviewed-by: Qi Zhang <qi.z.zhang@intel.com>
6 years agobus/ifpga: add Intel FPGA bus library
Rosen Xu [Fri, 11 May 2018 08:31:29 +0000 (16:31 +0800)]
bus/ifpga: add Intel FPGA bus library

Defined FPGA-BUS for Acceleration Drivers of AFUs

1. FPGA PCI Scan (1st Scan) follows DPDK UIO/VFIO PCI Scan Process,
probe Intel FPGA Rawdev Driver, it will be covered in following patches.

2. AFU Scan(2nd Scan) bind DPDK driver to FPGA Partial-Bitstream.
This scan is trigged by hotplug of IFPGA Rawdev probe, in this scan
the AFUs will be created and their drivers are also probed.

This patch will introduce rte_afu_device which describe the AFU device
listed in the FPGA-BUS.

Signed-off-by: Rosen Xu <rosen.xu@intel.com>
Signed-off-by: Tianfei Zhang <tianfei.zhang@intel.com>
Reviewed-by: Qi Zhang <qi.z.zhang@intel.com>
6 years agocrypto/ccp: support run-time CPU based auth
Ravi Kumar [Thu, 10 May 2018 09:20:10 +0000 (05:20 -0400)]
crypto/ccp: support run-time CPU based auth

CCP PMD supports authentication offload to either of CCP or CPU.
The earlier version of patch provides this option as compile time.
This patch changes this option from compile time to run time.
User can pass "ccp_auth_opt=1" as an additional arguments to vdev
parameter to enable authentication operations on CPU.

Signed-off-by: Ravi Kumar <ravi1.kumar@amd.com>
6 years agobbdev: change names of baseband devices
Kamil Chalupnik [Thu, 26 Apr 2018 14:31:14 +0000 (16:31 +0200)]
bbdev: change names of baseband devices

Change baseband device name:
 - from turbo_sw to baseband_turbo_sw
 - from bbdev_null to baseband_null
To keep backwards compatibility the old names are still valid

Signed-off-by: Kamil Chalupnik <kamilx.chalupnik@intel.com>
Acked-by: Amr Mokhtar <amr.mokhtar@intel.com>
6 years agodoc: add compression driver and ISA-L PMD guides
Lee Daly [Wed, 9 May 2018 16:14:35 +0000 (17:14 +0100)]
doc: add compression driver and ISA-L PMD guides

This adds general compression drivers feature guide
as well as the ISA-L PMD documentation and guide.

Signed-off-by: Lee Daly <lee.daly@intel.com>
Reviewed-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
6 years agocompress/isal: add ISA-L decomp functionality
Lee Daly [Wed, 9 May 2018 16:14:34 +0000 (17:14 +0100)]
compress/isal: add ISA-L decomp functionality

Adds decompression functionality, similar to compression,
this sets internal ISA-L structures, provides input & output mbuf
addresses, executes decompression, which ISA-L calls inflate and
finally error checks.

Signed-off-by: Lee Daly <lee.daly@intel.com>
Acked-by: Greg Tucker <greg.b.tucker@intel.com>
Reviewed-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
6 years agocompress/isal: add ISA-L compression functionality
Lee Daly [Wed, 9 May 2018 16:14:33 +0000 (17:14 +0100)]
compress/isal: add ISA-L compression functionality

Adds compression functionality, this sets internal ISA-L
structures, provides input & output mbuf addresses,
executes compression, which ISA-L calls deflate,
and finally error checks.

Signed-off-by: Lee Daly <lee.daly@intel.com>
Acked-by: Greg Tucker <greg.b.tucker@intel.com>
Reviewed-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
6 years agocompress/isal: add stats related ops
Lee Daly [Wed, 9 May 2018 16:14:32 +0000 (17:14 +0100)]
compress/isal: add stats related ops

Add functions for statistic retrieval and resetting.

Signed-off-by: Lee Daly <lee.daly@intel.com>
Reviewed-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
6 years agocompress/isal: support burst enqueue/dequeue
Lee Daly [Wed, 9 May 2018 16:14:31 +0000 (17:14 +0100)]
compress/isal: support burst enqueue/dequeue

This patchs adds support for the compressdev enqueue_burst
and dequeue_burst API operations.

Signed-off-by: Lee Daly <lee.daly@intel.com>
Reviewed-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
6 years agocompress/isal: add queue pair related ops
Lee Daly [Wed, 9 May 2018 16:14:30 +0000 (17:14 +0100)]
compress/isal: add queue pair related ops

This adds queue pair operations such as setup and release.

Signed-off-by: Lee Daly <lee.daly@intel.com>
Reviewed-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
6 years agocompress/isal: add private xform related ops
Lee Daly [Wed, 9 May 2018 16:14:29 +0000 (17:14 +0100)]
compress/isal: add private xform related ops

This patch  creates, configures and frees the private xform, taking the
applications xform and using it to populate the PMDs own private xform
with the information which will be required for the compress/decompress
functions. This information includes the level, algorithm,
type of huffman code, type of checksum etc.

Signed-off-by: Lee Daly <lee.daly@intel.com>
Reviewed-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
6 years agocompress/isal: add basic PMD ops
Lee Daly [Wed, 9 May 2018 16:14:28 +0000 (17:14 +0100)]
compress/isal: add basic PMD ops

Add basic device poll mode driver operations to
give ability to start, stop, close device etc.

Signed-off-by: Lee Daly <lee.daly@intel.com>
Reviewed-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
6 years agocompress/isal: add device init and de-init
Lee Daly [Wed, 9 May 2018 16:14:27 +0000 (17:14 +0100)]
compress/isal: add device init and de-init

This patch adds device initialization functionality such as
probe and create, also adding deinitialize functionality.
Dynamic logging component also added.

Signed-off-by: Lee Daly <lee.daly@intel.com>
Reviewed-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
6 years agocompress/isal: add skeleton ISA-L compression PMD
Lee Daly [Wed, 9 May 2018 16:14:26 +0000 (17:14 +0100)]
compress/isal: add skeleton ISA-L compression PMD

Adding basic skeleton of the ISA-L compression driver.
No compression functionality, but lays the foundation for
operations in the rest of the patchset.

The ISA-L compression driver utilizes Intel's ISA-L compression
library and compressdev API.

Signed-off-by: Lee Daly <lee.daly@intel.com>
Reviewed-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
6 years agodoc: update bbdev test app guide
Kamil Chalupnik [Wed, 9 May 2018 14:55:02 +0000 (16:55 +0200)]
doc: update bbdev test app guide

Update the test app documentation:
- description of tests added
- usage of test app updated

Signed-off-by: Kamil Chalupnik <kamilx.chalupnik@intel.com>
Acked-by: Amr Mokhtar <amr.mokhtar@intel.com>
6 years agodoc: add shared lib building instructions for bbdev
Kamil Chalupnik [Wed, 9 May 2018 14:51:04 +0000 (16:51 +0200)]
doc: add shared lib building instructions for bbdev

Added a note to enable building as a shared lib.

Signed-off-by: Kamil Chalupnik <kamilx.chalupnik@intel.com>
Acked-by: Amr Mokhtar <amr.mokhtar@intel.com>
6 years agodoc: update bbdev guide
Kamil Chalupnik [Wed, 9 May 2018 14:46:39 +0000 (16:46 +0200)]
doc: update bbdev guide

Update the documentation describing Wireless Baseband Device:
- device capabilities updated
- input/output data buffers description added
- details about implementation of turbo encode/decode
  operation added

Signed-off-by: Kamil Chalupnik <kamilx.chalupnik@intel.com>
Acked-by: Amr Mokhtar <amr.mokhtar@intel.com>
6 years agoapp/bbdev: improve readability
Kamil Chalupnik [Wed, 9 May 2018 14:42:10 +0000 (16:42 +0200)]
app/bbdev: improve readability

Improve readability of test application by replacing
int values with rte_bbdev_event_type enum.

Signed-off-by: Kamil Chalupnik <kamilx.chalupnik@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
6 years agoapp/bbdev: add new test vectors
Kamil Chalupnik [Wed, 9 May 2018 14:39:13 +0000 (16:39 +0200)]
app/bbdev: add new test vectors

Creation of new vectors to test and validate BBDevice capabilities
Test app documentation updated accordingly

Signed-off-by: Kamil Chalupnik <kamilx.chalupnik@intel.com>
Acked-by: Amr Mokhtar <amr.mokhtar@intel.com>
6 years agoapp/bbdev: update default test vectors
Kamil Chalupnik [Wed, 9 May 2018 14:37:01 +0000 (16:37 +0200)]
app/bbdev: update default test vectors

Update test vectors directory for Wireless Baseband Device:
- update test vectors names
- python script used for tests execution updated

Update the test app documentation:
- vector test names updated

Signed-off-by: Kamil Chalupnik <kamilx.chalupnik@intel.com>
Acked-by: Amr Mokhtar <amr.mokhtar@intel.com>
6 years agobbdev: split queue groups
Kamil Chalupnik [Wed, 9 May 2018 14:35:03 +0000 (16:35 +0200)]
bbdev: split queue groups

Splitting Queue Groups into UL/DL Groups in Turbo Software
Driver. They are independent for Decode/Encode.
Release note updated accordingly.

Signed-off-by: Kamil Chalupnik <kamilx.chalupnik@intel.com>
Acked-by: Amr Mokhtar <amr.mokhtar@intel.com>
6 years agobbdev: measure offload cost
Kamil Chalupnik [Wed, 9 May 2018 14:30:02 +0000 (16:30 +0200)]
bbdev: measure offload cost

New test created to measure offload cost.
Changes were introduced in API, turbo software driver
and test application

Signed-off-by: Kamil Chalupnik <kamilx.chalupnik@intel.com>
Acked-by: Amr Mokhtar <amr.mokhtar@intel.com>
6 years agobaseband/turbo_sw: support optional CRC overlap
Kamil Chalupnik [Wed, 9 May 2018 14:28:03 +0000 (16:28 +0200)]
baseband/turbo_sw: support optional CRC overlap

Support for optional CRC overlap in decode processing implemented
in Turbo Software driver

Signed-off-by: Kamil Chalupnik <kamilx.chalupnik@intel.com>
Acked-by: Amr Mokhtar <amr.mokhtar@intel.com>
6 years agobaseband/turbo_sw: increase internal buffers
Kamil Chalupnik [Wed, 9 May 2018 14:25:55 +0000 (16:25 +0200)]
baseband/turbo_sw: increase internal buffers

Sizes of the internal buffers used by decoding were increased due to
problem with memory for large vectors

Signed-off-by: Kamil Chalupnik <kamilx.chalupnik@intel.com>
Acked-by: Amr Mokhtar <amr.mokhtar@intel.com>
6 years agobaseband/turbo_sw: scale likelihood ratio input
Kamil Chalupnik [Wed, 9 May 2018 14:23:16 +0000 (16:23 +0200)]
baseband/turbo_sw: scale likelihood ratio input

Update Turbo Software driver for Wireless Baseband Device:
- function scaling input LLR values to specific range [-16, 16] added
- new test vectors to check device capabilities added
- release note updated accordingly

Signed-off-by: Kamil Chalupnik <kamilx.chalupnik@intel.com>
Acked-by: Amr Mokhtar <amr.mokhtar@intel.com>
6 years agobaseband/turbo_sw: move macros to bbdev library
Kamil Chalupnik [Wed, 9 May 2018 14:20:22 +0000 (16:20 +0200)]
baseband/turbo_sw: move macros to bbdev library

Signed-off-by: Kamil Chalupnik <kamilx.chalupnik@intel.com>
Acked-by: Amr Mokhtar <amr.mokhtar@intel.com>
6 years agobaseband/turbo_sw: optimize memory copy
Kamil Chalupnik [Wed, 9 May 2018 14:17:56 +0000 (16:17 +0200)]
baseband/turbo_sw: optimize memory copy

Optimization of Turbo Software driver by limiting or changing
usage of memory copying function.

Signed-off-by: Kamil Chalupnik <kamilx.chalupnik@intel.com>
Acked-by: Amr Mokhtar <amr.mokhtar@intel.com>
6 years agobaseband/turbo_sw: support FlexRAN 1.4.0
Kamil Chalupnik [Wed, 9 May 2018 14:14:29 +0000 (16:14 +0200)]
baseband/turbo_sw: support FlexRAN 1.4.0

Adjusting BaseBand drivers code to changes in FlexRAN 1.4.0:
- update usage of crc functions after API changes

Update the documentation describing Wireless Baseband Device:
- FlexRAN releases mapping table added
- download and build instructions for BBDEV turbo_sw driver in
  compliance with FlexRAN 1.4.0 release added

Signed-off-by: Kamil Chalupnik <kamilx.chalupnik@intel.com>
Acked-by: Amr Mokhtar <amr.mokhtar@intel.com>
6 years agoexamples/ipsec-secgw: limit inflight packets count
Radu Nicolau [Wed, 9 May 2018 08:58:41 +0000 (09:58 +0100)]
examples/ipsec-secgw: limit inflight packets count

Revert previous patch that introduce a performance
degradation in certain scenarios and add a configurable
limit for number inflight packets.

Revert
commit 84d4b5e4ec48 ("examples/ipsec-secgw: improve IPsec dequeue logic")
Cc: stable@dpdk.org
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>