dpdk.git
3 years agonet/ena/base: check for RSS key configuration support
Michal Krawczyk [Thu, 17 Sep 2020 05:30:26 +0000 (07:30 +0200)]
net/ena/base: check for RSS key configuration support

Setting RSS hash function could not be supported by the device. In that
situation there is no need to fill in default hash key or even allocate
hash key.

Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Guy Tzalik <gtzalik@amazon.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agonet/ena/base: do not use hardcoded RSS key buffer size
Michal Krawczyk [Thu, 17 Sep 2020 05:30:25 +0000 (07:30 +0200)]
net/ena/base: do not use hardcoded RSS key buffer size

It's well defined how the RSS key buffer looks from the device
perspective, so the constant value should be used instead of magic
number. Also it doesn't has to be calculated dynamically.

Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Guy Tzalik <gtzalik@amazon.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agonet/ena/base: split RSS function and hash getters
Michal Krawczyk [Thu, 17 Sep 2020 05:30:24 +0000 (07:30 +0200)]
net/ena/base: split RSS function and hash getters

There is no need to keep single function for both hash function and
the key. If the caller want's to get only single value, then it had to
pass NULL as one of the values, making the API harder to use.

Except reading functions from the device, one can also use function
ena_com_get_current_hash_function() to get the integer value, which
is representing current hash function stored in the ena_com layer.

Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Guy Tzalik <gtzalik@amazon.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agonet/ena/base: add ENI stats
Michal Krawczyk [Thu, 17 Sep 2020 05:30:23 +0000 (07:30 +0200)]
net/ena/base: add ENI stats

The Elastic Netfwork Interface (ENI) stats can be acquired from the HW.

They can provide advanced values which can be further used by the
application for better flow management.

It isn't available to the DPDK application, yet. The PMD must expose
them directly.

Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Guy Tzalik <gtzalik@amazon.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agonet/ena/base: rework setup of accelerated LLQ mode
Michal Krawczyk [Thu, 17 Sep 2020 05:30:22 +0000 (07:30 +0200)]
net/ena/base: rework setup of accelerated LLQ mode

The purpose of this change is general code simplification and
type safety improvement for the logical values.

Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Guy Tzalik <gtzalik@amazon.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agonet/ena/base: remove mmiowb not defined macro
Michal Krawczyk [Thu, 17 Sep 2020 05:30:21 +0000 (07:30 +0200)]
net/ena/base: remove mmiowb not defined macro

As there is no replacement for mmiowb() and there is no need to use both
versions in the DPDK, this ifdef was simply removed.

Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Guy Tzalik <gtzalik@amazon.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agonet/ena/base: fix release of wait event
Michal Krawczyk [Thu, 17 Sep 2020 05:30:20 +0000 (07:30 +0200)]
net/ena/base: fix release of wait event

The wait event is being accessed without making sure it the completion
context exists. The check for that is just below, so it could be used
for releasing wait even safely.

Fixes: 3adcba9a8987 ("net/ena: update HAL to the newer version")
Cc: stable@dpdk.org
Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Guy Tzalik <gtzalik@amazon.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agonet/ena/base: make delay exponential in polling functions
Michal Krawczyk [Thu, 17 Sep 2020 05:30:19 +0000 (07:30 +0200)]
net/ena/base: make delay exponential in polling functions

Instead of the fixes, 5 ms delay in the polling functions, use
values into given range (by default from 100 us 5000 us) and increase
them exponentially each time, the operation isn't finished.

This change can improve responsiveness of the driver for the fast
operations.

Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Guy Tzalik <gtzalik@amazon.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agonet/ena/base: support admin status for resource busy
Michal Krawczyk [Thu, 17 Sep 2020 05:30:18 +0000 (07:30 +0200)]
net/ena/base: support admin status for resource busy

The admin command could return ENA_ADMIN_RESOURCE_BUSY status, which
is meaning that currently the given resource cannot be used.

However, the request can be repeated, so it's being converted to the
ENA_COM_TRY_AGAIN error code.

Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Guy Tzalik <gtzalik@amazon.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agonet/ena/base: specify delay operations
Michal Krawczyk [Thu, 17 Sep 2020 05:30:17 +0000 (07:30 +0200)]
net/ena/base: specify delay operations

ENA_MSLEEP() and ENA_UDELAY() were expecting different behavior - the
first one is expecting driver to sleep, while the other, to busy wait.

For both cases, the rte_delay_(u|m)s() function was used, which could
be either sleep or block, depending on the configuration.

To make the macros valid, the operations should be specified directly.
Because of that, the rte_delay_us_sleep() and rte_delay_us_block() are
now being used.

Fixes: 9ba7981ec992 ("ena: add communication layer for DPDK")
Cc: stable@dpdk.org
Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Guy Tzalik <gtzalik@amazon.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agonet/ena/base: use min/max macros with type conversion
Michal Krawczyk [Thu, 17 Sep 2020 05:30:16 +0000 (07:30 +0200)]
net/ena/base: use min/max macros with type conversion

Usage of RTE_MIN(MAX) in ENA_MIN32, ENA_MIN16, ENA_MIN8 (and same for
the MAX), was not enough, as the HAL code is assuming that those macros
will convert both arguments to the specified uintX_t type.

As RTE_MIN(MAX) is using 'typeof' operator, the behavior won't be the
same, especially if arguments has different types (and it could cause
compilation warnings).

