dpdk.git
4 years agoevent/dlb2: add probe-time hardware init
Timothy McDaniel [Sun, 1 Nov 2020 23:37:48 +0000 (17:37 -0600)]
event/dlb2: add probe-time hardware init

This commit adds probe-time low level hardware
initialization.  It also adds probe-time init for both
primary and secondary DPDK processes.

Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
Reviewed-by: Gage Eads <gage.eads@intel.com>
4 years agoevent/dlb2: add flexible interface
Timothy McDaniel [Sun, 1 Nov 2020 23:37:47 +0000 (17:37 -0600)]
event/dlb2: add flexible interface

This commit introduces the flexible interface. This
interface allows the core code to operate in PF mode (direct
hardware access) or bifurcated mode (hardware configured via
kernel driver). This driver currently only supports PF mode
but bifurcated mode will be added in a future DPDK patch-set.
Note that the flexible interface is not used for data path
operations, and thus there are no performance concerns
related to the use of function pointers.

Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
Reviewed-by: Gage Eads <gage.eads@intel.com>
4 years agoevent/dlb2: add eventdev probe
Timothy McDaniel [Sun, 1 Nov 2020 23:37:46 +0000 (17:37 -0600)]
event/dlb2: add eventdev probe

Add the eventdev portion of probe, and parse command line
options, but do not initialize hardware.

Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
Reviewed-by: Gage Eads <gage.eads@intel.com>
4 years agoevent/dlb2: add inline functions
Timothy McDaniel [Sun, 1 Nov 2020 23:37:45 +0000 (17:37 -0600)]
event/dlb2: add inline functions

Add miscellaneous inline functions that may be called
from multiple files.  These functions include inline
assembly of new x86 instructions, such as movdir64b,
since they are not available as builtin functions in
the minimum supported GCC version.

Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
Reviewed-by: Gage Eads <gage.eads@intel.com>
4 years agoevent/dlb2: add definitions shared with LKM or shared code
Timothy McDaniel [Sun, 1 Nov 2020 23:37:44 +0000 (17:37 -0600)]
event/dlb2: add definitions shared with LKM or shared code

Add headers containing structs and constants shared between
the PMD and the shared code.  The term shared code refers to
the code that implements the hardware interface. The shared code
is introduced in the probe patch, and then is extended as
additional eventdev PMD entry points are added to the patchset.
In the case of the bifurcated PMD (to be introduced in the
future), the shared code is contained in the Linux kernel
module itself.

Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
Reviewed-by: Gage Eads <gage.eads@intel.com>
4 years agoevent/dlb2: add private data structures and constants
Timothy McDaniel [Sun, 1 Nov 2020 23:37:43 +0000 (17:37 -0600)]
event/dlb2: add private data structures and constants

The header file dlb2_priv.h is used internally by the PMD.
It include constants, macros for device resources,
structure definitions for hardware interfaces and
software state, and various forward-declarations.
The header file rte_pmd_dlb2.h will be exported in a
subsequent patch, but is included here due to a data
structure dependency.

Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
Reviewed-by: Gage Eads <gage.eads@intel.com>
4 years agoevent/dlb2: add dynamic logging
Timothy McDaniel [Sun, 1 Nov 2020 23:37:42 +0000 (17:37 -0600)]
event/dlb2: add dynamic logging

This commit adds base support for dynamic logging.
The default log level is NOTICE. Dynamic logging
is used exclusively throughout this patchset.

Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
Reviewed-by: Gage Eads <gage.eads@intel.com>
4 years agoevent/dlb2: add documentation and build infrastructure
Timothy McDaniel [Sun, 1 Nov 2020 23:37:41 +0000 (17:37 -0600)]
event/dlb2: add documentation and build infrastructure

Adds the meson build infrastructure, which includes
compile-time constants in rte_config.h. DLB2 is
only supported on Linux 64 bit X86 platforms at this time.

Adds announcement of availability for the new driver
for Intel Dynamic Load Balancer 2.0 hardware.

Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
Reviewed-by: Gage Eads <gage.eads@intel.com>
4 years agoeventdev: increase max queues configuration
Timothy McDaniel [Mon, 26 Oct 2020 16:01:08 +0000 (11:01 -0500)]
eventdev: increase max queues configuration

DLB supports a total of 256 queues, 128 load balanced queues
and 128 directed queues. Increase RTE_EVENT_MAX_QUEUES_PER_DEV
to max possible uint_8_t max value.

Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
Reviewed-by: Gage Eads <gage.eads@intel.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
4 years agoeventdev: check input parameter for dump op
David Marchand [Sun, 1 Nov 2020 20:36:44 +0000 (21:36 +0100)]
eventdev: check input parameter for dump op

Rather than have drivers check for this, let's ensure the passed FILE *
is not NULL.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
4 years agoapp/regex: add job context
Guy Kaneti [Thu, 22 Oct 2020 07:11:11 +0000 (10:11 +0300)]
app/regex: add job context

Store mbuf pointer associated with that job.

Signed-off-by: Guy Kaneti <guyk@marvell.com>
Acked-by: Ori Kam <orika@nvidia.com>
4 years agoapp/regex: configure queue according to capabilities
Guy Kaneti [Tue, 20 Oct 2020 09:10:08 +0000 (12:10 +0300)]
app/regex: configure queue according to capabilities

configure qp with OOS according to device capabilities
returned from rte_regexdev_info_get.

Signed-off-by: Guy Kaneti <guyk@marvell.com>
Acked-by: Ori Kam <orika@nvidia.com>
4 years agoregex/mlx5: add out-of-order scan capability
Ophir Munk [Wed, 28 Oct 2020 13:18:58 +0000 (13:18 +0000)]
regex/mlx5: add out-of-order scan capability

Add missing out of order scan capability
RTE_REGEXDEV_CAPA_QUEUE_PAIR_OOS_F to mlx5 regex PMD.

Signed-off-by: Ophir Munk <ophirmu@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
4 years agoregexdev: add out-of-order scan capability
Guy Kaneti [Wed, 21 Oct 2020 08:03:32 +0000 (11:03 +0300)]
regexdev: add out-of-order scan capability

Add out of order scan capability to check PMD
support for OOS.

