Commit Graph

33306 Commits

Author SHA1 Message Date
Andrew Rybchenko
0593c208a4 ethdev: remove deprecated Rx and Tx multi-queue mode defines
Remove deprecated ``ETH_MQ_RX_*`` and ``ETH_MQ_TX_*`` defines.
Use corresponding defines with ``RTE_`` prefix instead.

Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
2022-08-24 09:56:45 +02:00
Andrew Rybchenko
667c74defa ethdev: remove deprecated link speed and duplex defines
Remove deprecated ``ETH_LINK_SPEED_``, ``ETH_SPEED_NUM_`` and
``ETH_LINK_`` defines. Use corresponding defines with ``RTE_`` prefix
instead.

Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
2022-08-24 09:55:54 +02:00
Ali Alnubani
327820af90 examples/pipeline: fix build with some compilers
Fixes the following build failure with gcc 5.4.0 because
of uninitialized variables:

[..]
examples/pipeline/cli.c:1801:10: error: 'idx' may be used
  uninitialized in this function [-Werror=maybe-uninitialized]
[..]
examples/pipeline/cli.c:1916:10: error: 'idx' may be used
  uninitialized in this function [-Werror=maybe-uninitialized]
[..]

Fixes: 83f58a7b7b ("examples/pipeline: add commands for direct registers")

Signed-off-by: Ali Alnubani <alialnu@nvidia.com>
2022-09-25 16:02:25 +02:00
Cristian Dumitrescu
12eda78d3a examples/pipeline: add commands for direct meters
Add the CLI command support for managing direct meters.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2022-09-24 11:35:43 +02:00
Cristian Dumitrescu
83f58a7b7b examples/pipeline: add commands for direct registers
Add the CLI command support for reading/writing direct registers.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2022-09-24 11:35:39 +02:00
Cristian Dumitrescu
ac0d65df3e pipeline: support direct meters on control path
Add pipeline control path API to manage direct meters. These meters
are identified by a table key, whose entry ID is used as the index
into the meter array.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2022-09-24 11:35:34 +02:00
Cristian Dumitrescu
aa1855235d pipeline: support direct registers on control path
Add pipeline control path API to read/write direct registers. These
registers are identified by a table key, whose entry ID is used as the
index into the register array.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2022-09-24 11:35:29 +02:00
Cristian Dumitrescu
d4e95281a9 pipeline: add table entry ID read instruction
Add the entry ID instruction that reads the entry ID of the latest
table lookup operation from the pipeline into the meta-data. The entry
ID is then used by the register and meter instructions as the index
into the register or meter array.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2022-09-24 11:35:25 +02:00
Cristian Dumitrescu
c1b4b26a53 table: add entry ID for learner tables
Add support for unique ID for each learner table entry. The entry ID
is retrieved as part of the learner table lookup operation and is
saved by the pipeline for later use.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2022-09-24 11:35:23 +02:00
Cristian Dumitrescu
42605e5651 table: add entry ID for regular tables
Add support for unique ID for each table entry. The entry ID is
retrieved as part of the table lookup operation and is saved by the
pipeline for later use.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2022-09-24 11:35:14 +02:00
Cristian Dumitrescu
fa7723b5e3 pipeline: configure hash function for learner tables
Make the hash function configurable for the learner pipeline tables.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Kamalakannan R <kamalakannan.r@intel.com>
2022-09-23 18:04:42 +02:00
Cristian Dumitrescu
0d871d7ed9 table: configure hash function for learner tables
Make the hash function configurable. The internal hash function that
was not configurable, mask-based and limited to 64 bytes is removed.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Kamalakannan R <kamalakannan.r@intel.com>
2022-09-23 18:04:41 +02:00
Cristian Dumitrescu
9560a3294e pipeline: configure hash function for regular tables
Make the hash function configurable for the regular pipeline tables.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Kamalakannan R <kamalakannan.r@intel.com>
2022-09-23 18:04:41 +02:00
Cristian Dumitrescu
82ff070188 table: configure hash function for regular tables
Make the hash function configurable. The internal hash function that
was not configurable, mask-based and limited to 64 bytes is removed.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Kamalakannan R <kamalakannan.r@intel.com>
2022-09-23 18:04:41 +02:00
Cristian Dumitrescu
da65740a16 table: add key comparison functions
Add key comparison functions to be used by the exact match and the
learner table types as part of the performance critical lookup
operation. Since the key size is fixed, it is possible to select a
specialized memory copy function as opposed to using the variable size
version, resulting in a performance improvement of around 5%.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Kamalakannan R <kamalakannan.r@intel.com>
2022-09-23 18:04:41 +02:00
Cristian Dumitrescu
f5fda6863a table: add hash function prototype
Add hash function prototype to be used by the exact match and the
learner table types. The hash function is not mask-based, so the table
key fields have to be contiguous in memory.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Kamalakannan R <kamalakannan.r@intel.com>
2022-09-23 18:04:41 +02:00
David Marchand
fbd59c8ecb dev: hide device object
Make rte_device opaque for non internal users.
This will make extending this object possible without breaking the ABI.

