Commit Graph

1396 Commits

Author SHA1 Message Date
David Marchand
1094dd940e cleanup compat header inclusions
With symbols going though experimental/stable stages, we accumulated
a lot of discrepancies about inclusion of the rte_compat.h header.

Some headers are including it where unneeded, while others rely on
implicit inclusion.

Fix unneeded inclusions:
$ git grep -l include..rte_compat.h |
  xargs grep -LE '__rte_(internal|experimental)' |
  xargs sed -i -e '/#include..rte_compat.h/d'

Fix missing inclusion, by inserting rte_compat.h before the first
inclusion of a DPDK header:
$ git grep -lE '__rte_(internal|experimental)' |
  xargs grep -L include..rte_compat.h |
  xargs sed -i -e \
    '0,/#include..\(rte_\|.*pmd.h.$\)/{
      s/\(#include..\(rte_\|.*pmd.h.$\)\)/#include <rte_compat.h>\n\1/
    }'

Fix missing inclusion, by inserting rte_compat.h after the last
inclusion of a non DPDK header:
$ for file in $(git grep -lE '__rte_(internal|experimental)' |
  xargs grep -L include..rte_compat.h); do
    tac $file > $file.$$
    sed -i -e \
      '0,/#include../{
        s/\(#include..*$\)/#include <rte_compat.h>\n\n\1/
      }' $file.$$
    tac $file.$$ > $file
    rm $file.$$
  done

Fix missing inclusion, by inserting rte_compat.h after the header guard:
$ git grep -lE '__rte_(internal|experimental)' |
  xargs grep -L include..rte_compat.h |
  xargs sed -i -e \
    '0,/#define/{
      s/\(#define .*$\)/\1\n\n#include <rte_compat.h>/
    }'

And finally, exclude rte_compat.h itself.
$ git checkout lib/eal/include/rte_compat.h

At the end of all this, we have a clean tree:
$ git grep -lE '__rte_(internal|experimental)' |
  xargs grep -L include..rte_compat.h
buildtools/check-symbols.sh
devtools/checkpatches.sh
doc/guides/contributing/abi_policy.rst
doc/guides/rel_notes/release_20_11.rst
lib/eal/include/rte_compat.h

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
2022-11-15 08:39:14 +01:00
Arek Kusztal
29d5bf63ed common/qat: fix undefined initial slice
This commit fixes undefined initial value of slice capability.
When unset it could lead to undefined read of capability due to
stack frame picked values, is should therefore be set to 0.

Fixes: b3cbbcdffa ("common/qat: read HW slice configuration")

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Kai Ji <kai.ji@intel.com>
2022-11-08 06:15:47 +01:00
Mingxia Liu
e50a35edbe common/idpf/base: fix possible null dereference
Coverity is reporting FORWARD_NULL issue when msg.ctx.indirect.payload
is NULL. Adding NULL check for this.

Coverity issue: 381689
Fixes: fb4ac04e9b ("common/idpf: introduce common library")

Signed-off-by: Mingxia Liu <mingxia.liu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2022-11-09 16:52:54 +01:00
Mingxia Liu
4138a5a28f common/idpf/base: fix tainted scalar
Passing tainted expression "msg.data_len" to
"rte_memcpy", which uses it as a loop boundary.

Replace tainted expression with a temp variable
to avoid the tainted scalar coverity warning.

Coverity issue: 381688
Fixes: fb4ac04e9b ("common/idpf: introduce common library")

Signed-off-by: Mingxia Liu <mingxia.liu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2022-11-09 16:49:51 +01:00
Beilei Xing
b5d9a99e32 common/idpf/base: add readme file
This patch adds README for idpf base code.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2022-11-09 11:10:59 +01:00
Gregory Etelson
6b3c67212f common/mlx5: fix DevX register read error severity
PMD attempt to read HW UTC counter properties can fail because the feature
has no support in port FW or mlx5 kernel module.

In that case PMD still can produce correct time-stamps if it runs on core
with nanosecond time resolution.

Fixes: b006786095 ("common/mlx5: update log for DevX general command failure")
Cc: stable@dpdk.org

Reported-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Acked-by: David Marchand <david.marchand@redhat.com>
2022-11-10 18:16:48 +01:00
Gregory Etelson
aeca11f82a common/mlx5: fix shared mempool subscription
MLX5 PMD counted each mempool subscribe invocation. The PMD expected
that the mempool subscription will be deleted after the mempool
counter dropped to 0. However, current PMD design unsubscribes mempool
callbacks only once.
As the result, the PMD destroyed mlx5_common_device but kept
shared RX subscription callback. EAL tried to activate that callback
and crashed.