Signed-off-by: Guy Kaneti <guyk@marvell.com>
Acked-by: Ori Kam <orika@nvidia.com>
4 years agopipeline: increase SWX immediate operand size
Venkata Suresh Kumar P [Thu, 29 Oct 2020 18:08:10 +0000 (18:08 +0000)]
pipeline: increase SWX immediate operand size

This patch increases the immediate operand size from 32 to 64 bits.

Signed-off-by: Venkata Suresh Kumar P <venkata.suresh.kumar.p@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
4 years agoexamples/l3fwd-power: fix race on interrupt wakeup log
Anatoly Burakov [Fri, 2 Oct 2020 12:07:09 +0000 (13:07 +0100)]
examples/l3fwd-power: fix race on interrupt wakeup log

Currently, the interrupt status notification prevents log spam by
remembering whether previous interrupt wakeup was due to traffic or due
to timeout expiring. However, it is a single variable that can
potentially be accessed from multiple threads, so it is not thread-safe.

Fix it by having per-lcore interrupt status.

Fixes: f4d1e19c293d ("examples/l3fwd-power: add Rx interrupt timeout")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: David Hunt <david.hunt@intel.com>
Tested-by: Xi Zhang <xix.zhang@intel.com>
4 years agombuf: remove seqn field
David Marchand [Wed, 28 Oct 2020 12:20:13 +0000 (13:20 +0100)]
mbuf: remove seqn field

As announced in the deprecation note, the field seqn is removed to give
more space to the dynamic fields.

This is how the mbuf layout looks like (pahole-style):

word  type                              name                byte  size
 0    void *                            buf_addr;         /*   0 +  8 */
 1    rte_iova_t                        buf_iova          /*   8 +  8 */
      /* --- RTE_MARKER64               rearm_data;                   */
 2    uint16_t                          data_off;         /*  16 +  2 */
      uint16_t                          refcnt;           /*  18 +  2 */
      uint16_t                          nb_segs;          /*  20 +  2 */
      uint16_t                          port;             /*  22 +  2 */
 3    uint64_t                          ol_flags;         /*  24 +  8 */
      /* --- RTE_MARKER                 rx_descriptor_fields1;        */
 4    uint32_t             union        packet_type;      /*  32 +  4 */
      uint32_t                          pkt_len;          /*  36 +  4 */
 5    uint16_t                          data_len;         /*  40 +  2 */
      uint16_t                          vlan_tci;         /*  42 +  2 */
 5.5  uint64_t             union        hash;             /*  44 +  8 */
 6.5  uint16_t                          vlan_tci_outer;   /*  52 +  2 */
      uint16_t                          buf_len;          /*  54 +  2 */
 7    uint64_t                          timestamp;        /*  56 +  8 */
      /* --- RTE_MARKER                 cacheline1;                   */
 8    struct rte_mempool *              pool;             /*  64 +  8 */
 9    struct rte_mbuf *                 next;             /*  72 +  8 */
10    uint64_t             union        tx_offload;       /*  80 +  8 */
11    struct rte_mbuf_ext_shared_info * shinfo;           /*  88 +  8 */
12    uint16_t                          priv_size;        /*  96 +  2 */
      uint16_t                          timesync;         /*  98 +  2 */
12.5  uint32_t                          dynfield1[7];     /* 100 + 28 */
16    /* --- END                                             128      */

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
4 years agoapp/eventdev: switch sequence number to dynamic mbuf field
David Marchand [Wed, 28 Oct 2020 12:20:12 +0000 (13:20 +0100)]
app/eventdev: switch sequence number to dynamic mbuf field

The order test stored a sequence number in the deprecated mbuf field
seqn.
It is moved to a dynamic field in order to allow removal of seqn.

Signed-off-by: David Marchand <david.marchand@redhat.com>
4 years agoeventdev: switch sequence number to dynamic mbuf field
David Marchand [Wed, 28 Oct 2020 12:20:11 +0000 (13:20 +0100)]
eventdev: switch sequence number to dynamic mbuf field

The eventdev drivers have been hacking the deprecated field seqn for
internal test usage.
It is moved to a dynamic mbuf field in order to allow removal of seqn.

Signed-off-by: David Marchand <david.marchand@redhat.com>
4 years agobus/fslmc: switch sequence number to dynamic mbuf field
David Marchand [Wed, 28 Oct 2020 12:20:10 +0000 (13:20 +0100)]
bus/fslmc: switch sequence number to dynamic mbuf field

The dpaa2 drivers have been hacking the deprecated field seqn for
internal features.
It is moved to a dynamic mbuf field in order to allow removal of seqn.

Signed-off-by: David Marchand <david.marchand@redhat.com>
4 years agobus/dpaa: switch sequence number to dynamic mbuf field
David Marchand [Wed, 28 Oct 2020 12:20:09 +0000 (13:20 +0100)]
bus/dpaa: switch sequence number to dynamic mbuf field

The dpaa drivers have been hacking the deprecated field seqn for
internal features.
It is moved to a dynamic mbuf field in order to allow removal of seqn.

Signed-off-by: David Marchand <david.marchand@redhat.com>
4 years agoreorder: switch sequence number to dynamic mbuf field
David Marchand [Wed, 28 Oct 2020 12:20:08 +0000 (13:20 +0100)]
reorder: switch sequence number to dynamic mbuf field

The reorder library used sequence numbers stored in the deprecated field
seqn.
It is moved to a dynamic mbuf field in order to allow removal of seqn.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
4 years agonet/ark: remove use of seqn for debug
David Marchand [Wed, 28 Oct 2020 12:20:07 +0000 (13:20 +0100)]
net/ark: remove use of seqn for debug

The seqn mbuf field is deprecated.
It is currently hacked for debug purpose, it could be changed to a
dynamic field but I see little value in the debug info it offers.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ed Czeck <ed.czeck@atomicrules.com>
4 years agocrypto/scheduler: remove unused internal seqn
David Marchand [Wed, 28 Oct 2020 12:20:06 +0000 (13:20 +0100)]
crypto/scheduler: remove unused internal seqn

This field has been left behind after dropping its use.

Fixes: 8a48e039432b ("crypto/scheduler: optimize crypto op ordering")

Signed-off-by: David Marchand <david.marchand@redhat.com>
4 years agoevent/dpaa2: remove dead code from self test
David Marchand [Wed, 28 Oct 2020 12:20:05 +0000 (13:20 +0100)]
event/dpaa2: remove dead code from self test