Some applications may have been dereferencing rte_device objects, mark
this object's accessors as stable.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2022-09-23 16:14:34 +02:00
David Marchand
8f4de2dba9 bus/pci: fill bus specific information
For diagnostic, it may be useful to provide the PCI vendor and device
id.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2022-09-23 16:14:34 +02:00
David Marchand
5b569f2ea8 dev: provide bus specific information
For diagnostic, it may be useful to provide a description of the device
with bus specific information.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2022-09-23 16:14:34 +02:00
David Marchand
ec5ecd7e37 dev: introduce device accessors
Prepare for making the device object opaque by adding accessors.
Update existing "external" users.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2022-09-23 16:14:34 +02:00
David Marchand
1acb7f5474 dev: hide driver object
Make rte_driver opaque for non internal users.
This will make extending this object possible without breaking the ABI.

Introduce a new driver header and move rte_driver definition.
Update drivers and library to use the internal header.

Some applications may have been dereferencing rte_driver objects, mark
this object's accessors as stable.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Jay Jayatheerthan <jay.jayatheerthan@intel.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
2022-09-23 16:14:34 +02:00
David Marchand
97bbdba31d dev: introduce driver accessors
Prepare for making the driver object opaque by adding accessors.
Update existing "external" users.
Internal users may still dereference a rte_driver object.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2022-09-23 16:14:34 +02:00
David Marchand
a04322f616 bus: hide bus object
Make rte_bus opaque for non internal users.
This will make extending this object possible without breaking the ABI.

Introduce a new driver header and move rte_bus definition and helpers.
Update drivers and library to use the internal header.

Some applications may have been dereferencing rte_bus objects, mark
this object's accessors as stable.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2022-09-23 16:14:34 +02:00
David Marchand
148c51a3de bus: introduce accessors
Add helpers to get a rte_bus object details.
This will be used externally.
Internal users may still dereference a rte_bus object.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2022-09-23 16:14:34 +02:00
David Marchand
770ebc060e bus: move IOVA definition from header
iova enum definition does not need to be defined as part of the bus API.
Move it to rte_eal.h.
With this step, rte_eal.h does not depend on rte_bus.h and rte_dev.h.
Fix existing code that was relying on these implicit inclusions.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2022-09-23 16:14:34 +02:00
David Marchand
84aaf06d81 bus/vmbus: make driver-only headers private
The vmbus bus interface is for drivers only.
Mark as internal and move the header in the driver headers list.

While at it, cleanup the code:
- fix indentation,
- remove unneeded reference to bus specific singleton object,
- remove unneeded list head structure type,
- reorder the definitions and macro manipulating the bus singleton object,
- remove inclusion of rte_bus.h and fix the code that relied on implicit
  inclusion,

Signed-off-by: David Marchand <david.marchand@redhat.com>
2022-09-23 16:14:34 +02:00
David Marchand
4851ef2b40 bus/vdev: make driver-only headers private
The vdev bus interface is for drivers only.
Mark as internal and move the header in the driver headers list.