The patch removes mempool subscriptions counter.
The PMD registers mempool subscription once only. An attempt
to register existing subscription returns EEXIST.
Also, the PMD expects to remove subscription when mempool unsubscribe
was activated.

Fixes: 8ad97e4b32 ("common/mlx5: fix multi-process mempool registration")
Cc: stable@dpdk.org

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
2022-11-10 18:15:47 +01:00
Abdullah Ömer Yamaç
7dde9c844a drivers: omit symbol map when unneeded
In this patch, we removed the necessity of the version files and
you don't need to update these files for each release, you can just
remove them.

Suggested-by: Ferruh Yigit <ferruh.yigit@amd.com>
Signed-off-by: Abdullah Ömer Yamaç <omer.yamac@ceng.metu.edu.tr>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Ferruh Yigit <ferruh.yigit@amd.com>
2022-11-14 15:22:46 +01:00
Junfeng Guo
fb4ac04e9b common/idpf: introduce common library
Introduce common library for IDPF (Infrastructure Data
Path Function) PMD.
Add base code and OS specific implementation first.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
2022-10-31 11:45:54 +01:00
Arek Kusztal
60fe006fde crypto/qat: add ECDH public key verification
This commit adds verification option for elliptic curve
points when used along ECDH algorithm.

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Kai Ji <kai.ji@intel.com>
2022-10-29 13:01:41 +02:00
Arek Kusztal
d4f17d6b6c crypto/qat: make immutable parameters constant
All pointers passed to functions that are not supposed
to have its data changed should be marked as constant.

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Kai Ji <kai.ji@intel.com>
2022-10-29 13:01:41 +02:00
Vidya Sagar Velumuri
729085b508 common/cnxk: generate MD5 ipad opad
Add support to generate ipad and opad for MD5.
Skip the call to additional command WRITE_SA during SA creation.
Instead use the software defined function to generate opad and ipad.

Signed-off-by: Vidya Sagar Velumuri <vvelumuri@marvell.com>
2022-10-29 13:01:40 +02:00
Vidya Sagar Velumuri
39ae58f294 common/cnxk: support custom UDP port values
Added support for custom port values for UDP encapsulation.

Signed-off-by: Vidya Sagar Velumuri <vvelumuri@marvell.com>
2022-10-29 13:01:40 +02:00
Tejasree Kondoj
7c19abdd0c common/cnxk: support 103XX CPT
Added support for 103XX CPT variant.

Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
2022-10-29 13:01:40 +02:00
Tejasree Kondoj
cb6bfc96c3 crypto/cnxk: update capabilities as per firmware
Updated CPT engine capabilities structure as per microcode.

Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
2022-10-29 13:01:40 +02:00
Tejasree Kondoj
48c551761b common/cnxk: set in-place bit of lookaside IPsec
Set inplace bit of lookaside IPsec and
remove rptr population in datapath.

Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
2022-10-29 13:01:40 +02:00
Arek Kusztal
b3cbbcdffa common/qat: read HW slice configuration
Read slice configuration of QAT capabilities.
This will allow to recognize if specific hw function
is available on particular generation of device.
Added function pointers for each QAT generations.

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Kai Ji <kai.ji@intel.com>
2022-10-29 13:01:40 +02:00
Srujana Challa
068d2647da common/cnxk: add CPT LF reset sequence
Adds code to reset CPT LF as part of cpt_lf_fini.

Signed-off-by: Srujana Challa <schalla@marvell.com>
2022-10-29 13:01:38 +02:00
Thomas Monjalon
487599f121 common/mlx5: move build config initialization and check
The variable mlx5_config may be used by other mlx5 drivers
and should be always initialized.
By moving its initialization (with configuration file generation),
it is made consistent for Linux and Windows builds.

And the check of mlx5_config in net/mlx5 is moved at the top of
net/mlx5/hws/meson.build so HWS requirements are in the right context.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Tested-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Acked-by: Alex Vesker <valex@nvidia.com>
2022-10-30 15:55:46 +01:00
Sunil Kumar Kori
28b3ca7b9c common/cnxk: fix channel to BPID mapping
As per recent change in Linux-5.4.x AF driver, mailbox is updated to
configure mapping between channel and BPID.
Due to mbox mismatch, PFC was broken. Patch syncs mailbox definition
for the same. Also fixes the PFC configuration issues.

Fixes: ff1400aa9d ("net/cnxk: add receive channel backpressure for SDP")
Cc: stable@dpdk.org

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
2022-10-18 12:59:55 +02:00
Satha Rao
d7bde0454c common/cnxk: set hysteresis bit to one
Setting non zero FC_HYST_BITS to reduce mesh traffic to
reduce system resources.