This code has never been used since introduction.

Fixes: 653242c3375a ("event/dpaa2: add self test")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Nipun Gupta <nipun.gupta@nxp.com>
4 years agoexamples/fips_validation: fix leak on failure
Ciara Power [Fri, 30 Oct 2020 17:36:40 +0000 (17:36 +0000)]
examples/fips_validation: fix leak on failure

The wb_data variable went out of scope on failure in the
get_writeback_data function. This is now freed before returning -1.

Coverity issue: 363453
Fixes: 952e10cdad5e ("examples/fips_validation: support scatter gather list")

Signed-off-by: Ciara Power <ciara.power@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
4 years agoexamples/fips_validation: fix crash on allocation failure
Ciara Power [Fri, 30 Oct 2020 15:37:00 +0000 (15:37 +0000)]
examples/fips_validation: fix crash on allocation failure

The return value was not being checked when calling the
get_writeback_data function in the AES test case. On failure, this led
to a NULL dereference when using memcpy later. The return value is now
checked to avoid this NULL dereference.

Coverity issue: 363463
Fixes: 952e10cdad5e ("examples/fips_validation: support scatter gather list")

Signed-off-by: Ciara Power <ciara.power@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
4 years agombuf: remove userdata field
Thomas Monjalon [Sun, 25 Oct 2020 20:42:27 +0000 (21:42 +0100)]
mbuf: remove userdata field

As announced in the deprecation note, the field userdata / udata64
is removed to give more space to the dynamic fields.

This is how the mbuf layout looks like (pahole-style):

word  type                              name                byte  size
 0    void *                            buf_addr;         /*   0 +  8 */
 1    rte_iova_t                        buf_iova          /*   8 +  8 */
      /* --- RTE_MARKER64               rearm_data;                   */
 2    uint16_t                          data_off;         /*  16 +  2 */
      uint16_t                          refcnt;           /*  18 +  2 */
      uint16_t                          nb_segs;          /*  20 +  2 */
      uint16_t                          port;             /*  22 +  2 */
 3    uint64_t                          ol_flags;         /*  24 +  8 */
      /* --- RTE_MARKER                 rx_descriptor_fields1;        */
 4    uint32_t             union        packet_type;      /*  32 +  4 */
      uint32_t                          pkt_len;          /*  36 +  4 */
 5    uint16_t                          data_len;         /*  40 +  2 */
      uint16_t                          vlan_tci;         /*  42 +  2 */
 5.5  uint64_t             union        hash;             /*  44 +  8 */
 6.5  uint16_t                          vlan_tci_outer;   /*  52 +  2 */
      uint16_t                          buf_len;          /*  54 +  2 */
 7    uint64_t                          timestamp;        /*  56 +  8 */
      /* --- RTE_MARKER                 cacheline1;                   */
 8    struct rte_mempool *              pool;             /*  64 +  8 */
 9    struct rte_mbuf *                 next;             /*  72 +  8 */
10    uint64_t             union        tx_offload;       /*  80 +  8 */
11    uint16_t                          priv_size;        /*  88 +  2 */
      uint16_t                          timesync;         /*  90 +  2 */
      uint32_t                          seqn;             /*  92 +  4 */
12    struct rte_mbuf_ext_shared_info * shinfo;           /*  96 +  8 */
13    uint64_t                          dynfield1[3];     /* 104 + 24 */
16    /* --- END                                             128      */

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
4 years agoexamples/rxtx_callbacks: switch TSC to dynamic field
Thomas Monjalon [Mon, 26 Oct 2020 04:08:28 +0000 (05:08 +0100)]
examples/rxtx_callbacks: switch TSC to dynamic field

The example used the deprecated mbuf field udata64.
It is moved to a dynamic field in order to allow removal of udata64.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
4 years agoexamples/bbdev: switch to dynamic mbuf field
Thomas Monjalon [Mon, 26 Oct 2020 04:40:18 +0000 (05:40 +0100)]
examples/bbdev: switch to dynamic mbuf field

The example used the deprecated mbuf field udata64 as input mbuf pointer.
It is moved to a dynamic field in order to allow removal of udata64.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
4 years agoapp/eventdev: switch flow ID to dynamic mbuf field
Thomas Monjalon [Mon, 26 Oct 2020 01:56:05 +0000 (02:56 +0100)]
app/eventdev: switch flow ID to dynamic mbuf field

The order test stored the flow ID in the deprecated mbuf field udata64.
It is moved to a dynamic field in order to allow removal of udata64.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
4 years agotest/graph: switch user data to dynamic mbuf field
Thomas Monjalon [Mon, 26 Oct 2020 03:53:16 +0000 (04:53 +0100)]
test/graph: switch user data to dynamic mbuf field

The test used the deprecated mbuf field udata64.
It is moved to a dynamic field in order to allow removal of udata64.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
4 years agotest/distributor: switch sequence to dynamic mbuf field
Thomas Monjalon [Mon, 26 Oct 2020 02:15:33 +0000 (03:15 +0100)]
test/distributor: switch sequence to dynamic mbuf field

The test used the deprecated mbuf field udata64.
It is moved to a dynamic field in order to allow removal of udata64.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Tested-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
4 years agonet/vmxnet3: switch MSS hint to dynamic mbuf field
Thomas Monjalon [Mon, 26 Oct 2020 01:04:06 +0000 (02:04 +0100)]
net/vmxnet3: switch MSS hint to dynamic mbuf field

The segment count, used for MSS guess,
was stored in the deprecated mbuf field udata64.
It is moved to a dynamic field in order to allow removal of udata64.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
4 years agonet/bnxt: switch CFA code to dynamic mbuf field
Thomas Monjalon [Sun, 25 Oct 2020 22:41:16 +0000 (23:41 +0100)]
net/bnxt: switch CFA code to dynamic mbuf field

The CFA code from mark was stored in the deprecated mbuf field udata64.
It is moved to a dynamic field in order to allow removal of udata64.

Note: the new field has 32 bits, smaller than udata64.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
4 years agonet/ark: switch user data to dynamic mbuf fields
Ed Czeck [Tue, 27 Oct 2020 21:01:07 +0000 (22:01 +0100)]
net/ark: switch user data to dynamic mbuf fields