While at it, cleanup the code:
- fix indentation,
- remove unneeded reference to bus specific singleton object,
- remove unneeded list head structure type,
- reorder the definitions and macro manipulating the bus singleton object,
- remove inclusion of rte_bus.h and fix the code that relied on implicit
  inclusion,

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Rosen Xu <rosen.xu@intel.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
2022-09-23 16:14:34 +02:00
David Marchand
1f37cb2bb4 bus/pci: make driver-only headers private
The pci bus interface is for drivers only.
Mark as internal and move the header in the driver headers list.

While at it, cleanup the code:
- fix indentation,
- remove unneeded reference to bus specific singleton object,
- remove unneeded list head structure type,
- reorder the definitions and macro manipulating the bus singleton object,
- remove inclusion of rte_bus.h and fix the code that relied on implicit
  inclusion,

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Rosen Xu <rosen.xu@intel.com>
2022-09-23 16:14:34 +02:00
David Marchand
925c074e37 bus/ifpga: make driver-only headers private
The ifpga bus interface is for drivers only.
Mark as internal and move the header in the driver headers list.

While at it, cleanup the code:
- remove unneeded list head structure type,
- reorder the definitions and macro manipulating the bus singleton object,
- remove inclusion of rte_bus.h and fix the code that relied on implicit
  inclusion,

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Rosen Xu <rosen.xu@intel.com>
2022-09-23 16:14:34 +02:00
David Marchand
9c89c333bc bus/ifpga: cleanup exported symbols
Remove unused symbols (exposed only in an internal header which
guarantees that no application out there relied on them).

Remove rte_ prefix and inline the rest to avoid having to expose them as
global symbols for a relatively small added value.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Rosen Xu <rosen.xu@intel.com>
2022-09-23 16:14:34 +02:00
David Marchand
b4f22ca5cb bus/fslmc: make driver-only headers private
The fslmc bus interface is for drivers only.
Mark as internal and move the header in the driver headers list.

While at it, cleanup internal structures:
- remove unneeded reference to bus specific singleton object,
- remove unneeded list head structure type,
- reorder the definitions and macro manipulating the bus singleton object,
- remove inclusion of rte_bus.h and update code that relied on it,

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2022-09-23 16:14:34 +02:00
David Marchand
a2f1da7da8 bus/dpaa: make driver-only headers private
The dpaa bus interface is for drivers only.
Mark as internal and move the header in the driver headers list.

While at it, cleanup internal structures:
- remove unneeded reference to bus specific singleton object,
- remove unneeded list head structure type,
- reorder the definitions and macro manipulating the bus singleton object,
- remove inclusion of rte_bus.h and update code that relied on it,

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2022-09-23 16:14:34 +02:00
David Marchand
b3f89090d6 bus/auxiliary: make driver-only headers private
The auxiliary bus interface is for drivers only.
Mark as internal and move the header in the driver headers list.

While at it, cleanup the code:
- fix indentation,
- remove unneeded reference to bus specific singleton object,
- remove unneeded list head structure type,
- reorder the definitions and macro manipulating the bus singleton object,
- remove inclusion of rte_bus.h and fix the code that relied on implicit
  inclusion,

Signed-off-by: David Marchand <david.marchand@redhat.com>
2022-09-23 16:14:34 +02:00
David Marchand
ada7338954 build: export drivers headers
Same as for device classes, external DPDK users may need to include some
bus headers for their out of tree drivers.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2022-09-23 16:14:34 +02:00
David Marchand
82ee04a855 devargs: remove dependency on bus header
We don't need to include rte_bus.h in rte_devargs.h.
Only a forward declaration of rte_bus and an inclusion of rte_dev.h are
needed.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2022-09-23 16:14:34 +02:00
David Marchand
8f1d23ece0 eal: deprecate RTE_FUNC_PTR_* macros
Those macros have no real value and are easily replaced with a simple
if() block.

Existing users have been converted using a new cocci script.
Deprecate them.

Signed-off-by: David Marchand <david.marchand@redhat.com>
2022-09-23 16:14:34 +02:00
David Marchand
99948194a8 dev: hide debug messages in device iterator
For any bus that does not support device iteration, rte_dev_iterator_init
both returned an error code and logged an error message.
An application (like testpmd) that only wants to list devices, would have
no choice but to inspect a bus object to avoid spewing error logs.

