Commit Graph

5779 Commits

Author SHA1 Message Date
Conor Walsh
269f027453 doc: fix reference to dma application example
When the dpdk-ioat app was renamed to dpdk-dma this example command
was missed, this patch corrects that issue.

Fixes: bb4141dbe5 ("examples/dma: rename ioat application example")

Signed-off-by: Conor Walsh <conor.walsh@intel.com>
2022-10-21 15:50:25 +02:00
David Marchand
d6fd5a018e trace: fix dynamically enabling trace points
Enabling trace points at runtime was not working if no trace point had
been enabled first at rte_eal_init() time. The reason was that
trace.args reflected the arguments passed to --trace= EAL option.

To fix this:
- the trace subsystem initialisation is updated: trace directory
  creation is deferred to when traces are dumped (to avoid creating
  directories that may not be used),
- per lcore memory allocation still relies on rte_trace_is_enabled() but
  this helper now tracks if any trace point is enabled. The
  documentation is updated accordingly,
- cleanup helpers must always be called in rte_eal_cleanup() since some
  trace points might have been enabled and disabled in the lifetime of
  the DPDK application,

With this fix, we can update the unit test and check that a trace point
callback is invoked when expected.

Note:
- the 'trace' global variable might be shadowed with the argument
  passed to the functions dealing with trace point handles.
  'tp' has been used for referring to trace_point object.
  Prefer 't' for referring to handles,

Fixes: 84c4fae462 ("trace: implement operation APIs")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Sunil Kumar Kori <skori@marvell.com>
2022-10-20 13:34:19 +02:00
Robin Jarry
0ce3cf4afd usertools/pmdinfo: rewrite simpler script
dpdk-pmdinfo.py does not produce any parseable output. The -r/--raw flag
merely prints multiple independent JSON lines which cannot be fed
directly to any JSON parser. Moreover, the script complexity is rather
high for such a simple task: extracting PMD_INFO_STRING from .rodata ELF
sections. Rewrite it so that it can produce valid JSON.

Remove the PCI database parsing for PCI-ID to Vendor-Device names
conversion. This should be done by external scripts (if really needed).

The script passes flake8, black, isort and pylint checks.

I have tested this with a matrix of python/pyelftools versions:

                                 pyelftools
               0.22  0.23  0.24  0.25  0.26  0.27  0.28  0.29
        3.6      ok    ok    ok    ok    ok    ok    ok    ok
        3.7      ok    ok    ok    ok    ok    ok    ok    ok
 Python 3.8      ok    ok    ok    ok    ok    ok    ok    ok
        3.9      ok    ok    ok    ok    ok   *ok    ok    ok
        3.10   fail  fail  fail  fail    ok    ok    ok    ok

                                     * Also tested on FreeBSD

All failures with python 3.10 are related to the same issue:

  File "elftools/construct/lib/container.py", line 5, in <module>
    from collections import MutableMapping
  ImportError: cannot import name 'MutableMapping' from 'collections'

Python 3.10 support is only available since pyelftools 0.26. The script
will only work with Python 3.6 and later.

Update the minimal system requirements, docs and release notes.

Signed-off-by: Robin Jarry <rjarry@redhat.com>
Tested-by: Ferruh Yigit <ferruh.yigit@amd.com>
Tested-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2022-10-11 02:11:33 +02:00
Thomas Monjalon
df1982df8b net/mana: fix dependencies
The reason for not building is updated
to be consistent with other drivers.

The libibverbs was not detected through pkg-config.
The method dependency() needs to be used first.

The support in rdma-core and Linux is not released yet,
so the documentation is updated.

Fixes: 517ed6e2d5 ("net/mana: add basic driver with build environment")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2022-10-11 01:34:07 +02:00
Bruce Richardson
66f624e4ea kni: add deprecation warning at runtime
When KNI is being used at runtime, output a warning message about its
deprecated status. This is part of the deprecation process for KNI
agreed by the DPDK technical board.[1]