The second field of metadata is reserved for user data
which was using a deprecated mbuf field.
It is moved to dynamic fields in order to allow removal of udata64.

The use of meta data must be enabled with a compile-time flag
RTE_PMD_ARK_{TX,RX}_USERDATA_ENABLE.
User data on Tx and Rx paths can be defined and used separately.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>
4 years agoevent/sw: switch test counter to dynamic mbuf field
Thomas Monjalon [Mon, 26 Oct 2020 01:27:44 +0000 (02:27 +0100)]
event/sw: switch test counter to dynamic mbuf field

The test worker_loopback used the deprecated mbuf field udata64.
It is moved to a dynamic field in order to allow removal of udata64.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
4 years agosecurity: switch metadata to dynamic mbuf field
Thomas Monjalon [Mon, 26 Oct 2020 00:12:19 +0000 (01:12 +0100)]
security: switch metadata to dynamic mbuf field

The device-specific metadata was stored in the deprecated field udata64.
It is moved to a dynamic mbuf field in order to allow removal of udata64.

The name rte_security_dynfield is not very descriptive
but it should be replaced later by separate fields for each type of data
that drivers pass to the upper layer.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
4 years agonode: switch IPv4 metadata to dynamic mbuf field
Nithin Dabilpuram [Wed, 28 Oct 2020 09:30:03 +0000 (15:00 +0530)]
node: switch IPv4 metadata to dynamic mbuf field

The node_mbuf_priv1 was stored in the deprecated mbuf field udata64.
It is moved to a dynamic field in order to allow removal of udata64.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
4 years agombuf: fix typo in dynamic field convention note
Thomas Monjalon [Sun, 25 Oct 2020 20:39:26 +0000 (21:39 +0100)]
mbuf: fix typo in dynamic field convention note

Replace "in a in PMD" with "in a PMD".

Fixes: 4958ca3a443a ("mbuf: support dynamic fields and flags")
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
4 years agokni: move header file from EAL
Thomas Monjalon [Sun, 25 Oct 2020 18:48:20 +0000 (19:48 +0100)]
kni: move header file from EAL

Since the kernel module is not part of EAL anymore,
there is no need to have the common KNI header file in EAL.
The file rte_kni_common.h is moved to librte_kni.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
4 years agoexamples: enclose DPDK includes with angle brackets
Thomas Monjalon [Mon, 26 Oct 2020 04:18:57 +0000 (05:18 +0100)]
examples: enclose DPDK includes with angle brackets

In examples, DPDK header files are external,
so they must be enclosed with angle brackets, not quotes.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
4 years agotest/mbuf: skip field registration at busy offset
Thomas Monjalon [Sat, 31 Oct 2020 14:27:03 +0000 (15:27 +0100)]
test/mbuf: skip field registration at busy offset

There is a test for dynamic field registration at a specific offset.
Depending on which driver is probed, some dynamic fields may be
already registered at this offset.
This failure is skipped with a warning.

Fixes: 4958ca3a443a ("mbuf: support dynamic fields and flags")
Cc: stable@dpdk.org
Reported-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: David Marchand <david.marchand@redhat.com>
4 years agoraw/ioat: fix work-queue config size
Bruce Richardson [Wed, 28 Oct 2020 12:45:34 +0000 (12:45 +0000)]
raw/ioat: fix work-queue config size

According to latest DSA spec[1], the work-queue config register size
should be based off a value read from the WQ capabilities register.
Update driver to read this value and base the start of each WQ config
off that value.

[1] https://software.intel.com/content/www/us/en/develop/download/intel-data-streaming-accelerator-preliminary-architecture-specification.html

Fixes: ff06fa2cf3ba ("raw/ioat: probe idxd PCI")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Kevin Laatz <kevin.laatz@intel.com>
4 years agoexamples/performance-thread: fix build with low core count
Honnappa Nagarahalli [Fri, 16 Oct 2020 06:03:49 +0000 (01:03 -0500)]
examples/performance-thread: fix build with low core count

When the value of RTE_MAX_LCORE is small, it results in the
following compilation error.

../examples/performance-thread/l3fwd-thread/main.c:2338:34: error:
iteration 4 invokes undefined behavior
[-Werror=aggressive-loop-optimizations]

Fixes: d48415e1fee3 ("examples/performance-thread: add l3fwd-thread app")
Cc: stable@dpdk.org
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Tested-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Reviewed-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
4 years agotest/rcu: fix build with low core count
Honnappa Nagarahalli [Fri, 16 Oct 2020 06:03:48 +0000 (01:03 -0500)]
test/rcu: fix build with low core count

When RTE_MAX_LCORE value is small, following compiler errors
are observed.

../app/test/test_rcu_qsbr.c:296:54: error: iteration 2 invokes
undefined behavior [-Werror=aggressive-loop-optimizations]

../app/test/test_rcu_qsbr.c:315:55: error: array subscript is above
array bounds [-Werror=array-bounds]

Fixes: b87089b0bb19 ("test/rcu: add API and functional tests")
Cc: stable@dpdk.org
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Tested-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Reviewed-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
4 years agoexamples/multi_process: fix build on Ubuntu 20.04
Bruce Richardson [Wed, 28 Oct 2020 16:27:01 +0000 (16:27 +0000)]
examples/multi_process: fix build on Ubuntu 20.04

Two warnings are reported by gcc 9.3.0 on Ubuntu 20.04.

When producing a printable mac address the buffer was appropriately sized
for holding the mac address exactly, but the actual snprintf included a
'\n' character at the end, which means that the snprintf technically is
getting truncated i.e. the \n would not be added due to lack of space.
This gets flagged as a problem by modern versions of gcc, e.g. on Ubuntu
20.04.

main.c:77:37: warning: ‘__builtin___snprintf_chk’ output truncated
  before the last format character [-Wformat-truncation=]
   77 |     "%02x:%02x:%02x:%02x:%02x:%02x\n",
      |                                     ^

Since the \n is getting stripped anyway, we can fix the issue by just
removing it. In the process we can switch to using the standard ethernet
address formatting function from rte_ether.h.

The other warning is about possible string truncation when getting the
RX queue name:

