Commit Graph

34252 Commits

Author SHA1 Message Date
Kai Ji
17e48da618 crypto/qat: fix multi-process build request session
This patch fix the session pointer passed in set_session()
when ctx has NULL build request pointer in multi-processes
scenario.

Fixes: fb3b9f4922 ("crypto/qat: rework burst data path")
Cc: stable@dpdk.org

Signed-off-by: Kai Ji <kai.ji@intel.com>
Acked-by: Ciara Power <ciara.power@intel.com>
2022-10-29 13:01:41 +02: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
305e1f856f crypto/qat: add ECDH key exchange algorithm
This commit adds ECDH key exchange algorithm to Intel QuickAssist
Technology driver.

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
841cea1c7e crypto/qat: improve asymmetric cookies free
Improve the way that cookies are freed and cleared.

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
Gowrishankar Muthukrishnan
b455d261eb examples/fips_validation: validate ECDSA
This patch adds support in fips_validation app to validate ECDSA.

Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Acked-by: Brian Dooley <brian.dooley@intel.com>
2022-10-29 13:01:41 +02:00
Gowrishankar Muthukrishnan
5b540bebac examples/fips_validation: fix GMAC decryption output
AES GMAC decrypt test should output only
whether test passed or failed.

Fixes: ad42b228c6 ("examples/fips_validation: fix print for zero length payload")
Cc: stable@dpdk.org

Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Reviewed-by: Brian Dooley <brian.dooley@intel.com>
2022-10-29 13:01:41 +02:00
Nicolas Chautru
0acdb98667 test/bbdev: add FFT operations cases
Added support for bbdev level unit test
for the FFT operations and for Soft-Output options.
Also added 2 small test vectors for the FFT operation.

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-10-29 13:01:41 +02:00
Anoob Joseph
8cbe74f191 test/crypto: fix PDCP vectors
The existing PDCP vectors have a deviation from the PDCP header
specification. The reserved fields are set to 0 in the PDCP headers and
D/C bits are updated as per the use case. The MAC-I for the
corresponding vectors are also updated.

Fixes: d883e6e713 ("test/crypto: add PDCP C-Plane encap cases")
Fixes: cca7d1f785 ("test/crypto: add PDCP U-Plane encap with integrity cases")
Cc: stable@dpdk.org

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
Tested-by: Gagandeep Singh <g.singh@nxp.com>
2022-10-29 13:01:41 +02:00
Vidya Sagar Velumuri
757bb46138 test/crypto: add custom UDP ports cases
Added unit test for custom UDP ports with UDP encapsulation.
Verified UDP header in egress path for all unit tests.

Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
Signed-off-by: Vidya Sagar Velumuri <vvelumuri@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-10-29 13:01:41 +02:00
Vidya Sagar Velumuri
7c4d45d278 test/crypto: add DES and MD5 cases
Added unit test cases for auth algo MD5.
Added unit test cases for cipher DES-CBC.

Signed-off-by: Vidya Sagar Velumuri <vvelumuri@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-10-29 13:01:41 +02:00
Vidya Sagar Velumuri
2eddc5942f test/crypto: check anti-replay capability in ingress
Antireplay is supported only for ingress.
Check this capability only for ingress.

Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
Signed-off-by: Vidya Sagar Velumuri <vvelumuri@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-10-29 13:01:41 +02:00
Vidya Sagar Velumuri
0f2748a096 test/security: update anti-replay cases for event mode
When event mode is enabled,
send and receive packets via event dev.
Updated the antireplay cases to enable event mode.

Signed-off-by: Vidya Sagar Velumuri <vvelumuri@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-10-29 13:01:40 +02:00
Vidya Sagar Velumuri
5a23f6ea39 test/security: add MD5 cases
Add unit test cases for MD5 auth algo.
Add the test vectors for MD5 auth algo.