[1] https://mails.dpdk.org/archives/dev/2022-June/243596.html

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
2022-10-10 17:04:09 +02:00
Bruce Richardson
bbaf917565 kni: flag deprecated status at build time
To ensure all users are aware of KNI's deprecated status at build time,
this library is marked as a deprecated library: the library is disabled
by default. It can be re-enabled by setting disabled_libs to the empty
string (or other string not including 'kni').

The dependent NIC driver, drivers/net/kni, is disabled accordingly as it
depends on the library.

NOTE: This is part of the deprecation process for KNI agreed by the DPDK
technical board.[1]

[1] https://mails.dpdk.org/archives/dev/2022-June/243596.html

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
2022-10-10 17:01:59 +02:00
Bruce Richardson
909ad7b80e build: increase minimum meson version to 0.53.2
This patchset bumps the minimum meson version from 0.49.2 to 0.53.2.
Ideally, the minimum version should be 0.53 without a point release, but
some DPDK builds (mingw) are broken with 0.53.0 due to issue[1], fixed
by commit[2] in 0.53.1. Therefore we use the latest point release from
0.53 branch i.e. 0.53.2.

Some new features of interest which can now be used in DPDK with this
new minimum meson version:

* can do header-file checks directly inside find_library calls, rather
  than needing a separate check.[v0.50].
* can pass multiple cross-files at the same time when cross-compiling
  [v0.51].
* "alias_target" function, to allow use to give better/shorter names
  for particular build objects [v0.52].
* auto-generation of clang-format [v0.50] and clang-tidy[v0.52] targets
  when those tools are present and config dotfiles are present.
  Similarly ctags and cscope are added as targets when those tools are
  present [v0.53]
* meson module for filesystem operations, so meson can now check for the
  presence of particular files or directories [v0.53].
* "summary" function to provide a configuration summary at the end of
  the meson run [v0.53].

Plus many other features. See [3] for full details of each version.

[1] https://github.com/mesonbuild/meson/issues/6442
[2] https://github.com/mesonbuild/meson/pull/6457/commits/8e7a7c36b579
[3] https://mesonbuild.com/Release-notes.html

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: David Marchand <david.marchand@redhat.com>
2022-10-10 16:52:38 +02:00
Tadhg Kearney
10db2a5b87 examples/l3fwd-power: add options for uncore frequency
Add option for setting uncore frequency min/max/index, through uncore API.
This will be set for each package and die on the SKU.
On exit, uncore min and max frequency will be reverted back
to previous frequencies.

Signed-off-by: Tadhg Kearney <tadhg.kearney@intel.com>
Reviewed-by: David Hunt <david.hunt@intel.com>
Acked-by: David Hunt <david.hunt@intel.com>
2022-10-10 14:53:40 +02:00
Tadhg Kearney
60b8a661a9 power: add Intel uncore frequency control
Add API to allow uncore frequency adjustment.

Uncore is a term used by Intel to describe function
of a microprocessor that are closely connected
to the core to achieve high performance.

This is done through manipulating related uncore frequency control
sysfs entries to adjust the minimum and maximum uncore frequency values
and works on Linux for Intel hardware.

Signed-off-by: Tadhg Kearney <tadhg.kearney@intel.com>
Reviewed-by: David Hunt <david.hunt@intel.com>
Acked-by: David Hunt <david.hunt@intel.com>
2022-10-10 14:53:40 +02:00
Ben Magistro
29f3465c8a doc: fix dumpcap interface parameter option
The dumpcap application supports an interface parameter via the
`-i` option however the current documentation utilizes a `-I` flag.

Fixes: cbb44143be ("app/dumpcap: add new packet capture application")
Cc: stable@dpdk.org

Signed-off-by: Ben Magistro <koncept1@gmail.com>
2022-10-10 02:18:03 +02:00
Leyi Rong
db354bd2e1 member: add NitroSketch mode
Sketching algorithm provide high-fidelity approximate measurements and
appears as a promising alternative to traditional approaches such as
packet sampling.

NitroSketch [1] is a software sketching framework that optimizes
performance, provides accuracy guarantees, and supports a variety of
sketches.