In file included from init.c:36:
init.c: In function ‘init’:
../shared/common.h:38:28: warning: ‘%u’ directive output may be truncated
  writing between 1 and 10 bytes into a region of size 8
  [-Wformat-truncation=]
   38 | #define MP_CLIENT_RXQ_NAME "MProc_Client_%u_RX"
      |                            ^~~~~~~~~~~~~~~~~~~~
../shared/common.h:52:35: note: in expansion of macro ‘MP_CLIENT_RXQ_NAME’
   52 |  snprintf(buffer, sizeof(buffer), MP_CLIENT_RXQ_NAME, id);
      |                                   ^~~~~~~~~~~~~~~~~~

This is a false positive, as the value of the "id" is limited to 255,
being stored in the app as a uint8_t value, removing the possibility of
the %u being replaced by anything other then 3 characters max (rather than
up to 10 as thought by the compiler). Therefore, the warning can be easily
removed by changing the type of the "id" parameter to the local function
from "unsigned" to "uint8_t" also, ensuring the compiler is aware of the
range limit.

Fixes: af75078fece3 ("first public release")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
4 years agoexamples/vm_power: fix build on Ubuntu 20.04
Bruce Richardson [Wed, 28 Oct 2020 16:27:00 +0000 (16:27 +0000)]
examples/vm_power: fix build on Ubuntu 20.04

When compiling on Ubuntu 20.04, a warning was issued about possible
truncation of the path string for the power management socket.

channel_manager.c: In function ‘add_all_channels’:
channel_manager.c:470:41: warning: ‘%s’ directive output may be
  truncated writing up to 255 bytes into a region of size 90
  [-Wformat-truncation=]
  470 |     sizeof(chan_info->channel_path), "%s%s",
      |                                         ^~

This can be fixed by adding in an explicit truncation check to the code
and handling it appropriately.

Fixes: e8ae9b662506 ("examples/vm_power: channel manager and monitor in host")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: David Hunt <david.hunt@intel.com>
4 years agoexamples: fix linking against specific drivers
Bruce Richardson [Tue, 27 Oct 2020 17:19:53 +0000 (17:19 +0000)]
examples: fix linking against specific drivers

Some example apps rely on driver-specific functionality and link explicitly
against those drivers. These apps need their makefiles updated to take
account of the renaming of the driver libs.

Fixes: a20b2c01a7a1 ("build: standardize component names and defines")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
4 years agoexamples/vm_power: fix memory leak
Rory Sexton [Wed, 29 Jul 2020 08:37:54 +0000 (09:37 +0100)]
examples/vm_power: fix memory leak

Fix memory leak where variable oob_enable can go out of scope leaking
the storage it points to.

Coverity issue: 337674
Fixes: 95f648ff9ee ("examples/vm_power: make branch ratio threshold per core")

Signed-off-by: Rory Sexton <rory.sexton@intel.com>
Acked-by: David Hunt <david.hunt@intel.com>
4 years agotrace: make CTF metadata prettier
David Marchand [Wed, 28 Oct 2020 21:02:49 +0000 (22:02 +0100)]
trace: make CTF metadata prettier

This is simply a cosmetic change.

Before:
event {
    id = 17;
    name = "lib.eal.alarm.set";
    fields := struct {
        uint64_t us;uintptr_t cb_fn;uintptr_t cb_arg;int32_t rc;
    };
};

After:
event {
    id = 17;
    name = "lib.eal.alarm.set";
    fields := struct {
        uint64_t us;
        uintptr_t cb_fn;
        uintptr_t cb_arg;
        int32_t rc;
    };
};

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Sunil Kumar Kori <skori@mavell.com>
4 years agotrace: fix metadata dump
David Marchand [Wed, 28 Oct 2020 21:02:48 +0000 (22:02 +0100)]
trace: fix metadata dump

The ctf metadata is written to the metadata file without any check for
length, so this string must be null terminated.

Fixes: f1a099f5b1f1 ("trace: create CTF TDSL metadata in memory")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Sunil Kumar Kori <skori@mavell.com>
4 years agotrace: remove size limit on CTF event description
David Marchand [Wed, 28 Oct 2020 21:02:47 +0000 (22:02 +0100)]
trace: remove size limit on CTF event description

Rework registration so that it uses dynamic allocations and has no size
limit.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Sunil Kumar Kori <skori@mavell.com>
4 years agotrace: fixup CTF event description at registration
David Marchand [Wed, 28 Oct 2020 21:02:46 +0000 (22:02 +0100)]
trace: fixup CTF event description at registration

CTF event description is currently built by appending all fields in a
single string at trace point registration.
When dumping the metadata, this string is split again and inspected to
fixup reserved keywords and special tokens like "." or "->".

Move this fixup per field at trace point registration time so that there
is no need for inspecting / string parsing when dumping metadata.
Use dynamic allocations to remove an artificial size limit on the CTF
event description manipulations.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Sunil Kumar Kori <skori@mavell.com>
4 years agoeal: add intrinsics support check infrastructure
Liang Ma [Tue, 27 Oct 2020 14:59:03 +0000 (14:59 +0000)]
eal: add intrinsics support check infrastructure

Currently, it is not possible to check support for intrinsics that
are platform-specific, cannot be abstracted in a generic way, or do not
have support on all architectures. The CPUID flags can be used to some
extent, but they are only defined for their platform, while intrinsics
will be available to all code as they are in generic headers.

This patch introduces infrastructure to check support for certain
platform-specific intrinsics, and adds support for checking support for
IA power management-related intrinsics for UMWAIT/UMONITOR and TPAUSE.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Signed-off-by: Liang Ma <liang.j.ma@intel.com>
Acked-by: David Christensen <drc@linux.vnet.ibm.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
4 years agoeal: add power management intrinsics
Liang Ma [Tue, 27 Oct 2020 14:59:02 +0000 (14:59 +0000)]
eal: add power management intrinsics

Add two new power management intrinsics, and provide an implementation
in eal/x86 based on UMONITOR/UMWAIT instructions. The instructions
are implemented as raw byte opcodes because there is not yet widespread
compiler support for these instructions.

The power management instructions provide an architecture-specific
function to either wait until a specified TSC timestamp is reached, or
optionally wait until either a TSC timestamp is reached or a memory
location is written to. The monitor function also provides an optional
comparison, to avoid sleeping when the expected write has already
happened, and no more writes are expected.