Signed-off-by: Vidya Sagar Velumuri <vvelumuri@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-10-29 13:01:40 +02:00
Vidya Sagar Velumuri
d70018639e test/security: add DES and 3DES cases
Add unit test cases and test vectors for DES-CBC
and 3DES-CBC.

Signed-off-by: Vidya Sagar Velumuri <vvelumuri@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-10-29 13:01:40 +02:00
Anoob Joseph
bb0e4a96d8 crypto/cnxk: remove dead code
Coverity issue: 381022
Fixes: d94414d162 ("crypto/cnxk: separate out PDCP cipher datapath")

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
2022-10-29 13:01:40 +02:00
Anoob Joseph
4f030d8674 crypto/cnxk: verify IV length during session create
For Kasumi cipher operation, IV is a must. Verify the arg provided in
session creation and remove datapath check.

Coverity issue: 381020, 381019
Fixes: 7a59ccc1b5 ("crypto/cnxk: remove extra indirection for FC and Kasumi")

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
2022-10-29 13:01:40 +02:00
Vidya Sagar Velumuri
e0cb7b8987 crypto/cnxk: acquire lock for anti-replay
Acquired locks in antireplay logic to avoid race condition.

Signed-off-by: Vidya Sagar Velumuri <vvelumuri@marvell.com>
2022-10-29 13:01:40 +02:00
Tejasree Kondoj
5fc5e9d23b crypto/cnxk: support PDCP AAD in CPT
Adding support for PDCP AAD in 96xx crypto pmd.

Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
2022-10-29 13:01:40 +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
379bc7f43f crypto/cnxk: support DES and MD5 for IPsec offload
Add supoort for cipher DES and auth MD5 for IPsec offload.

Signed-off-by: Vidya Sagar Velumuri <vvelumuri@marvell.com>
2022-10-29 13:01:40 +02:00
Vidya Sagar Velumuri
91c8925f99 crypto/cnxk: update lookaside RLEN calculation
For transport mode, IP header will not be part of encryption.
Update the response len calculation accordingly for transport mode.

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
Tejasree Kondoj
0b976b987f crypto/cnxk: fix AES-CMAC length
AES-CMAC uses PDCP opcode and hence
length should be passed in bits.

Fixes: 759b5e6535 ("crypto/cnxk: support AES-CMAC")
Cc: stable@dpdk.org

Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
2022-10-29 13:01:40 +02:00
Arek Kusztal
b6ac58aee5 crypto/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.

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
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
Arek Kusztal
112b6215e0 crypto/qat: fix RSA length
Fixed not set output length in asym pmd when doing RSA.

Fixes: 002486db23 ("crypto/qat: refactor asymmetric session")
Cc: stable@dpdk.org

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Ciara Power <ciara.power@intel.com>
2022-10-29 13:01:40 +02:00
Arek Kusztal
521cd3f947 crypto/qat: fix unnecessary asymmetric session check
Removed unnecessary session check which could lead to segfault,
in case api was changed.

Fixes: 002486db23 ("crypto/qat: refactor asymmetric session")
Cc: stable@dpdk.org

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Ciara Power <ciara.power@intel.com>
2022-10-29 13:01:40 +02:00
Arek Kusztal
fdf9cdaca7 crypto/qat: fix asymmetric session cookie clearing
Fixed incorrectly placed clean function in asym response.