This commit adds a new data structure called sketch into
membership library. This new data structure is an efficient
way to profile the traffic for heavy hitters. Also use min-heap
structure to maintain the top-k flow keys.

[1] Zaoxing Liu, Ran Ben-Basat, Gil Einziger, Yaron Kassner, Vladimir
Braverman, Roy Friedman, Vyas Sekar, "NitroSketch: Robust and General
Sketch-based Monitoring in Software Switches", in ACM SIGCOMM 2019.
https://dl.acm.org/doi/pdf/10.1145/3341302.3342076

Signed-off-by: Alan Liu <zaoxingliu@gmail.com>
Signed-off-by: Yipeng Wang <yipeng1.wang@intel.com>
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Tested-by: Yu Jiang <yux.jiang@intel.com>
2022-10-09 23:11:43 +02:00
Yuan Wang
629dad3ef3 net/ice: support buffer split in scalar Rx
Add support for protocol based buffer split in normal Rx
data paths. When the Rx queue is configured with specific protocol type,
packets received will be directly split into protocol header and
payload parts. And the two parts will be put into different mempools.

Currently, protocol based buffer split is not supported in vectorized
paths.

A new API ice_buffer_split_supported_hdr_ptypes_get() has been
introduced, it will return the supported header protocols of ice PMD
to app for splitting.

Signed-off-by: Yuan Wang <yuanx.wang@intel.com>
Signed-off-by: Xuan Ding <xuan.ding@intel.com>
Signed-off-by: Wenxuan Wu <wenxuanx.wu@intel.com>
2022-10-09 16:41:49 +02:00
Yuan Wang
52e2e7edcf app/testpmd: add protocol-based buffer split
Add command line parameter:
--rxhdrs=eth[,ipv4]

Set the protocol_hdr of segments to scatter packets on receiving if
split feature is engaged. And the queues with BUFFER_SPLIT flag.

Add interactive mode command:
testpmd>set rxhdrs eth,ipv4,ipv4-udp
(protocol sequence should be valid)

The protocol split feature is off by default. To enable protocol split,
you need:
1. Start testpmd with multiple mempools. E.g. --mbuf-size=2048,2048
2. Configure Rx queue with rx_offload buffer split on.
3. Set the protocol type of buffer split. E.g. set rxhdrs eth,eth-ipv4
        (default protocols of testpmd : eth|ipv4|ipv6|ipv4-tcp|ipv6-tcp|
         ipv4-udp|ipv6-udp|ipv4-sctp|ipv6-sctp|grenat|inner-eth|
         inner-ipv4|inner-ipv6|inner-ipv4-tcp|inner-ipv6-tcp|
         inner-ipv4-udp|inner-ipv6-udp|inner-ipv4-sctp|inner-ipv6-sctp)
Above protocols can be configured in testpmd. But the configuration can
only be applied when it is supported by specific pmd.

Signed-off-by: Yuan Wang <yuanx.wang@intel.com>
Signed-off-by: Xuan Ding <xuan.ding@intel.com>
Signed-off-by: Wenxuan Wu <wenxuanx.wu@intel.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
2022-10-09 16:41:31 +02:00
Yuan Wang
605975b8b3 ethdev: introduce protocol-based buffer split
Currently, Rx buffer split supports length based split. With Rx queue
offload RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT enabled and Rx packet segment
configured, PMD will be able to split the received packets into
multiple segments.

However, length based buffer split is not suitable for NICs that do split
based on protocol headers. Given an arbitrarily variable length in Rx
packet segment, it is almost impossible to pass a fixed protocol header to
driver. Besides, the existence of tunneling results in the composition of
a packet is various, which makes the situation even worse.

This patch extends current buffer split to support protocol header based
buffer split. A new proto_hdr field is introduced in the reserved field
of rte_eth_rxseg_split structure to specify protocol header. The proto_hdr
field defines the split position of packet, splitting will always happen
after the protocol header defined in the Rx packet segment. When Rx queue
offload RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT is enabled and corresponding
protocol header is configured, driver will split the ingress packets into
multiple segments.