For more details, please refer to Intel(R) 64 and IA-32 Architectures
Software Developer's Manual, Volume 2.

Signed-off-by: Liang Ma <liang.j.ma@intel.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: David Christensen <drc@linux.vnet.ibm.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Ruifeng Wang <ruifeng.wang@arm.com>
4 years agoeal/x86: add CPU flag for WAITPKG
Liang Ma [Tue, 27 Oct 2020 14:59:01 +0000 (14:59 +0000)]
eal/x86: add CPU flag for WAITPKG

Add a new CPUID flag indicating processor support for UMONITOR/UMWAIT
and TPAUSE instructions instruction.

Signed-off-by: Liang Ma <liang.j.ma@intel.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
4 years agoexamples/ip_pipeline: fix external build
Cristian Dumitrescu [Mon, 26 Oct 2020 21:57:55 +0000 (21:57 +0000)]
examples/ip_pipeline: fix external build

Fix build with external makefile.

Fixes: fbc74e66334f ("examples/ip_pipeline: remove infra code")

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
4 years agoexamples/pipeline: fix resource leak
Cristian Dumitrescu [Mon, 26 Oct 2020 21:23:55 +0000 (21:23 +0000)]
examples/pipeline: fix resource leak

Coverity issue: 363041
Fixes: 5074e1d551 ("examples/pipeline: add configuration commands")

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
4 years agopipeline: fix string copy into fixed size buffer
Cristian Dumitrescu [Mon, 26 Oct 2020 19:59:16 +0000 (19:59 +0000)]
pipeline: fix string copy into fixed size buffer

Fix potential buffer overflows by string copy into fixed size buffer.

Coverity issue: 362732, 362736, 362760, 362772, 362775, 362784
Coverity issue: 362800, 362803, 362806, 362811, 362814, 362816
Coverity issue: 362834, 362837, 362844, 362845, 362857, 362861
Coverity issue: 362868, 362890, 362893, 362904, 362905
Fixes: 56492fd536 ("pipeline: add new SWX pipeline type")
Fixes: 1e4c88caea ("pipeline: add SWX extern objects and funcs")
Fixes: e9d870dd93 ("pipeline: add SWX pipeline tables")
Fixes: a1711f948d ("pipeline: add SWX Rx and extract instructions")

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
4 years agohash: fix check of parameter
Yunjian Wang [Tue, 27 Oct 2020 12:51:25 +0000 (20:51 +0800)]
hash: fix check of parameter

Coverity flags that 'h' variable is used before
it's checked for NULL. This patch fixes this issue.

Coverity issue: 363625
Fixes: 769b2de7fb52 ("hash: implement RCU resources reclamation")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Acked-by: Yipeng Wang <yipeng1.wang@intel.com>
4 years agoeal: fix interrupt trace point
Yunjian Wang [Thu, 15 Oct 2020 08:42:30 +0000 (16:42 +0800)]
eal: fix interrupt trace point

This patch fixes (dereference after null check) coverity issue.
For this reason, we should add null check at the beginning of the
function and return error directly if the 'intr_handle' is null.

Coverity issue: 357695, 357751
Fixes: 05c4105738d8 ("trace: add interrupt tracepoints")
Cc: stable@dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Harman Kalra <hkalra@marvell.com>
4 years agotest/ring: add stress tests for zero copy API
Honnappa Nagarahalli [Sun, 25 Oct 2020 05:45:52 +0000 (00:45 -0500)]
test/ring: add stress tests for zero copy API

Add stress tests for zero copy API.

Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
4 years agotest/ring: add functional tests for zero copy API
Honnappa Nagarahalli [Sun, 25 Oct 2020 05:45:50 +0000 (00:45 -0500)]
test/ring: add functional tests for zero copy API

Add functional tests for zero copy APIs. Test enqueue/dequeue
functions are created using the zero copy APIs to fit into
the existing testing method.

Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
4 years agoring: add zero copy API
Honnappa Nagarahalli [Sun, 25 Oct 2020 05:45:49 +0000 (00:45 -0500)]
ring: add zero copy API

Add zero-copy APIs. These APIs provide the capability to
copy the data to/from the ring memory directly, without
having a temporary copy (for ex: an array of mbufs on
the stack). Use cases that involve copying large amount
of data to/from the ring can benefit from these APIs.

Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
4 years agotest/ring: fix integer cast to pointer
Honnappa Nagarahalli [Sun, 25 Oct 2020 05:45:56 +0000 (00:45 -0500)]
test/ring: fix integer cast to pointer

Use uintptr_t instead of unsigned long while initializing the
array of pointers.

Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
4 years agotest/ring: remove unnecessary braces
Honnappa Nagarahalli [Sun, 25 Oct 2020 05:45:55 +0000 (00:45 -0500)]
test/ring: remove unnecessary braces

Remove unnecessary braces to improve readability.

Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
4 years agotest/ring: fix memory dump
Honnappa Nagarahalli [Sun, 25 Oct 2020 05:45:54 +0000 (00:45 -0500)]
test/ring: fix memory dump

Pass the correct number of bytes to dump the memory.

Fixes: bf28df24e915 ("test/ring: add contention stress test")
Cc: stable@dpdk.org
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
4 years agoexamples/tep_term: remove this application
Xiaoyun Li [Mon, 26 Oct 2020 08:11:43 +0000 (16:11 +0800)]
examples/tep_term: remove this application

This example sets up a scenario that VXLAN packets can be received
by different PF queues based on VNID and each queue is bound to a VM
with a VNID so that the VM can receive its inner packets.

Usually, OVS is used to do the software encap/decap for VXLAN packets.

And the VXLAN packets offloading can be replaced with flow rules in
testpmd like Chapter "Sample VXLAN flow rules" in Testpmd Application
User Guide.

And this example hasn't been used for a long time.

So deprecate this example.

Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agoapp/fib: select lookup
Vladimir Medvedkin [Tue, 27 Oct 2020 15:11:30 +0000 (15:11 +0000)]
app/fib: select lookup

Added -v option to switch between different lookup implementations
to measure their performance and correctness.

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
4 years agofib6: add AVX512 lookup
Vladimir Medvedkin [Tue, 27 Oct 2020 15:11:29 +0000 (15:11 +0000)]
fib6: add AVX512 lookup

