Commit Graph

1135 Commits

Author SHA1 Message Date
Archana Muniganti
5824580017 crypto/cnxk: support inner checksum
Add inner checksum support for cn10k.

Signed-off-by: Archana Muniganti <marchana@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2021-10-08 21:40:16 +02:00
Archana Muniganti
e705d30552 crypto/cnxk: use IE engine group for IPsec
Use IE engine group for cn9k IPsec.

Signed-off-by: Archana Muniganti <marchana@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
2021-10-08 21:31:07 +02:00
Tejasree Kondoj
7bf4413d5e crypto/octeontx2: fix lookaside IPsec capabilities
Adding cbc, sha1-hmac and sha256-hmac to lookaside IPsec capabilities.

Fixes: 8f685ec2d5 ("crypto/octeontx2: support AES-CBC SHA1-HMAC")
Fixes: 61baeec468 ("crypto/octeontx2: support AES-CBC SHA256-128-HMAC")
Cc: stable@dpdk.org

Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
2021-10-08 21:31:07 +02:00
Akhil Goyal
7bfca3894a crypto/octeontx2: update minimum headroom and tailroom
The driver consume 208B of tailroom but has min requirement
as 8B and headroom needed is 48B, but minimum requirement
is set as 24B. This patch correct minimum requirements
which application should honour.

Signed-off-by: Akhil Goyal <gakhil@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
2021-10-08 21:31:07 +02:00
Vidya Sagar Velumuri
29742632ac crypto/cnxk: support ZUC with 256-bit key
Added support for 256 bit key length for ZUC in
crypto_cn10k PMD.
Added support for digest length of 8 and 16 bytes
for ZUC with 256 bit key length.

Signed-off-by: Vidya Sagar Velumuri <vvelumuri@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2021-10-08 21:31:07 +02:00
Tejasree Kondoj
2d5ca27281 common/cnxk: support UDP port verification
Adding support to verify UDP encapsulation ports
in IPsec inbound.

Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2021-10-08 21:31:07 +02:00
Raja Zidane
f9213ab12c common/mlx5: share DevX queue pair operations
Currently drivers using QP (vDPA, crypto and compress, regex soon)
manage their memory, creation, modification and destruction of the QP,
in almost identical code.
Move QP memory management, creation and destruction to common.
Add common function to change QP state to RTS.
Add user_index attribute to QP creation.
It's for better code maintenance and reuse.

Signed-off-by: Raja Zidane <rzidane@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
2021-10-05 18:15:40 +02:00
Tejasree Kondoj
07d4bde1c0 common/cnxk: support tunnel header verification
Added support to verify tunnel header in IPsec inbound.

Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2021-09-28 17:49:10 +02:00
Anoob Joseph
30ce834f2c crypto/octeontx2: add checks for life configuration
Lifetime tracking is not supported by hardware and is not implemented in
software either. Return failure when lifetime is configured.

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2021-09-28 14:12:35 +02:00
Anoob Joseph
c4fcfaa742 common/cnxk: support lifetime configuration
Add support for SA lifetime configuration. Expiry can
be either in units of octets or packets.

Also, updated cryptodev dequeue path to update crypto op result to
indicate soft expiry.

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2021-09-28 14:12:14 +02:00
Tejasree Kondoj
c7c7f34739 crypto/cnxk: add IV in SA in lookaside IPsec debug mode
Adding IV in SA in lookaside IPsec debug mode. It helps
to verify lookaside PMD using known outbound vectors in
lookaside autotest.

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2021-09-28 13:36:07 +02:00
Michael Baum
be5aa65c26 crypto/mlx5: fix indirect mkey cleaning
The driver creates an indirect mkey per entry in the queue to manage the
crypto operation using the BSF fields.

The indirect mkeys were never released neither while error occurs in the
creation phase nor when the queue is released.

Clean the indirect mkeys in the above cases.