Examples for proto_hdr field defines:
To split after ETH-IPV4-UDP, it should be defined as
proto_hdr = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
            RTE_PTYPE_L4_UDP

For inner ETH-IPV4-UDP, it should be defined as
proto_hdr = RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER |
            RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_INNER_L4_UDP

If the protocol header is repeated with the previously defined one,
the repeated part should be omitted. For example, split after ETH, ETH-IPV4
and ETH-IPV4-UDP, it should be defined as
proto_hdr0 = RTE_PTYPE_L2_ETHER
proto_hdr1 = RTE_PTYPE_L3_IPV4_EXT_UNKNOWN
proto_hdr2 = RTE_PTYPE_L4_UDP

If protocol header split can be supported by a PMD, the
rte_eth_buffer_split_get_supported_hdr_ptypes function can
be used to obtain a list of these protocol headers.

For example, let's suppose we configured the Rx queue with the
following segments:
        seg0 - pool0, proto_hdr0=RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4,
               off0=2B
        seg1 - pool1, proto_hdr1=RTE_PTYPE_L4_UDP, off1=128B
        seg2 - pool2, proto_hdr2=0, off1=0B

The packet consists of ETH_IPV4_UDP_PAYLOAD will be split like
following:
        seg0 - ipv4 header @ RTE_PKTMBUF_HEADROOM + 2 in mbuf from pool0
        seg1 - udp header @ 128 in mbuf from pool1
        seg2 - payload @ 0 in mbuf from pool2

Now buffer split can be configured in two modes. User can choose length
or protocol header to configure buffer split according to NIC's
capability. For length based buffer split, the mp, length, offset field
in Rx packet segment should be configured, while the proto_hdr field
must be 0. For protocol header based buffer split, the mp, offset,
proto_hdr field in Rx packet segment should be configured, while the
length field must be 0.

Note: When protocol header split is enabled, NIC may receive packets
which do not match all the protocol headers within the Rx segments.
At this point, NIC will have two possible split behaviors according to
matching results, one is exact match, another is longest match.
The split result of NIC must belong to one of them.

The exact match means NIC only do split when the packets exactly match all
the protocol headers in the segments. Otherwise, the whole packet will be
put into the last valid mempool. The longest match means NIC will do split
until packets mismatch the protocol header in the segments. The rest will
be put into the last valid pool.

Pseudo-code for exact match:
FOR each seg in segs except last one
    IF proto_hdr is not matched THEN
        BREAK
    END IF
END FOR
IF loop breaked THEN
    put whole pkt in last seg
ELSE
    put protocol header in each seg
    put everything else in last seg
END IF

Pseudo-code for longest match:
FOR each seg in segs except last one
    IF proto_hdr is matched THEN
        put protocol header in seg
    ELSE
        BREAK
    END IF
END FOR
put everything else in last seg

Signed-off-by: Yuan Wang <yuanx.wang@intel.com>
Signed-off-by: Xuan Ding <xuan.ding@intel.com>
Signed-off-by: Wenxuan Wu <wenxuanx.wu@intel.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
2022-10-09 16:41:27 +02:00
Yuan Wang
e4e6f4cbf9 ethdev: introduce protocol header API
Add a new ethdev API to retrieve supported protocol headers
of a PMD, which helps to configure protocol header based buffer split.

Signed-off-by: Yuan Wang <yuanx.wang@intel.com>
Signed-off-by: Xuan Ding <xuan.ding@intel.com>
Signed-off-by: Wenxuan Wu <wenxuanx.wu@intel.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
2022-10-09 16:41:24 +02:00
Ivan Malov
59c6aadedd doc: clarify deprecation status for flow actions PF and VF
These actions have been deprecated since DPDK 21.11 as
ambiguous and hard-to-use, but their removal might not
be popular because net drivers i40e, ixgbe and txgbe
employ these actions in complicated "PF/VF + QUEUE"
tunnel rule support. Maintainers of these drivers
should voice their attitude to the said problem.