Add new lookup implementation for FIB6 trie algorithm using
AVX512 instruction set

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
4 years agofib6: move lookup definition to header
Vladimir Medvedkin [Tue, 27 Oct 2020 15:11:28 +0000 (15:11 +0000)]
fib6: move lookup definition to header

Move trie table layout and lookup definition into the
private header file. This is necessary for implementing a
vectorized lookup function in a separate .с file.

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
4 years agofib6: add lookup runtime selection
Vladimir Medvedkin [Tue, 27 Oct 2020 15:11:27 +0000 (15:11 +0000)]
fib6: add lookup runtime selection

Add type argument to trie_get_lookup_fn()
Now it only supports RTE_FIB6_LOOKUP_TRIE_SCALAR

Add new rte_fib6_select_lookup() - user can change lookup
function type runtime.

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
4 years agofib: add AVX512 lookup
Vladimir Medvedkin [Tue, 27 Oct 2020 15:11:26 +0000 (15:11 +0000)]
fib: add AVX512 lookup

Add new lookup implementation for DIR24_8 algorithm using
AVX512 instruction set

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
4 years agofib: move lookup definition to header
Vladimir Medvedkin [Tue, 27 Oct 2020 15:11:25 +0000 (15:11 +0000)]
fib: move lookup definition to header

Move dir24_8 table layout and lookup definition into the
private header file. This is necessary for implementing a
vectorized lookup function in a separate .с file.

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
4 years agofib: add lookup runtime selection
Vladimir Medvedkin [Tue, 27 Oct 2020 15:11:24 +0000 (15:11 +0000)]
fib: add lookup runtime selection

Add type argument to dir24_8_get_lookup_fn()
Now it supports 3 different lookup implementations:
 RTE_FIB_LOOKUP_DIR24_8_SCALAR_MACRO
 RTE_FIB_LOOKUP_DIR24_8_SCALAR_INLINE
 RTE_FIB_LOOKUP_DIR24_8_SCALAR_UNI

Add new rte_fib_select_lookup() - user can change lookup
function type runtime.

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
4 years agofib: remove maximum type enums
Vladimir Medvedkin [Tue, 27 Oct 2020 15:11:31 +0000 (15:11 +0000)]
fib: remove maximum type enums

FIB type RTE_FIB_TYPE_MAX is used only for sanity checks,
remove it to prevent applications start using it.
The same is for FIB6's RTE_FIB6_TYPE_MAX.

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: David Marchand <david.marchand@redhat.com>
4 years agoservice: separate statistics dump and reset
David Marchand [Thu, 22 Oct 2020 08:08:10 +0000 (10:08 +0200)]
service: separate statistics dump and reset

No functional change intended.

service_dump_calls_per_lcore() was always called with a 0 reset flag.
service_dump_one() was called with either a 0 reset flag or a NULL
FILE pointer.

We can split the code for readability sake.

Note: there is no path to resetting calls_per_service[], this is left as
is.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
4 years agodoc: update ABI version references
Ray Kinsella [Mon, 26 Oct 2020 19:31:14 +0000 (19:31 +0000)]
doc: update ABI version references

Updated references to abi versions in the contributors guide.
Fixed an inaccurate reference to a symbol in the policy.

Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Reviewed-by: David Marchand <david.marchand@redhat.com>
4 years agoapp/procinfo: clean old build macro
David Marchand [Fri, 23 Oct 2020 07:44:51 +0000 (09:44 +0200)]
app/procinfo: clean old build macro

When merging this series after Bruce changes on build macros, an old macro
usage has been re-introduced.

Fixes: d82d6ac64338 ("app/procinfo: add crypto security context info")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
4 years agolpm: hide internal data
Ruifeng Wang [Fri, 23 Oct 2020 09:38:18 +0000 (11:38 +0200)]
lpm: hide internal data

Fields except tbl24 and tbl8 in rte_lpm structure have no
need to be exposed to the user.
Hide the unneeded exposure of structure fields for better
ABI maintainability.

Suggested-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
4 years agolpm: fix free of data structure
Ruifeng Wang [Fri, 23 Oct 2020 09:38:17 +0000 (11:38 +0200)]
lpm: fix free of data structure

The container structure should be freed instead of rte_lpm structure
after wrapping rte_lpm into internal structure __rte_lpm.

Fixes: 8a9f8564e9f9 ("lpm: implement RCU rule reclamation")

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
4 years agomaintainers: improve coverage of arch-specific files
Thomas Monjalon [Sat, 24 Oct 2020 16:36:19 +0000 (18:36 +0200)]
maintainers: improve coverage of arch-specific files

The sub-directories of config/ are maintained by
different architecture maintainers.

Some wildcards are used to describe the lib, drivers and app files
which are specific to some architectures.

The EAL Arm files have split responsibilities depending on 32/64 suffix,
and the common files are shared between Armv7 and Armv8 sections.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: David Christensen <drc@linux.vnet.ibm.com>
Acked-by: David Marchand <david.marchand@redhat.com>
4 years agotest/hash: add RCU tests
Dharmik Thakkar [Wed, 21 Oct 2020 22:50:06 +0000 (17:50 -0500)]
test/hash: add RCU tests

Add functional and performance tests for the integrated RCU QSBR.

Suggested-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Signed-off-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Yipeng Wang <yipeng1.wang@intel.com>
4 years agotest/hash: use C11 atomics in lock-free perf test
Dharmik Thakkar [Wed, 21 Oct 2020 22:50:05 +0000 (17:50 -0500)]
test/hash: use C11 atomics in lock-free perf test

Replace rte_atomic APIs with C11 atomic APIs in
test_hash_readwrite_lf_perf.c

Signed-off-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Yipeng Wang <yipeng1.wang@intel.com>
4 years agohash: implement RCU resources reclamation
Dharmik Thakkar [Wed, 21 Oct 2020 22:50:04 +0000 (17:50 -0500)]
hash: implement RCU resources reclamation

Currently, users have to use external RCU mechanisms to free resources
when using lock free hash algorithm.

Integrate RCU QSBR process to make it easier for the applications to use
lock free algorithm.
Refer to RCU documentation to understand various aspects of
integrating RCU library into other libraries.