To satisfy that, the ENA_MIN_T and ENA_MAX_T macros were added, which
are converting both arguments to the type which is being passed as an
argument.

Fixes: 9ba7981ec992 ("ena: add communication layer for DPDK")
Cc: stable@dpdk.org
Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Guy Tzalik <gtzalik@amazon.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
3 years agocommon/octeontx2: upgrade mbox definition to version 9
Harman Kalra [Wed, 16 Sep 2020 17:48:19 +0000 (23:18 +0530)]
common/octeontx2: upgrade mbox definition to version 9

Update mail box data structures to sync with af driver mbox
changes done to retrieve VF's base steering rule.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Harman Kalra <hkalra@marvell.com>
3 years agonet/qede: fix milliseconds sleep macro
Devendra Singh Rawat [Mon, 27 Jul 2020 14:16:44 +0000 (19:46 +0530)]
net/qede: fix milliseconds sleep macro

The macro defined for milliseconds sleep was not putting the thread
to sleep and was simply calling a delay routine. This fix redefines
the macro to call the correct rte sleep API.

Fixes: ec94dbc57362 ("qede: add base driver")
Cc: stable@dpdk.org
Signed-off-by: Devendra Singh Rawat <dsinghrawat@marvell.com>
Signed-off-by: Igor Russkikh <irusskikh@marvell.com>
Signed-off-by: Rasesh Mody <rmody@marvell.com>
3 years agonet/qede/base: add missing licence
Ferruh Yigit [Thu, 10 Sep 2020 12:09:05 +0000 (13:09 +0100)]
net/qede/base: add missing licence

Adding BSD-3 SPDX license tag.

Fixes: 519438f7c17f ("net/qede/base: re-arrange few structures for DDC")
Cc: stable@dpdk.org
Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Igor Russkikh <irusskikh@marvell.com>
3 years agonet/hinic/base: fix clock definition with glibc version
Xiaoyun Wang [Mon, 14 Sep 2020 14:31:46 +0000 (22:31 +0800)]
net/hinic/base: fix clock definition with glibc version