Fixes: c2a42d19d9 ("crypto/mlx5: add WQE set initialization")
Cc: stable@dpdk.org

Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
2021-09-28 08:43:57 +02:00
Tal Shnaiderman
427ec3346d crypto/mlx5: fix queue indexing
The crypto QP consumer (ci) and producer (pi) indexes are increased
with each successful enqueue/dequeue operations.

However the QP pi index is calculated with a wraparound the number
of elements while the QP ci does not.

This is causing incorrect engine calculation for encqueued WQ values
(wq->pi - wq->ci) and eventually the device stops accepting new enqueue
operations.

Fixed by removing the wraparound on QP pi and using a temp calculation
where wraparound values are needed.

Fixes: 8e196c08ab ("crypto/mlx5: support enqueue/dequeue operations")
Cc: stable@dpdk.org

Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
2021-09-28 08:43:57 +02:00
David George
c9902a15bd common/cpt: rework pending queue
Replace pending queue with one that allows concurrent single producer and
single consumer. This relaxes the restriction of only allowing a single
lcore to operate on a given queue pair.

Signed-off-by: David George <david.george@sophos.com>
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
2021-09-28 08:43:57 +02:00
Gagandeep Singh
93e2661efb crypto/dpaa_sec: support PDCP short MAC-I
This patch add PDCP security short MAC-I support for
dpaa_sec driver.

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2021-09-08 17:20:30 +02:00
Gagandeep Singh
3d1037e92a crypto/dpaa2_sec: support PDCP short MAC-I
This patch add PDCP short mac support in dpaa2_sec driver.

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2021-09-08 16:56:56 +02:00
Hemant Agrawal
45e019608f crypto/dpaa2_sec: support integrity only PDCP
To support short MAC-I, integrity only case is required
to be supported for PDCP.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
2021-09-08 16:52:02 +02:00
Hemant Agrawal
4f6cfd1393 crypto/dpaa2_sec: add error packet counters
This patch add support to also counter err pkt counter per queue.
This also enhances few related debug prints.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2021-09-08 12:12:03 +02:00
Franck Lenormand
ebc27d1b68 crypto/dpaa_sec: force inline keys to save space
This patch improve storage and performance by force inline
of the keys.

Signed-off-by: Franck Lenormand <franck.lenormand@nxp.com>
Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2021-09-08 12:11:45 +02:00
Franck Lenormand
81eb760d22 common/dpaax/caamflib: remove some inline keys
The space in descriptor buffer is scarce as it is limited to
64 words for platforms except ERA10 (which has 128).

As the descriptors are processed with QI, it adds some words
to the descriptor which is passed.

Some descriptors used for SDAP were using too much words reaching
the limit.

This patch reduces the number of words used by removing the inlining
of some keys (done for performance) in order to have working
descriptors.

Signed-off-by: Franck Lenormand <franck.lenormand@nxp.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2021-09-08 12:10:43 +02:00
Gagandeep Singh
2ed12d9b63 crypto/dpaa_sec: support AES-CMAC integrity check
This patch adds support for AES_CMAC integrity
in non-security mode.

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2021-09-08 12:08:10 +02:00
Gagandeep Singh
66f95673b9 crypto/dpaa_sec: support AES-XCBC-MAC
This patch adds support for AES-XCBC-MAC algo.

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2021-09-08 10:13:52 +02:00
Gagandeep Singh
4c42352c30 crypto/dpaa_sec: support non-HMAC auth algos
This patch add support for non-HMAC, md5, shax algos.

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2021-09-08 10:12:35 +02:00
Gagandeep Singh
3e4fbc6c9e crypto/dpaa_sec: support DES-CBC
add DES-CBC support and enable available cipher-only
test cases.

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2021-09-08 10:10:50 +02:00
Akhil Goyal
af668035f7 cryptodev: expose driver interface as internal
The rte_cryptodev_pmd.* files are for drivers only and should be
private to DPDK, and not installed for app use.