For now, document the status in deprecation notes.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
2022-10-09 19:36:19 +02:00
Gagandeep Singh
ccb55a5088 doc: remove DPAA2 cmdif raw driver deprecation notice
In commit [1], It was announced to remove the DPAA2 cmdif
raw driver as there was no active user known at that time.
But now, one of the DPAA2 user has objected this driver
removal so in this patch, removing the deprecation notice
for the driver.

[1] commit 10f0e51554 ("doc: announce removal of DPAA2 cmdif raw driver")

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
2022-10-09 19:16:33 +02:00
Akhil Goyal
b7f15d955c doc: remove deprecation notice for IPsec events
The IPsec SA expiry events were added as per below patch,
but the deprecation notice was not removed. This patch removed it.

Fixes: d1ce79d14b ("ethdev: add IPsec SA expiry event subtypes")

Signed-off-by: Akhil Goyal <gakhil@marvell.com>
2022-10-09 19:12:42 +02:00
Pablo de Lara
7babda4316 crypto/ipsec_mb: support all tag sizes for ZUC-EIA3-256
Add support for 8-byte and 16-byte tags for ZUC-EIA3-256.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2022-10-07 19:46:11 +02:00
Gowrishankar Muthukrishnan
64569ffa0f examples/fips_validation: add TDES parsing
Added function to parse algorithm for TDES CBC and ECB tests in JSON.

Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Acked-by: Brian Dooley <brian.dooley@intel.com>
2022-10-07 11:06:42 +02:00
Nicolas Chautru
4f08028c5e bbdev: expose queue related warning and status
Added parameters in rte_bbdev_queue_data to expose information
with regards to any queue related failure and warning
which cannot be supported in existing API.

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-10-07 08:44:58 +02:00
Nicolas Chautru
9d3933252d bbdev: add operation for FFT processing
Extended bbdev operations to support FFT based operations.

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-10-07 08:44:58 +02:00
Nicolas Chautru
53115a4e5d bbdev: add device info on queue topology
Added more options in the API to expose the number
of queues exposed and related priority.

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-10-07 08:44:58 +02:00
Nicolas Chautru
1be86f2e94 bbdev: add device status info
Added device status information, so that the PMD can
expose information related to the underlying accelerator device status.
Minor order change in structure to fit into padding hole.

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Acked-by: Mingshan Zhang <mingshan.zhang@intel.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-10-07 08:44:58 +02:00
Nicolas Chautru
e70212cc24 bbdev: allow operation type enum for growth
Updated the enum for rte_bbdev_op_type
to allow to keep ABI compatible for enum insertion
while adding padded maximum value for array need.
Removing RTE_BBDEV_OP_TYPE_COUNT and instead exposing
RTE_BBDEV_OP_TYPE_SIZE_MAX.

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-10-07 08:44:58 +02:00
Gerry Gribbon
b6aceada08 app/regex: add match mode option
Allows to specify match mode to be used.

Signed-off-by: Gerry Gribbon <ggribbon@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
2022-10-09 15:11:58 +02:00
Shijith Thotton
6771216c2f drivers: mark cnxk to support disabling IOVA as PA
Enabled the flag pmd_supports_disable_iova_as_pa in cnxk driver build
files as they work with IOVA as VA. Updated cn9k and cn10k soc build
configurations to disable the IOVA as PA build by default.

Signed-off-by: Shijith Thotton <sthotton@marvell.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2022-10-09 13:14:57 +02:00
Shijith Thotton
5812b32773 mbuf: move next pointer to first cache line if PA disabled
Swapped position of mbuf next pointer and second dynamic field (dynfield2)
if the build is configured to disable IOVA as PA.
This is to move the mbuf next pointer to first cache line.

Signed-off-by: Shijith Thotton <sthotton@marvell.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2022-10-09 13:14:57 +02:00
Hanumanth Pothula
458485eb21 ethdev: support multiple mbuf pools per Rx queue
Some of the HW has support for choosing memory pools based on the
packet's size.

This is often useful for saving the memory where the application
can create a different pool to steer the specific size of the
packet, thus enabling more efficient usage of memory.