Sync the repair of patch("fix compile error for old glibc
caused by CLOCK_MONOTONIC_RAW") in the community.

Fixes: efeed0894e9c ("net/hinic/base: avoid system time jump")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
3 years agonet/hinic/base: get default cos from chip
Xiaoyun Wang [Mon, 14 Sep 2020 14:31:45 +0000 (22:31 +0800)]
net/hinic/base: get default cos from chip

Get default cos of pf driver from chip configuration file.

Fixes: 6691acef0d3d ("net/hinic: support VF")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
3 years agonet/hinic: fix Rx nombuf stats
Xiaoyun Wang [Mon, 14 Sep 2020 14:31:44 +0000 (22:31 +0800)]
net/hinic: fix Rx nombuf stats

rx_mbuf_alloc_failed value is not set to 0 when get stats from driver,
which may cause this counter added every time when call this ops.

Fixes: cb7b6606ebff ("net/hinic: add RSS stats and promiscuous ops")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
3 years agonet/hinic: fix TCAM filter set
Xiaoyun Wang [Mon, 14 Sep 2020 14:31:43 +0000 (22:31 +0800)]
net/hinic: fix TCAM filter set

hinic supports two methods: linear table and tcam table,
if tcam filter enables failed but linear table is ok,
which also needs to enable filter, so for this scene,
driver should not close fdir switch.

Fixes: f4ca3fd54c4d ("net/hinic: create and destroy flow director filter")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
3 years agonet/hinic: fix filters on memory allocation failure
Xiaoyun Wang [Mon, 14 Sep 2020 14:31:42 +0000 (22:31 +0800)]
net/hinic: fix filters on memory allocation failure

If rte_zmalloc failed, pmd driver should also delete the ntuple
filter or ethertype filter or normal and tcam filter that already
added before.

Fixes: d7964ce192e7 ("net/hinic: check memory allocations in flow creation")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
3 years agonet/sfc: move MCDI helpers to common driver
Andrew Rybchenko [Thu, 17 Sep 2020 06:34:43 +0000 (07:34 +0100)]
net/sfc: move MCDI helpers to common driver

These helper will be reused by other libefx consumers, e.g. vDPA
driver.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
3 years agonet/sfc: use MCDI control structure as libefx ops context
Andrew Rybchenko [Thu, 17 Sep 2020 06:34:42 +0000 (07:34 +0100)]
net/sfc: use MCDI control structure as libefx ops context

Now MCDI helpers interface is independent from network driver and
may be moved into common driver.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
3 years agonet/sfc: add MCDI callback to poll management event queue
Andrew Rybchenko [Thu, 17 Sep 2020 06:34:41 +0000 (07:34 +0100)]
net/sfc: add MCDI callback to poll management event queue

Management event queue polling is required in the case of
MCDI proxy authentication (client driver code).

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
3 years agonet/sfc: add MCDI callback to schedule restart
Andrew Rybchenko [Thu, 17 Sep 2020 06:34:40 +0000 (07:34 +0100)]
net/sfc: add MCDI callback to schedule restart

MC reboot handling is driver specific.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
3 years agonet/sfc: add MCDI callbacks to allocate/free DMA memory
Andrew Rybchenko [Thu, 17 Sep 2020 06:34:39 +0000 (07:34 +0100)]
net/sfc: add MCDI callbacks to allocate/free DMA memory

Net driver should use rte_eth_dma_zone_reserve(), but it is ethdev
specific API which is not available for vDPA.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
3 years agonet/sfc: avoid panic in the case of MCDI timeout
Andrew Rybchenko [Thu, 17 Sep 2020 06:34:38 +0000 (07:34 +0100)]
net/sfc: avoid panic in the case of MCDI timeout

Implement dummy MCDI timeout handling which simply rejects
further MCDI requests.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
3 years agonet/sfc: avoid usage of NIC pointer from adapter context
Andrew Rybchenko [Thu, 17 Sep 2020 06:34:37 +0000 (07:34 +0100)]
net/sfc: avoid usage of NIC pointer from adapter context

Prepare to avoid usage of the adapter context in common MCDI helpers.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
3 years agonet/sfc: use own logging helper macros
Andrew Rybchenko [Thu, 17 Sep 2020 06:34:36 +0000 (07:34 +0100)]
net/sfc: use own logging helper macros

Network driver logging macros depends on sfc_adapter which is
specific to the driver and cannot be used in common code.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
3 years agonet/sfc: start to make MCDI helpers interface shareable
Andrew Rybchenko [Thu, 17 Sep 2020 06:34:35 +0000 (07:34 +0100)]
net/sfc: start to make MCDI helpers interface shareable

sfc_adapter is network driver specific structure which finally
should not be used in shared MCDI helpers interface.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
3 years agonet/sfc: make MCDI logging helper macros local
Andrew Rybchenko [Thu, 17 Sep 2020 06:34:34 +0000 (07:34 +0100)]
net/sfc: make MCDI logging helper macros local

Prepare to move MCDI helpers to drivers/common.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
3 years agonet/sfc: move MCDI helper interface to dedicated namespace
Andrew Rybchenko [Thu, 17 Sep 2020 06:34:33 +0000 (07:34 +0100)]
net/sfc: move MCDI helper interface to dedicated namespace

MCDI helpers will be moved to common/sfc_efx and it is better
to do dummy renamings first before non-trivial changes.

Existing functionality should be split into common and network
driver specific parts. Prepare to do it.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
3 years agonet/sfc: add dedicated header file with MCDI interface
Andrew Rybchenko [Thu, 17 Sep 2020 06:34:32 +0000 (07:34 +0100)]
net/sfc: add dedicated header file with MCDI interface

MCDI helpers will be shared by net and vDPA drivers.
Prepare to move it to common/sfc_efx.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
3 years agonet/sfc: introduce common driver library
Andrew Rybchenko [Thu, 17 Sep 2020 06:34:31 +0000 (07:34 +0100)]
net/sfc: introduce common driver library

Move libefx (base driver) into common driver.

Prepare to add vDPA driver which will use the common driver as well.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
3 years agonet/sfc: include header with debug helpers directly
Andrew Rybchenko [Thu, 17 Sep 2020 06:34:30 +0000 (07:34 +0100)]
net/sfc: include header with debug helpers directly

Avoid build failures on further restructuring.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
3 years agonet/sfc/base: decorate libefx internal extern functions
Andrew Rybchenko [Thu, 17 Sep 2020 06:34:29 +0000 (07:34 +0100)]
net/sfc/base: decorate libefx internal extern functions

The decorator may be used in the future to instruct linker
to put it into dedicated sections or hide.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Reviewed-by: Mark Spender <mspender@xilinx.com>
Reviewed-by: Richard Houldsworth <rhouldsw@xilinx.com>
3 years agonet/sfc/base: decorate libefx API functions
Andrew Rybchenko [Thu, 17 Sep 2020 06:34:28 +0000 (07:34 +0100)]
net/sfc/base: decorate libefx API functions

The decorators will be used in the future to mark libefx API
functions as __rte_internal.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Reviewed-by: Richard Houldsworth <rhouldsw@xilinx.com>
3 years agonet/sfc/base: add missing extern storage-class specifiers
Andrew Rybchenko [Thu, 17 Sep 2020 06:34:27 +0000 (07:34 +0100)]
net/sfc/base: add missing extern storage-class specifiers

libefx coding standard requires it and the specifier is
used for almost all functions in the header file.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Reviewed-by: Richard Houldsworth <rhouldsw@xilinx.com>
3 years agodoc: add new SWX pipeline type to release notes
Cristian Dumitrescu [Thu, 1 Oct 2020 10:20:10 +0000 (11:20 +0100)]
doc: add new SWX pipeline type to release notes

Add the new SWX pipeline type to the release notes.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
3 years agoexamples/pipeline: add VXLAN encapsulation example
Cristian Dumitrescu [Thu, 1 Oct 2020 10:20:09 +0000 (11:20 +0100)]
examples/pipeline: add VXLAN encapsulation example

Add VXLAN encapsulation example to the SWX pipeline application. The
VXLAN tunnels can be generated with the vxlan_table.py script. Example
command line: ./build/pipeline -l0-1 -- -s ./examples/vxlan.cli

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
3 years agoexamples/pipeline: add l2fwd with MAC swap example
Cristian Dumitrescu [Thu, 1 Oct 2020 10:20:08 +0000 (11:20 +0100)]
examples/pipeline: add l2fwd with MAC swap example

Add L2 Forwarding example with MAC destination and source address swap
to the SWX pipeline application. Example command line:
./build/pipeline -l0-1 -- -s ./examples/l2fwd_macswp.cli

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
3 years agoexamples/pipeline: add l2fwd example
Cristian Dumitrescu [Thu, 1 Oct 2020 10:20:07 +0000 (11:20 +0100)]
examples/pipeline: add l2fwd example

Add L2 Forwarding example to the SWX pipeline application. Example
command line: ./build/pipeline -l0-1 -- -s ./examples/l2fwd.cli

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
3 years agoexamples/pipeline: add configuration commands
Cristian Dumitrescu [Thu, 1 Oct 2020 10:20:06 +0000 (11:20 +0100)]
examples/pipeline: add configuration commands

Add CLI commands for application configuration and query.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
3 years agoexamples/pipeline: add message passing mechanism
Cristian Dumitrescu [Thu, 1 Oct 2020 10:20:05 +0000 (11:20 +0100)]
examples/pipeline: add message passing mechanism

Add network-based connectivity mechanism for the application to allow
for the exchange of configuration messages through the network as
opposed to local CLI only.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
3 years agoexamples/pipeline: add new example application
Cristian Dumitrescu [Thu, 1 Oct 2020 10:20:04 +0000 (11:20 +0100)]
examples/pipeline: add new example application

Add new example application to showcase the API of the newly
introduced SWX pipeline type.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
3 years agotable: add exact match SWX table
Cristian Dumitrescu [Thu, 1 Oct 2020 10:20:03 +0000 (11:20 +0100)]
table: add exact match SWX table

Add the exact match table type for the SWX pipeline. Used under the
hood by the SWX pipeline table instruction.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
3 years agoport: add source and sink SWX ports
Cristian Dumitrescu [Thu, 1 Oct 2020 10:20:02 +0000 (11:20 +0100)]
port: add source and sink SWX ports

Add the PCAP file-based source (input) and sink (output) port types
for the SWX pipeline. The sink port is typically used to implement the
packet drop pipeline action. Used under the hood by the pipeline rx
and tx instructions.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
3 years agoport: add ethernet device SWX port
Cristian Dumitrescu [Thu, 1 Oct 2020 10:20:01 +0000 (11:20 +0100)]
port: add ethernet device SWX port

Add the Ethernet device input/output port type for the SWX pipeline.
Used under the hood by the pipeline rx and tx instructions.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
3 years agopipeline: add SWX pipeline specification file
Cristian Dumitrescu [Thu, 1 Oct 2020 10:20:00 +0000 (11:20 +0100)]
pipeline: add SWX pipeline specification file

Add support for building the SWX pipeline based on specification file
with syntax aligned to the P4 language. The specification file may be
generated by the P4C compiler in the future.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
3 years agopipeline: add SWX table update high level API
Cristian Dumitrescu [Thu, 1 Oct 2020 10:19:59 +0000 (11:19 +0100)]
pipeline: add SWX table update high level API

High-level transaction-oriented API for SWX pipeline table updates. It
supports multi-table atomic updates, i.e. multiple tables can be
updated in a single step with only the before and after table set
visible to the packets. Uses the lower-level table update mechanisms.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
3 years agopipeline: add SWX pipeline flush
Cristian Dumitrescu [Thu, 1 Oct 2020 10:19:58 +0000 (11:19 +0100)]
pipeline: add SWX pipeline flush

Flush the packets currently buffered by the SWX pipeline output ports.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
3 years agopipeline: add SWX pipeline query API
Cristian Dumitrescu [Thu, 1 Oct 2020 10:19:57 +0000 (11:19 +0100)]
pipeline: add SWX pipeline query API

Query API to be used by the control plane to detect the configuration
and state of the SWX pipeline and its internal objects.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
3 years agopipeline: add SWX instruction optimizer
Cristian Dumitrescu [Thu, 1 Oct 2020 10:19:56 +0000 (11:19 +0100)]
pipeline: add SWX instruction optimizer

Instruction optimizer. Detects frequent patterns and replaces them
with some more powerful vector-like pipeline instructions without any
user effort. Executes at instruction translation, not at run-time.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
3 years agopipeline: add SWX instruction verifier
Cristian Dumitrescu [Thu, 1 Oct 2020 10:19:55 +0000 (11:19 +0100)]
pipeline: add SWX instruction verifier

Instruction verifier. Executes at instruction translation time during
SWX pipeline build, i.e. at initialization instead of run-time.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
3 years agopipeline: add SWX instruction description
Cristian Dumitrescu [Thu, 1 Oct 2020 10:19:54 +0000 (11:19 +0100)]
pipeline: add SWX instruction description

Added SWX instruction set reference table.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
3 years agopipeline: introduce SWX jump and return instructions
Cristian Dumitrescu [Thu, 1 Oct 2020 10:19:53 +0000 (11:19 +0100)]
pipeline: introduce SWX jump and return instructions

The jump instructions are either unconditional (jmp) or conditional on
positive/negative tests such as header validity (jmpv/jmpnv), table
lookup hit/miss (jmph/jmpnh), executed action (jmpa/jmpna), equality
(jmpeq/jmpneq), comparison result (jmplt/jmpgt). The return
instruction resumes the pipeline execution after action subroutine.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
3 years agopipeline: introduce SWX extern instruction
Cristian Dumitrescu [Thu, 1 Oct 2020 10:19:52 +0000 (11:19 +0100)]
pipeline: introduce SWX extern instruction

The extern instruction calls one of the member functions of a given
extern object or it calls the given extern function. The function
arguments must be written in advance to the mailbox. The results
are available in the same place after execution.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
3 years agopipeline: introduce SWX table instruction
Cristian Dumitrescu [Thu, 1 Oct 2020 10:19:51 +0000 (11:19 +0100)]
pipeline: introduce SWX table instruction

The table instruction looks up the input key into the table and then
it triggers the execution of the action found in the table entry. On
lookup miss, the default table action is executed.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
3 years agopipeline: introduce SWX SHR instruction
Cristian Dumitrescu [Thu, 1 Oct 2020 10:19:50 +0000 (11:19 +0100)]
pipeline: introduce SWX SHR instruction

The shr (i.e. shift right) instruction source can be header field (H),
meta-data field (M), extern object (E) or function (F) mailbox field,
table entry action data field (T) or immediate value (I). The
destination is HMEF.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
3 years agopipeline: introduce SWX SHL instruction
Cristian Dumitrescu [Thu, 1 Oct 2020 10:19:49 +0000 (11:19 +0100)]
pipeline: introduce SWX SHL instruction

The shl (i.e. shift left) instruction source can be header field (H),
meta-data field (M), extern object (E) or function (F) mailbox field,
table entry action data field (T) or immediate value (I). The
destination is HMEF.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
3 years agopipeline: introduce SWX XOR instruction
Cristian Dumitrescu [Thu, 1 Oct 2020 10:19:48 +0000 (11:19 +0100)]
pipeline: introduce SWX XOR instruction

The xor (i.e. bitwise exclusive or) instruction source can be header
field (H), meta-data field (M), extern object (E) or function (F)
mailbox field, table entry action data field (T) or immediate value
(I). The destination is HMEF.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
3 years agopipeline: introduce SWX or instruction
Cristian Dumitrescu [Thu, 1 Oct 2020 10:19:47 +0000 (11:19 +0100)]
pipeline: introduce SWX or instruction

The or (i.e. bitwise or) instruction source can be header field (H),
meta-data field (M), extern object (E) or function (F) mailbox field,
table entry action data field (T) or immediate value (I). The
destination is HMEF.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
3 years agopipeline: introduce SWX and instruction
Cristian Dumitrescu [Thu, 1 Oct 2020 10:19:46 +0000 (11:19 +0100)]
pipeline: introduce SWX and instruction

The and (i.e. bitwise and) instruction source can be header field (H),
meta-data field (M), extern object (E) or function (F) mailbox field,
table entry action data field (T) or immediate value (I). The
destination is HMEF.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
3 years agopipeline: introduce SWX cksub instruction
Cristian Dumitrescu [Thu, 1 Oct 2020 10:19:45 +0000 (11:19 +0100)]
pipeline: introduce SWX cksub instruction

The cksub (i.e. checksum subtract) instruction is used to update the
1's complement sum commonly used by protocols such as IPv4, TCP or
UDP.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
3 years agopipeline: introduce SWX ckadd instruction
Cristian Dumitrescu [Thu, 1 Oct 2020 10:19:44 +0000 (11:19 +0100)]
pipeline: introduce SWX ckadd instruction

The ckadd (i.e. checksum add) instruction is used to either compute,
verify or update the 1's complement sum commonly used by protocols
such as IPv4, TCP or UDP.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
3 years agopipeline: introduce SWX subtract instruction
Cristian Dumitrescu [Thu, 1 Oct 2020 10:19:43 +0000 (11:19 +0100)]
pipeline: introduce SWX subtract instruction

The sub (i.e. subtract) instruction source can be header field (H),
meta-data field (M), extern object (E) or function (F) mailbox field,
table entry action data field (T) or immediate value (I). The
destination is HMEF.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
3 years agopipeline: introduce SWX add instruction
Cristian Dumitrescu [Thu, 1 Oct 2020 10:19:42 +0000 (11:19 +0100)]
pipeline: introduce SWX add instruction

The add instruction source can be header field (H), meta-data field
(M), extern object (E) or function (F) mailbox field, table entry
action data field (T) or immediate value (I). The destination is HMEF.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
3 years agopipeline: add SWX DMA instruction
Cristian Dumitrescu [Thu, 1 Oct 2020 10:19:41 +0000 (11:19 +0100)]
pipeline: add SWX DMA instruction

The DMA instruction handles the bulk read transfer of one header from
the table entry action data. Typically used to generate headers, i.e.
headers that are not extracted from the input packet.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
3 years agopipeline: add SWX move instruction
Cristian Dumitrescu [Thu, 1 Oct 2020 10:19:40 +0000 (11:19 +0100)]
pipeline: add SWX move instruction

The mov (i.e. move) instruction source can be header field (H),
meta-data field (M), extern object (E) or function (F) mailbox field,
table entry action data field (T) or immediate value (I). The
destination is HMEF.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
3 years agopipeline: add header validate and invalidate SWX instructions
Cristian Dumitrescu [Thu, 1 Oct 2020 10:19:39 +0000 (11:19 +0100)]
pipeline: add header validate and invalidate SWX instructions

Add instructions to flag a header as valid or invalid. This flag can
be tested by the jmpv (jump if header valid) and jmpnv (jump if header
not valid) instructions.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
3 years agopipeline: add SWX Tx and emit instructions
Cristian Dumitrescu [Thu, 1 Oct 2020 10:19:38 +0000 (11:19 +0100)]
pipeline: add SWX Tx and emit instructions

Add header emit and packet transmission instructions. Emit adds to the
output packet a header that is either generated (e.g. read from table
entry by action) or extracted from the input packet. Tx ends the
pipeline processing; discard is implemented by tx to special port.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
3 years agopipeline: add SWX Rx and extract instructions
Cristian Dumitrescu [Thu, 1 Oct 2020 10:19:37 +0000 (11:19 +0100)]
pipeline: add SWX Rx and extract instructions

Add packet reception and header extraction instructions. The Rx must
be the first pipeline instruction. Each extracted header is logically
removed from the packet, then it can be read/written by instructions,
emitted into the outgoing packet or discarded.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
3 years agopipeline: add SWX pipeline instructions
Cristian Dumitrescu [Thu, 1 Oct 2020 10:19:36 +0000 (11:19 +0100)]
pipeline: add SWX pipeline instructions

The SWX pipeline instructions represent the main program that defines
the life of the packet. As packets go through tables that trigger
action subroutines, the headers and meta-data get transformed along
the way.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
3 years agopipeline: add SWX pipeline tables
Cristian Dumitrescu [Thu, 1 Oct 2020 10:19:35 +0000 (11:19 +0100)]
pipeline: add SWX pipeline tables

Add tables to the SWX pipeline. The match fields are flexibly selected
from the headers and meta-data. The set of table actions is flexibly
selected for each table from the set of pipeline actions.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
3 years agopipeline: add SWX pipeline action
Cristian Dumitrescu [Thu, 1 Oct 2020 10:19:34 +0000 (11:19 +0100)]
pipeline: add SWX pipeline action

Add SWX actions that are dynamically-defined through instructions as
opposed to pre-defined. The actions are subroutines of the pipeline
program that triggered by table lookup. The input arguments are the
action data from the table entry (format defined by struct), the
headers and meta-data are in/out.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
3 years agopipeline: add SWX extern objects and funcs
Cristian Dumitrescu [Thu, 1 Oct 2020 10:19:33 +0000 (11:19 +0100)]
pipeline: add SWX extern objects and funcs

Add extern objects and functions to plug into the SWX pipeline any
functionality that cannot be efficiently implemented with existing
instructions, e.g. special checksum/ECC, crypto, meters, stats arrays,
heuristics, etc. In/out arguments are passed through mailbox with
format defined by struct.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
3 years agopipeline: add SWX headers and meta-data
Cristian Dumitrescu [Thu, 1 Oct 2020 10:19:32 +0000 (11:19 +0100)]
pipeline: add SWX headers and meta-data

Add support for dynamically-defined packet headers and meta-data to
the SWX pipeline. The header and meta-data format are defined by the
struct type they instantiate.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
3 years agopipeline: add SWX pipeline output port
Cristian Dumitrescu [Thu, 1 Oct 2020 10:19:31 +0000 (11:19 +0100)]
pipeline: add SWX pipeline output port

Add output ports to the newly introduced SWX pipeline type. Each port
instantiates a port type that defines the port operations, e.g. ethdev
port, PCAP port, etc. The TX interface is single packet, with packet
batching internally for performance.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
3 years agopipeline: add SWX pipeline input port
Cristian Dumitrescu [Thu, 1 Oct 2020 10:19:30 +0000 (11:19 +0100)]
pipeline: add SWX pipeline input port

Add input ports to the newly introduced SWX pipeline type. Each port
instantiates a port type that defines the port operations, e.g. ethdev
port, PCAP port, etc. The RX interface is single packet, with packet
batching internally for performance.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
3 years agopipeline: add new SWX pipeline type
Cristian Dumitrescu [Thu, 1 Oct 2020 10:19:29 +0000 (11:19 +0100)]
pipeline: add new SWX pipeline type

Add new improved Software Switch (SWX) pipeline type that supports
dynamically-defined packet headers, meta-data, actions and pipelines.
Actions and pipelines are defined through instructions.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
3 years agodoc: remove references to make from prog guide
Ciara Power [Mon, 21 Sep 2020 13:59:17 +0000 (14:59 +0100)]
doc: remove references to make from prog guide

Make is no longer supported for compiling DPDK, references are now
removed in the documentation.

Signed-off-by: Ciara Power <ciara.power@intel.com>
Reviewed-by: Kevin Laatz <kevin.laatz@intel.com>
3 years agodoc: remove references to make from howto guides
Ciara Power [Mon, 21 Sep 2020 13:59:16 +0000 (14:59 +0100)]
doc: remove references to make from howto guides

Make is no longer supported for compiling DPDK, references are now
removed in the documentation.

Signed-off-by: Ciara Power <ciara.power@intel.com>
Reviewed-by: Kevin Laatz <kevin.laatz@intel.com>
3 years agodoc: remove references to make from FreeBSD guide
Ciara Power [Mon, 21 Sep 2020 13:59:15 +0000 (14:59 +0100)]
doc: remove references to make from FreeBSD guide

Make is no longer supported for compiling DPDK, references are now
removed in the documentation.

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
3 years agodoc: remove references to make from Linux guide
Ciara Power [Mon, 21 Sep 2020 13:59:14 +0000 (14:59 +0100)]
doc: remove references to make from Linux guide

Make is no longer supported for compiling DPDK, references are now
removed in the documentation.

Signed-off-by: Ciara Power <ciara.power@intel.com>
Reviewed-by: Bruce Richardson <bruce.richardson@intel.com>
3 years agoapp: remove references to make-based config
Ciara Power [Mon, 21 Sep 2020 13:59:13 +0000 (14:59 +0100)]
app: remove references to make-based config

Make is no longer supported, RTE_SDK, RTE_TARGET and CONFIG options
are no longer in use.

Signed-off-by: Ciara Power <ciara.power@intel.com>
Reviewed-by: Kevin Laatz <kevin.laatz@intel.com>
Acked-by: Nicolas Chautru <nicolas.chautru@intel.com>
3 years agodevtools: remove legacy flags from includes check
Ciara Power [Mon, 21 Sep 2020 13:59:12 +0000 (14:59 +0100)]
devtools: remove legacy flags from includes check

Make is no longer supported, the test script for make builds is no
longer required. Uses of make in other tool scripts are replaced.

Signed-off-by: Ciara Power <ciara.power@intel.com>
3 years agodoc: fix references to removed guide
Thomas Monjalon [Wed, 30 Sep 2020 17:20:18 +0000 (19:20 +0200)]
doc: fix references to removed guide

The page "Development Kit Build System" was about make,
so it has been removed. A better help is in the Linux guide
(note: mlx4/mlx5 are supported on Linux only for now).

Fixes: 3cc6ecfdfe85 ("build: remove makefiles")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ciara Power <ciara.power@intel.com>
3 years agoci: add tests jobs in aarch64 vm
Juraj Linkeš [Fri, 28 Aug 2020 11:45:37 +0000 (13:45 +0200)]
ci: add tests jobs in aarch64 vm

Tests requiring hugepages do not work outside of VM environment because
of security limitations. Add aarch64 builds which run tests to run in
a VM to avoid these limitations. Leave non-hugepage environments since
the tests may produce different results in hugepage and non-hugepage
environments.

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Aaron Conole <aconole@redhat.com>
3 years agostack: fix uninitialized variable
Yunjian Wang [Fri, 25 Sep 2020 05:00:50 +0000 (13:00 +0800)]
stack: fix uninitialized variable

This patch fixes an issue that uninitialized 'success'
is used to be compared with '0'.

Coverity issue: 337676
Fixes: 3340202f5954 ("stack: add lock-free implementation")
Cc: stable@dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
3 years agostack: relax pop CAS ordering
Steven Lariau [Fri, 25 Sep 2020 17:43:39 +0000 (18:43 +0100)]
stack: relax pop CAS ordering

Replace the store-release by relaxed for the CAS success at the end of
pop. Release isn't needed, because there is not write to data that need
to be synchronized.
The only preceding write is when the length is decreased, but the length
CAS loop already ensures the right synchronization.
The situation to avoid is when a thread sees the old length but the new
list, that doesn't have enough items for pop to success.
But the CAS success on length before the pop loop ensures any core reads
and updates the latest length, preventing this situation.

The store-release is also used to make sure that the items are read
before the head is updated, in order to prevent a core in pop to read an
incorrect value because another core rewrites it with push.
But this isn't needed, because items are read only when removed from the
used list. Right after this, they are pushed to the free list, and the
store-release in push makes sure the items are read before they are
visible in the free list.

Signed-off-by: Steven Lariau <steven.lariau@arm.com>
Reviewed-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Gage Eads <gage.eads@intel.com>
3 years agostack: reload head when pop fails
Steven Lariau [Fri, 25 Sep 2020 17:43:38 +0000 (18:43 +0100)]
stack: reload head when pop fails

List head must be loaded right before continue (when failed to
find the new head).
Without this, one thread might keep trying and failing to pop items
without ever loading the new correct head.

Fixes: 7e6e609939a8 ("stack: add C11 atomic implementation")
Cc: gage.eads@intel.com
Cc: stable@dpdk.org
Signed-off-by: Steven Lariau <steven.lariau@arm.com>
Reviewed-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Gage Eads <gage.eads@intel.com>
3 years agostack: remove redundant orderings on pop
Steven Lariau [Fri, 25 Sep 2020 17:43:37 +0000 (18:43 +0100)]
stack: remove redundant orderings on pop

The load-acquire of list->len on pop function is redundant.
Only the CAS success needs to be load-acquire.
It synchronizes with the store release in push, to ensure that the
updated head is visible when the new length is visible.
Without this, one thread in pop could see the increased length but the
old list, which doesn't have enough items yet for pop to succeed.

Signed-off-by: Steven Lariau <steven.lariau@arm.com>
Reviewed-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Gage Eads <gage.eads@intel.com>
3 years agostack: remove acquire fence on push
Steven Lariau [Fri, 25 Sep 2020 17:43:36 +0000 (18:43 +0100)]
stack: remove acquire fence on push

An acquire fence is used to make sure loads after the fence can observe
all store operations before a specific store-release.
But push doesn't read any data, except for the head which is part of a
CAS operation (the items on the list are not read).
So there is no need for the acquire barrier.

Signed-off-by: Steven Lariau <steven.lariau@arm.com>
Reviewed-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Gage Eads <gage.eads@intel.com>
3 years agostack: fix inconsistent weak/strong CAS
Steven Lariau [Fri, 25 Sep 2020 17:43:35 +0000 (18:43 +0100)]
stack: fix inconsistent weak/strong CAS

Fix cmpexchange usage of weak / strong.
The generated code is the same on x86 and ARM (there is no weak
cmpexchange), but the old usage was inconsistent.
For push and pop update size, weak is used because cmpexchange is inside
a loop.
For pop update root, strong is used even though cmpexchange is inside a
loop, because there may be a lot of operations to do in a loop iteration
(locate the new head).

Signed-off-by: Steven Lariau <steven.lariau@arm.com>
Reviewed-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Gage Eads <gage.eads@intel.com>
3 years agotest/stack: remove thread synchronisation
Steven Lariau [Wed, 12 Aug 2020 19:18:47 +0000 (20:18 +0100)]
test/stack: remove thread synchronisation

Remove the part that checks if there is enough room in the stack, it's
always true as long as size of stack >= MAX_BULK*rte_lcore_count().
This check used an atomic cmpset, and read / write to a shared size
variable. These operations result in some form of synchronization
that might get in the way of the actual stack testing.

Signed-off-by: Steven Lariau <steven.lariau@arm.com>
Reviewed-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Gage Eads <gage.eads@intel.com>
3 years agotest/stack: check errors for multi-threads
Steven Lariau [Wed, 12 Aug 2020 19:18:46 +0000 (20:18 +0100)]
test/stack: check errors for multi-threads

Use rte_eal_wait_lcore to wait and get the return value for all cores.
This is used to propagate any error to the main core.

Signed-off-by: Steven Lariau <steven.lariau@arm.com>
Reviewed-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Gage Eads <gage.eads@intel.com>
3 years agotest/stack: remove unneeded memory allocations
Steven Lariau [Wed, 12 Aug 2020 19:18:44 +0000 (20:18 +0100)]
test/stack: remove unneeded memory allocations

Replace the arguments array by one argument.
All objects in the args array have the same values, so there is no need
to use an array, only one struct is enough.
The args object is a lot smaller, and the allocation can be replaced
with a global variable.
As a consequence of using a single argument, there is no need to use a
loop to launch the test on every core one by one. Replace it with
rte_eal_mp_remote_launch.

The allocation of obj_table isn't needed either, because MAX_BULK is
small. The allocation can instead be replaced with a static array.

Signed-off-by: Steven Lariau <steven.lariau@arm.com>
Reviewed-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Gage Eads <gage.eads@intel.com>
3 years agoethdev: fix link speed helper documentation
David Marchand [Tue, 29 Sep 2020 12:12:22 +0000 (14:12 +0200)]
ethdev: fix link speed helper documentation

When generating the documentation, a new warning can be seen:

.../dpdk/lib/librte_ethdev/rte_ethdev.h:2441:
  warning: argument 'link_speed' of command @param is not found in the
  argument list of rte_eth_link_speed_to_str(uint32_t speed_link)
.../dpdk/lib/librte_ethdev/rte_ethdev.h:2455: warning: The following
  parameters of rte_eth_link_speed_to_str(uint32_t speed_link) are not
  documented: parameter 'speed_link'

Align the function prototype to its doxygen description.

Fixes: fbf931c9c392 ("ethdev: format link status text")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
3 years agodoc: make doxygen comply with meson werror option
Bruce Richardson [Tue, 29 Sep 2020 16:55:02 +0000 (17:55 +0100)]
doc: make doxygen comply with meson werror option

When the --werror meson build option is set, we can set the WARN_AS_ERRORS
doxygen option in the doxygen config flag to get the same behaviour for API
doc building as for building the rest of DPDK. This can help catch
documentation errors sooner in the development process.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
3 years agodoc: hide sphinx standard output
Bruce Richardson [Tue, 29 Sep 2020 16:55:00 +0000 (17:55 +0100)]
doc: hide sphinx standard output

To see only errors and warnings from the doc builds, we can send the
standard output text to a logfile and have only the stderr messages
printed. This is similar to what is done for the API documentation.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
3 years agodoc: put doxygen log file in build directory
Bruce Richardson [Tue, 29 Sep 2020 16:54:59 +0000 (17:54 +0100)]
doc: put doxygen log file in build directory

The meson documentation states that projects should not rely upon the
custom_target build commands are run from any given directory.  Therefore,
rather than writing the standout output from doxygen to the current
directory - which could be anywhere in future, put it into the api
directory, so that it is in a known location.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
3 years agodoc: align doxygen output folder with sphinx guides
Bruce Richardson [Tue, 29 Sep 2020 16:54:58 +0000 (17:54 +0100)]
doc: align doxygen output folder with sphinx guides

The API docs were output to "<build>/doc/api/api" folder, which was
ugly-looking with the repeated "api", and inconsistent with the sphinx
guides which were written to "<build>/doc/guides/html". Changing the
doxygen output folder to "html" fixes both these issues.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>