Signed-off-by: Satha Rao <skoteshwar@marvell.com>
2022-10-18 12:59:55 +02:00
Satha Rao
902a4c02e2 common/cnxk: sync NIX HW info mbox structure with kernel
Sync nix_hw_info structure with kernel.

Maintain default RR_QUANTUM for VF TL2 same as kernel to make
equal distribution among all VFs.

Signed-off-by: Satha Rao <skoteshwar@marvell.com>
2022-10-18 12:59:55 +02:00
Satha Rao
1669a84d57 common/cnxk: fix schedule weight update
Each TX schedule config mail box supports a maximum 20 register updates.
This patch will send node weight updates in multiple mailboxes when
TM is created with more than 20 scheduler nodes.

Fixes: 464c9f9193 ("common/cnxk: support NIX TM dynamic update")
Cc: stable@dpdk.org

Signed-off-by: Satha Rao <skoteshwar@marvell.com>
2022-10-18 12:59:24 +02:00
Nithin Dabilpuram
5781638519 common/cnxk: fix RQ mask config for CN10KB chip
RQ mask config needs to enable SPB_ENA in order for zero for
being able to override it with meta AURA.

Also fix flow control config to catch invalid rxchan config
errors.

Fixes: ddf955d391 ("common/cnxk: support CPT second pass")
Fixes: da57d4589a ("common/cnxk: support NIX flow control")
Cc: stable@dpdk.org

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2022-10-18 12:37:35 +02:00
Nithin Dabilpuram
b354dc053a net/cnxk: use NIX Tx offset for CN10KB
In outbound inline case, use NIX Tx offset instead of
NIX Tx address for cn10kb as per new instruction format.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2022-10-18 12:36:54 +02:00
Nithin Dabilpuram
aa728ea474 common/cnxk: add soft expiry poll frequency argument
Add support to override soft expiry poll frequency via devargs.
Also provide helper API to indicate reassembly support on a chip
and documentation for devargs that are already present.

Fixes: 780b9c8924 ("net/cnxk: support zero AURA for inline meta")

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2022-10-18 12:36:21 +02:00
Sathesh Edara
e98f583129 common/cnxk: set MTU size on SDP based on SoC type
Set maximum frame size on SDP NIX side to 16KB for CN93 A0 and B0,
CNF95N A0 and CNF95O A0 SOC type. Rest of the SoCs SDP NIX to 64KB.

Signed-off-by: Sathesh Edara <sedara@marvell.com>
2022-10-18 12:35:51 +02:00
Sunil Kumar Kori
5df46167ca common/cnxk: support congestion management ROC API
Add support for congestion management RoC APIs.

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
2022-10-12 08:41:48 +02:00
Michael Baum
5fb0c63d6d common/mlx5: fix null check in devargs parsing
The common MLX5 probe function parses first the devargs and save them in
a dictionary.
It gets structure called "devargs" as a member of EAL device containing
all needed information.

When "devargs" structure is invalid, the function avoids parsing it.
However, when it valid but its field "args" is invalid, the function
tries to parse it and dereference to NULL pointer.

This patch adds check to avoid this NULL dereferencing.

Fixes: a729d2f093 ("common/mlx5: refactor devargs management")
Cc: stable@dpdk.org

Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
2022-10-26 13:33:45 +02:00
Xiaoyu Min
4d368e1da3 net/mlx5: support flow counter action for HWS
This commit adds HW steering counter action support.
The pool mechanism is the basic data structure for the HW steering
counter.

The HW steering's counter pool is based on the rte_ring of zero-copy
variation.

There are two global rte_rings:
1. free_list:
     Store the counters indexes, which are ready for use.
2. wait_reset_list:
     Store the counters indexes, which are just freed from the user and
     need to query the hardware counter to get the reset value before
     this counter can be reused again.

The counter pool also supports cache per HW steering's queues, which are
also based on the rte_ring of zero-copy variation.

The cache can be configured in size, preload, threshold, and fetch size,
they are all exposed via device args.

The main operations of the counter pool are as follows:

 - Get one counter from the pool:
   1. The user call _get_* API.
   2. If the cache is enabled, dequeue one counter index from the local
      cache:
      2. A: if the dequeued one from the local cache is still in reset
        status (counter's query_gen_when_free is equal to pool's query
        gen):
        I. Flush all counters in the local cache back to global
           wait_reset_list.
        II. Fetch _fetch_sz_ counters into the cache from the global
            free list.
        III. Fetch one counter from the cache.
   3. If the cache is empty, fetch _fetch_sz_ counters from the global
      free list into the cache and fetch one counter from the cache.
 - Free one counter into the pool:
   1. The user calls _put_* API.
   2. Put the counter into the local cache.
   3. If the local cache is full:
      A: Write back all counters above _threshold_ into the global
         wait_reset_list.
      B: Also, write back this counter into the global wait_reset_list.