Suggested-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Signed-off-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
Acked-by: Yipeng Wang <yipeng1.wang@intel.com>
4 years agorcu: build on Windows
Dharmik Thakkar [Wed, 21 Oct 2020 22:50:03 +0000 (17:50 -0500)]
rcu: build on Windows

Build the lib for Windows.

Signed-off-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Tested-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Tested-by: Pallavi Kadam <pallavi.kadam@intel.com>
4 years agodoc: remove references to make from known issues
Thomas Monjalon [Thu, 22 Oct 2020 17:30:09 +0000 (19:30 +0200)]
doc: remove references to make from known issues

The config options CONFIG_RTE_* are simple RTE_* defines with meson.
Now that make support is dropped, update the HPET config reference.

The comment about the AVX512 config option is not relevant anymore.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: David Marchand <david.marchand@redhat.com>
4 years agoremove config prefix used with make
Thomas Monjalon [Thu, 22 Oct 2020 19:22:45 +0000 (21:22 +0200)]
remove config prefix used with make

The config options CONFIG_RTE_* are simple RTE_* defines with meson.
Now that make support is dropped, update the names in logs and comments.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: David Marchand <david.marchand@redhat.com>
4 years agomem: fix config name in error logs
Thomas Monjalon [Thu, 22 Oct 2020 17:36:21 +0000 (19:36 +0200)]
mem: fix config name in error logs

When introducing the new option CONFIG_RTE_MAX_MEM_MB_PER_TYPE,
some logs were referencing a wrong name: CONFIG_RTE_MAX_MEM_PER_TYPE.

Fixes: 66cc45e293ed ("mem: replace memseg with memseg lists")
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: David Marchand <david.marchand@redhat.com>
4 years agoeal: remove comment about old partition option
Thomas Monjalon [Thu, 22 Oct 2020 17:37:34 +0000 (19:37 +0200)]
eal: remove comment about old partition option

The main initialization function (rte_eal_init) has documentation
about a feature from another era: memory partition.

Curiously, this lost treasure is found only now,
suggesting there may be other interesting things to discover in the doc.
To all aspiring Indiana Jones: the hunt is open!

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: David Marchand <david.marchand@redhat.com>
4 years agoexamples/pipeline: fix help command
Yogesh Jangra [Thu, 22 Oct 2020 11:01:52 +0000 (07:01 -0400)]
examples/pipeline: fix help command

This patch has the changes to list all supported commands and fix
supported commands help details.

Fixes: 5074e1d55107 ("examples/pipeline: add configuration commands")

Signed-off-by: Yogesh Jangra <yogesh.jangra@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
4 years agoeal: report duplicate device event callback
Yunjian Wang [Wed, 21 Oct 2020 11:19:49 +0000 (19:19 +0800)]
eal: report duplicate device event callback

We should return an error value, when the callback is already exist.

Fixes: a753e53d517b ("eal: add device event monitor framework")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: David Marchand <david.marchand@redhat.com>
4 years agoeal: return errors on device event callback unregister
Yunjian Wang [Wed, 21 Oct 2020 11:19:23 +0000 (19:19 +0800)]
eal: return errors on device event callback unregister

Fix return value, using -EAGAIN instead of 0 when the callback is busy
and using -ENOENT instead of 0 when the callback is not found.

Fixes: a753e53d517b ("eal: add device event monitor framework")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
Acked-by: David Marchand <david.marchand@redhat.com>
4 years agoeal: fix leak on device event callback unregister
Yunjian Wang [Wed, 21 Oct 2020 11:19:03 +0000 (19:19 +0800)]
eal: fix leak on device event callback unregister

The event_cb->dev_name is not freed when freeing event_cb,
and this causes a memory leak.

Fixes: a753e53d517b ("eal: add device event monitor framework")
Cc: stable@dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
Acked-by: David Marchand <david.marchand@redhat.com>
4 years agoexamples/ipsec-secgw: use POSIX network address conversion
Ibtisam Tariq [Mon, 13 Jul 2020 09:57:30 +0000 (09:57 +0000)]
examples/ipsec-secgw: use POSIX network address conversion

inet_pton4 and inet_pton6 was reimplemented. Replace implementation of
inet_pton4 and inet_pton6 with libc inet_pton function

Bugzilla ID: 365
Fixes: 0d547ed03717 ("examples/ipsec-secgw: support configuration file")

Reported-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Ibtisam Tariq <ibtisam.tariq@emumba.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: David Marchand <david.marchand@redhat.com>
4 years agoexamples/ip_pipeline: use POSIX network address conversion
Ibtisam Tariq [Mon, 13 Jul 2020 09:57:29 +0000 (09:57 +0000)]
examples/ip_pipeline: use POSIX network address conversion

inet_pton4 and inet_pton6 was reimplemented. Replacing implementation of
inet_pton4 and inet_pton6 with libc inet_pton function

Bugzilla ID: 365
Fixes: ed7a0490f7e2 ("examples/ip_pipeline: add string parsing helpers")

Reported-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Ibtisam Tariq <ibtisam.tariq@emumba.com>
Acked-by: David Marchand <david.marchand@redhat.com>
4 years agonet/softnic: use POSIX network address conversion
Ibtisam Tariq [Mon, 13 Jul 2020 09:57:28 +0000 (09:57 +0000)]
net/softnic: use POSIX network address conversion

inet_pton4 and inet_pton6 was reimplemented. Replace implementation of
inet_pton4 and inet_pton6 with libc inet_pton function

Bugzilla ID: 365
Fixes: 31ce8d888625 ("net/softnic: add command interface")

Reported-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Ibtisam Tariq <ibtisam.tariq@emumba.com>
Acked-by: David Marchand <david.marchand@redhat.com>
4 years agodoc: update guide for armv8 crypto
Ruifeng Wang [Wed, 14 Oct 2020 09:24:14 +0000 (17:24 +0800)]
doc: update guide for armv8 crypto

Added guide about building by using meson.

Also added the command to create virtual device.

Suggested-by: Akhil Goyal <akhil.goyal@nxp.com>
Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
4 years agodoc: update patch cheatsheet to use meson
Kevin Laatz [Wed, 21 Oct 2020 08:17:24 +0000 (09:17 +0100)]
doc: update patch cheatsheet to use meson

With 'make' being removed, the patch cheatsheet needs to be updated to
remove any references to 'make'. These references have been replaced with
meson alternatives in this patch.

Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>