Make those log messages debug level, and remove the check in testpmd.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2022-09-23 16:14:34 +02:00
David Marchand
d589a8a8a7 examples/ethtool: prefer device name
Rely on the generic device name rather than restrict to only supporting
PCI devices.

Signed-off-by: David Marchand <david.marchand@redhat.com>
2022-09-23 16:14:33 +02:00
David Marchand
18bdf6ab8e kni: stop populating PCI info in examples
addr and id fields are deprecated and are not used in the kni library.
Stop populating them in the in-tree examples.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2022-09-23 16:14:33 +02:00
David Marchand
1bcb7ba9de app/testpmd: drop PCI register commands
Those commands date back to the early stages of DPDK when only PCI
devices were supported.
At the time, developers may have used those commands to help in
debugging their buggy^Wwork in progress drivers.

Removing them, we can drop the dependency on the PCI bus and library and
make testpmd bus agnostic.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2022-09-23 16:14:33 +02:00
David Marchand
9c1b4ae5c0 raw/ifpga: remove PCI bus accessor
There is no in-tree user for this accessor that returns the PCI bus
object.
On the other hand, a bus object can be retrieved by name using
rte_bus_find_by_name.
We can remove this driver specific API.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Rosen Xu <rosen.xu@intel.com>
2022-09-23 16:14:33 +02:00
David Marchand
709b9a4770 common/mlx5: rework check on driver registration
Rely on a local flag rather than dereference a bus object.
This will help next commits.

Signed-off-by: David Marchand <david.marchand@redhat.com>
2022-09-23 16:14:33 +02:00
David Marchand
cfb4161d03 devtools: forbid inclusions of driver only headers
Let's be good citizens and enforce not using driver only headers in our
own examples.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2022-09-23 16:14:33 +02:00
Cristian Dumitrescu
9ebff617fe pipeline: support moving large structure fields
Add support to the move instruction for operands bigger than 64 bits.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Harshad Narayane <harshad.suresh.narayane@intel.com>
2022-09-23 13:56:01 +02:00
Cristian Dumitrescu
86347cd9ce pipeline: support large default action arguments
Support structure fields bigger than 64 bits as default action
arguments.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Harshad Narayane <harshad.suresh.narayane@intel.com>
2022-09-23 13:56:01 +02:00
Cristian Dumitrescu
103b303d4c pipeline: read large structure fields on control path
Support reading structure fields that are bigger than 64 bits on the
control path for the table update operations.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Harshad Narayane <harshad.suresh.narayane@intel.com>
2022-09-23 13:56:01 +02:00
Cristian Dumitrescu
076d612875 pipeline: remove 64-bit limit for structure fields
Remove the generic limitation of structure fields to 64 bits or less
and push this restriction to the instructions that require it.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Harshad Narayane <harshad.suresh.narayane@intel.com>
2022-09-23 13:56:01 +02:00
Abdullah Sevincer
aec322ce15 eal: export coremask parsing helper
DLB2 has a need to parse a user supplied coremask as part
of an optimization that associates optimal core/resource
pairs. Therefore eal_parse_coremask has been renamed
to rte_eal_parse_coremask and exported but kept internal.

Signed-off-by: Abdullah Sevincer <abdullah.sevincer@intel.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
2022-09-23 12:07:49 +02:00
Thomas Monjalon
40c7e9608b gpu/cuda: fix build
A recent commit removed errno.h from rte_common.h.
It has to be added in various places where it is used,
and was implicitly included via rte_common.h,
but was forgotten in gpu/cuda.

As a result, the compilation is broken:
	drivers/gpu/cuda/gdrcopy.c:116:17: error: ‘ENOTSUP’ undeclared

Note that rte_errno.h does not include errno.h.
The include of errno.h is added.

Fixes: 72b452c5f2 ("eal: remove unneeded includes from a public header")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Tested-by: David Marchand <david.marchand@redhat.com>
2022-09-23 10:39:36 +02:00
Cristian Dumitrescu
d2384afb47 net/softnic: print output port packet drop counters
Print the output port packet drop statistics counters.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2022-09-22 16:56:58 +02:00