When the local cache is disabled, _get_/_put_ cache directly from/into
global list.

Signed-off-by: Xiaoyu Min <jackmin@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
2022-10-26 13:33:39 +02:00
Suanming Mou
0f4aa72b99 net/mlx5: support flow modify field with HWS
This patch introduces support for modify_field rte_flow actions in HWS
mode that includes:
	- Ingress and egress domains,
	- SET and ADD operations,
	- usage of arbitrary bit offsets and widths for packet and metadata
	  fields.

This is implemented in two phases:
1. On flow table creation the hardware commands are generated, based
   on rte_flow action templates, and stored alongside action template.

2. On flow rule creation/queueing the hardware commands are updated with
   values provided by the user. Any masks over immediate values, provided
   in action templates, are applied to these values before enqueueing rules
   for creation.

Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
2022-10-26 13:33:38 +02:00
Alex Vesker
22681deead net/mlx5/hws: enable hardware steering
Replace stub implementation of HWS with mlx5dr code.

Signed-off-by: Alex Vesker <valex@nvidia.com>
2022-10-26 13:33:36 +02:00
Alex Vesker
c467608215 net/mlx5/hws: add matcher object
HWS matcher resides under the table object, each table can
have multiple chained matches with different attributes.

Each matcher represents a combination of match and action templates,
and can contain multiple configurations based on the templates.

Packets are steered from the table to the matcher and from there to
other objects.

The matcher allows efficient HW packet field matching and action
execution based on the configuration done to it.

Signed-off-by: Alex Vesker <valex@nvidia.com>
Signed-off-by: Erez Shitrit <erezsh@nvidia.com>
2022-10-26 13:33:34 +02:00
Erez Shitrit
365cdf5f8c net/mlx5/hws: add command layer
This adds the command layer which is used to communicate with
the FW, to query capabilities and allocate FW resources needed
for HWS.

Signed-off-by: Erez Shitrit <erezsh@nvidia.com>
Signed-off-by: Alex Vesker <valex@nvidia.com>
2022-10-26 13:33:32 +02:00
Alex Vesker
dfceca7e7e common/mlx5: add glue functions for hardware steering
Add missing glue support for the HWS mlx5dr layer.
The new glue functions are needed for mlx5dv to create
matcher and action, which are used as the kernel root
table as well as for capabilities query like device
name and port info.

Signed-off-by: Alex Vesker <valex@nvidia.com>
2022-10-26 13:33:32 +02:00
Bing Zhao
5f44fb1958 common/mlx5: query capability of registers
Add new fields to flow table capabilities to query the capabilities to
set, add, and copy to REG_C_x.
The set capability is queried and saved for future usage.

Signed-off-by: Bing Zhao <bingz@nvidia.com>
2022-10-26 13:33:31 +02:00
Michael Savisko
80f998da1d common/mlx5: add send to kernel flow action
Add new glue callback dr_create_flow_action_send_to_kernel.
Default callback invokes mlx5dv_dr_action_create_dest_root_table().

Add static inline mlx5_flow_os_create_flow_action_send_to_kernel(),
which calls dr_create_flow_action_send_to_kernel glue callback.

Define HAVE_MLX5DV_DR_ACTION_CREATE_DEST_ROOT_TABLE macro if function
mlx5dv_dr_action_create_dest_root_table exists in infiniband/mlx5dv.h

Signed-off-by: Michael Savisko <michaelsav@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
2022-10-26 13:33:28 +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
Dmitry Kozlyuk
8ad97e4b32 common/mlx5: fix multi-process mempool registration
The `mp_cb_registered` flag shared between all processes
was used to ensure that for any IB device (MLX5 common device)
mempool event callback was registered only once
and mempools that had been existing before the device start
were traversed only once to register them.
Since mempool callback registrations have become process-private,
callback registration must be done by every process.
The flag can no longer reflect the state for any single process.
Replace it with a registration counter to track
when no more callbacks are registered for the device in any process.
It is sufficient to only register pre-existing mempools
in the primary process because it is the one that starts the device.