Signed-off-by: Akhil Goyal <gakhil@marvell.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2021-09-08 09:35:12 +02:00
Archana Muniganti
d38febb08d crypto/cnxk: add feature flag for cn9k lookaside IPsec
Update device feature flag to support lookaside IPsec for
cn9k.

Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
Signed-off-by: Archana Muniganti <marchana@marvell.com>
Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
2021-09-07 20:19:28 +02:00
Archana Muniganti
64d415e0ac crypto/cnxk: update tailroom requirement
Update min tailroom to reflect IPsec additions.
PMD crypto_cn9k & crypto_cn10k would have packet
grow into tailroom post IPsec processing.

Signed-off-by: Archana Muniganti <marchana@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
2021-09-07 20:11:00 +02:00
Archana Muniganti
67a87e8956 crypto/cnxk: add cn9k lookaside IPsec datapath
Adds support for cn9k lookaside enqueue and dequeue
operations.

Signed-off-by: Archana Muniganti <marchana@marvell.com>
Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
2021-09-07 20:09:24 +02:00
Archana Muniganti
38f66464c6 crypto/cnxk: add cn9k security session operations
Add security session ops.

Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
Signed-off-by: Archana Muniganti <marchana@marvell.com>
Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
2021-09-07 20:09:14 +02:00
Archana Muniganti
4cbef1e936 crypto/cnxk: add cn9k security context
Add security ctx in cn9k crypto PMD.

Signed-off-by: Archana Muniganti <marchana@marvell.com>
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
2021-09-07 19:36:35 +02:00
Ciara Power
589f5e033d crypto/openssl: fix CCM processing 0 length source
When given a source length 0 for CCM, the encryption and decryption
functions did not call the EVP_ENCRYPTUPDATE/EVP_DECRYPTUPDATE functions
with a src and dst, causing some FIPS validation failures for testcases
with PLen=0:

process_openssl_auth_encryption_ccm() line 1131:
Process openssl auth encryption ccm failed

Fixes: 1a4998dc4d ("crypto/openssl: support AES-CCM")
Cc: stable@dpdk.org

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
2021-09-06 21:54:57 +02:00
Anoob Joseph
962bbb0b7f crypto/cnxk: add dual submission in cn9k
Submit two instructions with one LMTST operation.
Also updated dequeue path to have local var for constants.

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2021-09-06 21:46:34 +02:00
Vidya Sagar Velumuri
c3c26fc30c crypto/cnxk: support ucode API change
Add support for API changes in ucode 1.13

Signed-off-by: Vidya Sagar Velumuri <vvelumuri@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2021-09-06 21:46:34 +02:00
Anoob Joseph
516f595a63 crypto/cnxk: remove redundant assignment
The assignment to -1 is not required. Remove the same.

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2021-09-06 21:46:34 +02:00
Anoob Joseph
dd56077573 crypto/cnxk: remove redundant memcpy of IV for ZUC
Swap is not required for ZUC. Update IV updation
sequence to remove the redundant swap in case of ZUC.

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2021-09-06 21:46:34 +02:00
Anoob Joseph
28b569218a crypto/cnxk: remove redundant SNOW3G decrypt
The opcode for encryption & decryption is the
same and single routine would be able to handle
both encryption and decryption operations.

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2021-09-06 21:46:34 +02:00
Michael Baum
460756f95b crypto/mlx5: fix timestamp format configuration
This patch adds support for the timestamp format settings for
the receive and send queues. If the firmware version x.30.1000
or above is installed and the NIC timestamps are configured
with the real-time format, the default zero values for newly
added fields cause the queue creation to fail.

The patch queries the timestamp formats supported by the hardware
and sets the configuration values in queue context accordingly.