For example, let's say HW has a capability of three pools,
 - pool-1 size is 2K
 - pool-2 size is > 2K and < 4K
 - pool-3 size is > 4K
Here,
        pool-1 can accommodate packets with sizes < 2K
        pool-2 can accommodate packets with sizes > 2K and < 4K
        pool-3 can accommodate packets with sizes > 4K

With multiple mempool capability enabled in SW, an application may
create three pools of different sizes and send them to PMD. Allowing
PMD to program HW based on the packet lengths. So that packets with
less than 2K are received on pool-1, packets with lengths between 2K
and 4K are received on pool-2 and finally packets greater than 4K
are received on pool-3.

Signed-off-by: Hanumanth Pothula <hpothula@marvell.com>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
2022-10-08 18:39:02 +02:00
Dariusz Sosnowski
230951555f app/testpmd: add hairpin queue memory modes
This patch extends hairpin-mode command line option of test-pmd
application with an ability to configure whether Rx/Tx hairpin queue
should use locked device memory or RTE memory.

For purposes of this configurations the following bits of 32 bit
hairpin-mode are reserved:

- Bit 8 - If set, then force_memory flag will be set for hairpin RX
  queue.
- Bit 9 - If set, then force_memory flag will be set for hairpin TX
  queue.
- Bits 12-15 - Memory options for hairpin Rx queue:
    - Bit 12 - If set, then use_locked_device_memory will be set.
    - Bit 13 - If set, then use_rte_memory will be set.
    - Bit 14 - Reserved for future use.
    - Bit 15 - Reserved for future use.
- Bits 16-19 - Memory options for hairpin Tx queue:
    - Bit 16 - If set, then use_locked_device_memory will be set.
    - Bit 17 - If set, then use_rte_memory will be set.
    - Bit 18 - Reserved for future use.
    - Bit 19 - Reserved for future use.

Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
2022-10-08 18:30:50 +02:00
Dariusz Sosnowski
f2d43ff54d net/mlx5: allow hairpin Rx queue in locked memory
This patch adds a capability to place hairpin Rx queue in locked device
memory. This capability is equivalent to storing hairpin RQ's data
buffers in locked internal device memory.

Hairpin Rx queue creation is extended with requesting that RQ is
allocated in locked internal device memory. If allocation fails and
force_memory hairpin configuration is set, then hairpin queue creation
(and, as a result, device start) fails. If force_memory is unset, then
PMD will fallback to allocating memory for hairpin RQ in unlocked
internal device memory.

To allow such allocation, the user must set HAIRPIN_DATA_BUFFER_LOCK
flag in FW using mlxconfig tool.

Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
2022-10-08 18:30:50 +02:00
Dariusz Sosnowski
7274b41756 net/mlx5: allow hairpin Tx queue in host memory
This patch adds a capability to place hairpin Tx queue in host memory
managed by DPDK. This capability is equivalent to storing hairpin SQ's
WQ buffer in host memory.

Hairpin Tx queue creation is extended with allocating a memory buffer of
proper size (calculated from required number of packets and WQE BB size
advertised in HCA capabilities).

force_memory flag of hairpin queue configuration is also supported.
If it is set and:

- allocation of memory buffer fails,
- or hairpin SQ creation fails,

then device start will fail. If it is unset, PMD will fallback to
creating the hairpin SQ with WQ buffer located in unlocked device
memory.

Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
2022-10-08 18:30:50 +02:00
Dariusz Sosnowski
bc705061cb ethdev: introduce hairpin memory capabilities
Before this patch, implementation details and configuration of hairpin
queues were decided internally by the PMD. Applications had no control
over the configuration of Rx and Tx hairpin queues, despite number of
descriptors, explicit Tx flow mode and disabling automatic binding.
This patch addresses that by adding:

- Hairpin queue capabilities reported by PMDs.
- New configuration options for Rx and Tx hairpin queues.

Main goal of this patch is to allow applications to provide
configuration hints regarding placement of hairpin queues.
These hints specify whether buffers of hairpin queues should be placed
in host memory or in dedicated device memory. Different memory options
may have different performance characteristics and hairpin configuration
should be fine-tuned to the specific application and use case.