Fixes: 002486db23 ("crypto/qat: refactor asymmetric session")
Cc: stable@dpdk.org

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Ciara Power <ciara.power@intel.com>
2022-10-29 13:01:40 +02:00
Hernan Vargas
b4bd57b74c baseband/acc100: configure PMON control registers
Enable performance monitor control registers.

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-10-29 13:01:40 +02:00
Hernan Vargas
989dec301a baseband/acc100: add ring companion address
Store the virtual address of companion ring as part of queue
information. Use this address to calculate the op address.

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-10-29 13:01:40 +02:00
Hernan Vargas
8e71bfcebb baseband/acc100: update device info
Remove unused capabilities, use dummy operation as start count for
number of queues.

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-10-29 13:01:40 +02:00
Hernan Vargas
3a77593b1e baseband/acc100: store FCW from first CB descriptor
Store the descriptor from the first code block from a transport block.
Copy the LDPC FCW from the first descriptor into the rest of the CBs in
that TB.

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-10-29 13:01:40 +02:00
Hernan Vargas
69fbbc3f77 baseband/acc100: update log messages
Add extra values for some log messages. No functional impact.

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-10-29 13:01:40 +02:00
Hernan Vargas
53352f6b69 baseband/acc100: update uplink CB input length
Use the FCW E parameter for rate matching
as the code block input length.

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-10-29 13:01:40 +02:00
Hernan Vargas
ae555d42ec baseband/acc100: add queue stop operation
Implement new feature to stop queue operation.

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-10-29 13:01:40 +02:00
Hernan Vargas
f3f66e827b baseband/acc100: implement configurable queue depth
Implement new feature to make queue depth configurable
based on decode or encode mode.

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-10-29 13:01:40 +02:00
Hernan Vargas
39fe62d0ea baseband/acc100: update LDPC enc/dec validation
Update validate functions to check for valid LDPC parameters to avoid
any HW issues.
Adding protection for null corner case and for HARQ inbound size out
of range.
HARQ input size from application may be invalid and causing HW issue.
Add checks to ensure that if HARQ is invalid, set to some valid size to
ensure HW issues do not occur.

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-10-29 13:01:39 +02:00
Hernan Vargas
c7847be75c baseband/acc100: support LDPC transport block
Added LDPC enqueue functions to handle transport blocks.

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-10-29 13:01:39 +02:00
Hernan Vargas
4afc627f32 baseband/acc100: enable input validation by default
Enable validation functions by default and provide a new flag
RTE_LIBRTE_SKIP_VALIDATE if the user wants to run without
validating input to save cycles.

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-10-29 13:01:39 +02:00
Hernan Vargas
7104c6b8d4 baseband/acc100: add HARQ index helper function
Refactor code to use the HARQ index helper function and make harq_idx
uint32.

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-10-29 13:01:39 +02:00
Hernan Vargas
f7613291d5 baseband/acc100: support scatter-gather
Add flag to support scatter-gather for the mbuf

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-10-29 13:01:39 +02:00
Hernan Vargas
103161cc93 baseband/acc100: add enqueue status
Add enqueue status as part of rte_bbdev_queue_data.
This is a new feature to update queue status and indicate the reason why
a previous enqueue may or may not have consumed all requested operations.

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-10-29 13:01:39 +02:00
Hernan Vargas
1884ff4f50 baseband/acc100: update debug print for LDPC FCW
Print full size of FCW LDPC structure on debug messages.
This is just a cosmetic fix, no need to fix on previous code base.

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-10-29 13:01:39 +02:00
Hernan Vargas
ba2262fe16 baseband/acc100: fix close cleanup
Set local pointer to NULL after rte_free.
This needs to be set explicitly since logic may check for null pointers.

Fixes: 060e767293 ("baseband/acc100: add queue configuration")
Cc: stable@dpdk.org

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-10-29 13:01:39 +02:00
Hernan Vargas
75114f78cf baseband/acc100: fix null HARQ input case
An invalid HW operation may be caused in case the user provide
the BBDEV API and HARQ operation with input enabled and zero input.
Added protection for that case.

Fixes: 5ad5060f8f ("baseband/acc100: add LDPC processing functions")
Cc: stable@dpdk.org

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-10-29 13:01:39 +02:00
Hernan Vargas
badb3b79b9 baseband/acc100: fix device minimum alignment
Historical mistakes, there should be no 64B alignment requirement for
the buffer being processed. Any 1B alignment is sufficient.

Fixes: 9200ffa5cd ("baseband/acc100: add info get function")
Cc: stable@dpdk.org

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-10-29 13:01:39 +02:00