Fixes: 6152534e21 ("crypto/mlx5: support queue pairs operations")
Cc: stable@dpdk.org

Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
2021-09-06 21:46:34 +02:00
Shijith Thotton
a200e7a9f2 crypto/cnxk: add cn10k crypto adapter fast path
Added crypto adapter enqueue and dequeue operations for CN10K.

Signed-off-by: Shijith Thotton <sthotton@marvell.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
Acked-by: Anoob Joseph <anoobj@marvell.com>
2021-09-06 21:46:34 +02:00
Shijith Thotton
4f7154d612 crypto/cnxk: add cn9k crypto adapter fast path
Added crypto adapter enqueue and dequeue operations for CN9K.

Signed-off-by: Shijith Thotton <sthotton@marvell.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
Acked-by: Anoob Joseph <anoobj@marvell.com>
2021-09-06 21:46:34 +02:00
Shijith Thotton
19f81cb59c event/cnxk: add crypto adapter operations
Added eventdev ops required to initialize crypto adapter.

Signed-off-by: Shijith Thotton <sthotton@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2021-09-06 21:46:34 +02:00
Danny Patel
05f157b8c5 crypto/octeontx2: fix unaligned access to device memory
Use otx2_mbox_memcpy() instead of memcpy() to prevent unaligned access.

Fixes: a0645ed0d6 ("crypto/octeontx2: discover capabilities")
Cc: stable@dpdk.org

Signed-off-by: Danny Patel <dannyp@marvell.com>
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
2021-09-06 21:46:34 +02:00
Archana Muniganti
80d56d2d35 common/cnxk: make IPsec defines common
Make IPsec defines common and remove redundant macros.

Signed-off-by: Archana Muniganti <marchana@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2021-09-06 21:46:34 +02:00
Tejasree Kondoj
d9bf3a4150 crypto/cnxk: support cn10k transport mode
Adding support for cn10k lookaside IPsec transport mode.

Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2021-09-06 21:46:26 +02:00
Archana Muniganti
e997823da8 crypto/cnxk: make IPsec verify functions common
IPsec verify functions can be made common which can
be used for both cn9k and cn10k

Signed-off-by: Archana Muniganti <marchana@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2021-09-06 21:44:08 +02:00
Tejasree Kondoj
d665f0fc3d crypto/cnxk: use rlen from CPT result with lookaside
Use rlen from CPT result with lookaside operations

Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2021-09-06 21:44:08 +02:00
Tejasree Kondoj
77ca2a4f1f crypto/cnxk: remove redundant code
Removing redundant code in cn10k lookaside IPsec.

Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2021-09-06 21:44:08 +02:00
Tejasree Kondoj
9b4a4cc0e7 crypto/cnxk: support lookaside IPsec
Added lookaside IPsec AES-CBC-HMAC-SHA1
support to cnxk driver.

Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2021-09-06 21:44:03 +02:00
Thomas Monjalon
fdab8f2e17 version: 21.11-rc0
Start a new release cycle with empty release notes.

The ABI version becomes 22.0.
The map files are updated to the new ABI major number (22).
The ABI exceptions are dropped and CI ABI checks are disabled because
compatibility is not preserved.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: David Marchand <david.marchand@redhat.com>
2021-08-17 08:37:52 +02:00
Michael Baum
56ec985f31 crypto/mlx5: fix leaks on probing failure
In crypto driver probing, there are two validations after context
allocation.

When one of them fails, the context structure was not freed what caused
a memory leak.

Free it.

Fixes: debb27ea34 ("crypto/mlx5: create login object using DevX")
Fixes: e8db4413cb ("crypto/mlx5: add keytag configuration")
Cc: stable@dpdk.org

Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
2021-07-30 21:08:19 +02:00
Arek Kusztal
135e3a4046 crypto/qat: disable asymmetric crypto on GEN3
This patch disables asymmetric crypto PMD on GEN3 devices.

Fixes: 1f5e4053f9 ("common/qat: support GEN3 devices")
Cc: stable@dpdk.org

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
2021-07-30 21:08:19 +02:00