This patch introduces new hairpin queue configuration options through
rte_eth_hairpin_conf struct, allowing to tune Rx and Tx hairpin queues
memory configuration. Hairpin configuration is extended with the
following fields:

- use_locked_device_memory - If set, PMD will use specialized on-device
  memory to store RX or TX hairpin queue data.
- use_rte_memory - If set, PMD will use DPDK-managed memory to store RX
  or TX hairpin queue data.
- force_memory - If set, PMD will be forced to use provided memory
  settings. If no appropriate resources are available, then device start
  will fail. If unset and no resources are available, PMD will fallback
  to using default type of resource for given queue.

If application chooses to use PMD default memory configuration, all of
these flags should remain unset.

Hairpin capabilities are also extended, to allow verification of support
of given hairpin memory configurations. Struct rte_eth_hairpin_cap is
extended with two additional fields of type rte_eth_hairpin_queue_cap:

- rx_cap - memory capabilities of hairpin RX queues.
- tx_cap - memory capabilities of hairpin TX queues.

Struct rte_eth_hairpin_queue_cap exposes whether given queue type
supports use_locked_device_memory and use_rte_memory flags.

Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
2022-10-08 18:22:01 +02:00
Ciara Loftus
1eb1846b1a net/af_xdp: make compatible with libbpf 0.8.0
libbpf v0.8.0 deprecates the bpf_get_link_xdp_id() and
bpf_set_link_xdp_fd() functions. Use meson to detect if
bpf_xdp_attach() is available and if so, use the recommended
replacement functions bpf_xdp_query_id(), bpf_xdp_attach()
and bpf_xdp_detach().

Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
2022-10-07 19:37:24 +02:00
Gagandeep Singh
afda343226 doc: add kernel version information in DPAA guide
DPAA driver has dependency on kernel to perform various functionalities.
So kernel and DPDK version should be compatible for proper working.

This patch updates the DPAA guide with the information that user can
refer to find the compatible kernel version.

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
2022-10-07 17:19:03 +02:00
Jerin Jacob
6b81dddbb9 ethdev: support congestion management
NIC HW controllers often come with congestion management support on
various HW objects such as Rx queue depth or mempool queue depth.

Also, it can support various modes of operation such as RED
(Random early discard), WRED etc on those HW objects.

Add a framework to express such modes(enum rte_cman_mode) and
introduce (enum rte_eth_cman_obj) to enumerate the different
objects where the modes can operate on.

Add RTE_CMAN_RED mode of operation and RTE_ETH_CMAN_OBJ_RX_QUEUE,
RTE_ETH_CMAN_OBJ_RX_QUEUE_MEMPOOL objects.

Introduce reserved fields in configuration structure
backed by rte_eth_cman_config_init() to add new configuration
parameters without ABI breakage.

Add rte_eth_cman_info_get() API to get the information such as
supported modes and objects.

Add rte_eth_cman_config_init(), rte_eth_cman_config_set() APIs
to configure congestion management on those object with associated mode.

Finally, add rte_eth_cman_config_get() API to retrieve the
applied configuration.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Sunil Kumar Kori <skori@marvell.com>
2022-10-07 11:50:28 +02:00
Dongdong Liu
092b701fe3 ethdev: introduce Rx/Tx descriptor dump API
Added the ethdev Rx/Tx desc dump API which provides functions for query
descriptor from device. HW descriptor info differs in different NICs.
The information demonstrates I/O process which is important for debug.
As the information is different between NICs, the new API is introduced.

Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
2022-10-06 18:38:48 +02:00
Long Li
afd5d17072 net/mana: support Rx interrupts
mana can receive Rx interrupts from kernel through RDMA verbs interface.
Implement Rx interrupts in the driver.

Signed-off-by: Long Li <longli@microsoft.com>
2022-10-06 10:49:00 +02:00
Long Li
e350b56889 net/mana: report queue statistics
Report packet statistics.