Fixes: 690b2a88c2 ("common/mlx5: add mempool registration facilities")
Cc: stable@dpdk.org

Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
2022-10-10 16:38:15 +02:00
Gowrishankar Muthukrishnan
8e39b13323 crypto/cnxk: support fixed point multiplication
Add fixed point multiplication for EC curve in CNXK.

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
2022-10-07 19:46:11 +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
Dariusz Sosnowski
f9fe5a5bb1 common/mlx5: add hairpin RQ buffer type capabilities
This patch adds new HCA capability related to hairpin RQs. This new
capability, hairpin_data_buffer_locked, indicates whether HCA supports
locking data buffer of hairpin RQ in ICMC (Interconnect Context Memory
Cache).

Struct used to define RQ configuration (RQ context) is extended with
hairpin_data_buffer_type field, which configures data buffer for hairpin
RQ. It can take the following values:

- MLX5_RQC_HAIRPIN_DATA_BUFFER_TYPE_UNLOCKED_INTERNAL_BUFFER - hairpin
  RQ's data buffer is stored in unlocked memory in ICMC.
- MLX5_RQC_HAIRPIN_DATA_BUFFER_TYPE_LOCKED_INTERNAL_BUFFER - hairpin
  RQ's data buffer is stored in locked memory in ICMC.

Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
2022-10-08 18:22:18 +02:00
Dariusz Sosnowski
e58c372d76 common/mlx5: add hairpin SQ buffer type capabilities
This patch extends HCA_CAP and SQ Context structs available in PRM. This
fields allow checking if NIC supports storing hairpin SQ's WQ buffer in
host memory and configuring such memory placement.

HCA capabilities are extended with the following fields:

- hairpin_sq_wq_in_host_mem - If set, then NIC supports using host
memory as a backing storage for hairpin SQ's WQ buffer.
- hairpin_sq_wqe_bb_size - Indicates the required size of SQ WQE basic
block.

SQ Context is extended with hairpin_wq_buffer_type which informs
NIC where SQ's WQ buffer will be stored. This field can take the
following values:

- MLX5_SQC_HAIRPIN_WQ_BUFFER_TYPE_INTERNAL_BUFFER - WQ buffer will be
  stored in unlocked device memory.
- MLX5_SQC_HAIRPIN_WQ_BUFFER_TYPE_HOST_MEMORY - WQ buffer will be stored
  in host memory. Buffer is provided by PMD.

Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
2022-10-08 18:22:08 +02:00
Abhimanyu Saini
05308e34bf common/sfc_efx/base: use avail and used terms for indexes
Change cidx and pidx definition to mean used queue and avail
queue index respectively.

Signed-off-by: Abhimanyu Saini <absaini@amd.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
2022-10-04 17:22:56 +02:00
Abhimanyu Saini
86a18c4aa6 common/sfc_efx/base: update MCDI headers
Pickup new FW interface definitions for avail and used indexes.

Signed-off-by: Abhimanyu Saini <absaini@amd.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
2022-10-04 17:17:16 +02:00
Abhimanyu Saini
93211a52a6 common/sfc_efx/base: remove VQ index check during VQ start
The used/avail queue indexes are not bound by queue size,
because HW calculates descriptor entry index by performing
a simple modulo between queue index and queue_size.

So, do not check initial used and avail queue indexes
against queue size because it is possible for these
indexes to be greater than queue size in the
following cases:
1) The queue is created to be migrated into, or
2) The client issues a qstop/qstart after running datapath

Fixes: 4dda72dbde ("common/sfc_efx/base: add base virtio support for vDPA")
Cc: stable@dpdk.org

Signed-off-by: Abhimanyu Saini <absaini@amd.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
2022-10-04 17:16:01 +02:00
Radha Mohan Chintakuntla
681851b347 dma/cnxk: support CN10K DMA engine
Added support for CN10K SoC DMA engine to dmadev.

Signed-off-by: Radha Mohan Chintakuntla <radhac@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
2022-10-03 19:22:30 +02:00
Arek Kusztal
75fd4bbc94 crypto/qat: support SM3 hash algorithm
Added support for ShangMi 3 (SM3) hash algorithm.

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
2022-10-02 20:33:24 +02:00
Ivan Malov
61b3e9e79a common/sfc_efx/base: report maximum Rx data count
Such information is useful to client drivers which deal with
large Rx pool buffers (16-bit wide data count) and thus need
to avoid overflow when setting EF10's 14-bit wide data count.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
2022-09-28 11:51:39 +02:00
Ivan Malov
79b0c19261 common/sfc_efx/base: fix maximum Tx data count
Maximum data count of a Tx descriptor is advertised to users,
however, this value is mistakenly derived from the Rx define.
Use the Tx one instead. The resulting value will be the same.

Fixes: 1e43fe3cb4 ("net/sfc/base: separate limitations on Tx DMA descriptors")
Cc: stable@dpdk.org

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
2022-09-28 11:51:39 +02:00