Signed-off-by: Long Li <longli@microsoft.com>
2022-10-06 10:49:00 +02:00
Long Li
eb9994dd16 net/mana: receive packets
With all the RX queues created, MANA can use those queues to receive
packets.

Signed-off-by: Long Li <longli@microsoft.com>
2022-10-06 10:49:00 +02:00
Long Li
410333da8b net/mana: start/stop Tx queues
MANA allocate device queues through the IB layer when starting Tx queues.
When device is stopped all the queues are unmapped and freed.

Signed-off-by: Long Li <longli@microsoft.com>
2022-10-06 10:49:00 +02:00
Long Li
a382177c13 net/mana: configure RSS
Currently this PMD supports RSS configuration when the device is stopped.
Configuring RSS in running state will be supported in the future.

Signed-off-by: Long Li <longli@microsoft.com>
2022-10-06 10:49:00 +02:00
Long Li
d878cb0950 net/mana: report device info
Add the function to get device info.

Signed-off-by: Long Li <longli@microsoft.com>
2022-10-06 10:49:00 +02:00
Long Li
bd15f237f2 net/mana: support device removal interrupts
MANA supports PCI hot plug events. Add this interrupt to DPDK core so its
parent PMD can detect device removal during Azure servicing or live
migration.

Signed-off-by: Long Li <longli@microsoft.com>
2022-10-06 10:49:00 +02:00
Long Li
21958568c4 net/mana: support link update
The carrier state is managed by the Azure host. MANA runs as a VF and
always reports "up".

Signed-off-by: Long Li <longli@microsoft.com>
2022-10-06 10:49:00 +02:00
Long Li
517ed6e2d5 net/mana: add basic driver with build environment
MANA is a PCI device. It uses IB verbs to access hardware through the
kernel RDMA layer. This patch introduces build environment and basic
device probe functions.

Signed-off-by: Long Li <longli@microsoft.com>
2022-10-06 10:49:00 +02:00
Chaoyong He
cf559c2a1d net/nfp: add flower PF Rx/Tx
For the Rx logic, fallback packets are multiplexed to the
correct representor port based on the prepended metadata.

For the Tx logic, because fallback packets are prepended
metadata, the start of the packet has to be adjusted for
in the Tx descriptor.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-05 18:09:21 +02:00
Chaoyong He
e1124c4f8a net/nfp: add flower representor framework
Adds the framework to support flower representors. The number of VF
representors are parsed from the command line. For physical port
representors the current logic aims to create a representor for
each physical port present on the hardware.

An eth_dev is created for each physical port and VF, and flower
firmware requires a MAC repr cmsg to be transmitted to firmware
with info about the number of physical ports configured.

Reify messages are sent to hardware for each physical port representor.
An rte_ring is also created per representor so that traffic can be
pushed and pulled to this interface.

To up and down the real device represented by a flower representor port
a port mod message is used to convey that info to the firmware. This
message will be used in the dev_ops callbacks of flower representors.

Each cmsg generated by the driver is prepended with a cmsg header.
This commit also adds the logic to fill in the header of cmsgs.

Also add the Rx and Tx path for flower representors. For Rx packets are
dequeued from the representor ring and passed to the eth_dev. For Tx
the first queue of the PF vNIC is used. Metadata about the representor
is added before the packet is sent down to firmware.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-05 18:09:21 +02:00
Chaoyong He
a36634e87e net/nfp: add flower ctrl VNIC Rx/Tx
Adds the Rx and Tx function for the ctrl VNIC. The logic is mostly
identical to the normal Rx and Tx functionality of the NFP PMD.

Make use of the ctrl VNIC service logic to service the ctrl vNIC Rx
path.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Signed-off-by: Heinrich Kuhn <heinrich.kuhn@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-05 18:09:21 +02:00
Chaoyong He
b188042195 net/nfp: add initial flower firmware support
Adds the basic probing infrastructure to support the flower firmware
application.

Adds the cpp service, used for some user tools.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Signed-off-by: Heinrich Kuhn <heinrich.kuhn@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
2022-10-05 18:09:21 +02:00