Commit Graph

34222 Commits

Author SHA1 Message Date
Junfeng Guo
14aa6ed8f2 net/idpf: support device start and stop
Add dev ops dev_start, dev_stop and link_update.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
2022-10-31 14:30:31 +01:00
Junfeng Guo
9c47c29739 net/idpf: add Rx queue setup
Add support for rx_queue_setup ops.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
2022-10-31 14:30:31 +01:00
Junfeng Guo
ffac2f187c net/idpf: add Tx queue setup
Add support for tx_queue_setup ops.

In the single queue model, the same descriptor queue is used by SW to
post buffer descriptors to HW and by HW to post completed descriptors
to SW.

In the split queue model, "RX buffer queues" are used to pass
descriptor buffers from SW to HW while Rx queues are used only to
pass the descriptor completions, that is, descriptors that point
to completed buffers, from HW to SW. This is contrary to the single
queue model in which Rx queues are used for both purposes.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
2022-10-31 14:30:31 +01:00
Junfeng Guo
549343c25d net/idpf: support device initialization
Support device init and add the following dev ops:
 - dev_configure
 - dev_close
 - dev_infos_get

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Signed-off-by: Wenjun Wu <wenjun1.wu@intel.com>
Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
2022-10-31 14:29:55 +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
Nicolas Chautru
c49c880ffe doc: include bbdev code snippet using literal include
Adding code snippet using literalinclude so that to keep
automatically these structures in doc in sync with the
bbdev source code.

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
2022-10-29 13:01:41 +02:00
Brian Dooley
7283c59e37 crypto/qat: fix null hash algorithm digest size
Add check for null hash algorithm digest size.
Digest size should be 4B or request will be rejected.

Fixes: 1703e94ac5 ("qat: add driver for QuickAssist devices")
Cc: stable@dpdk.org

Signed-off-by: Brian Dooley <brian.dooley@intel.com>
Acked-by: Ciara Power <ciara.power@intel.com>
2022-10-29 13:01:41 +02:00
Rahul Bhansali
d8d51d4f9b examples/ipsec-secgw: support per SA HW reassembly
This add the support of hardware reassembly per SA basis.
In SA rule, new parameter reassembly_en is added to enable
HW reassembly per SA.
For example:
sa in <idx> aead_algo <algo> aead_key <key> mode ipv4-tunnel src <ip>
dst <ip> type inline-protocol-offload port_id <id> reassembly_en

Stats counter frag_dropped will represent the number of fragment
drop in case of reassembly failures.

Signed-off-by: Rahul Bhansali <rbhansali@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-10-29 13:01:41 +02:00
Zhangfei Gao
8799d66e65 test/crypto: support UADK PMD
Updated test application to run autotest for uadk crypto PMD.
Example:
sudo dpdk-test --vdev=crypto_uadk --log-level=6
RTE>>cryptodev_uadk_autotest
RTE>>quit

Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-10-29 13:01:41 +02:00
Zhangfei Gao
ec23c28625 crypto/uadk: support auth algorithms
Add support for MD5, SHA1, SHA224, SHA256, SHA384, SHA512
Authentication algorithms with and without HMAC.

Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-10-29 13:01:41 +02:00
Zhangfei Gao
3b3cd89ea1 crypto/uadk: support cipher algorithms
Add support for cipher algorithms,
including AES_ECB, AES_CBC, AES_XTS, and DES_CBC mode.

Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-10-29 13:01:41 +02:00
Zhangfei Gao
be2874cd4b crypto/uadk: support enqueue/dequeue operations
This commit adds the enqueue and dequeue operations.

Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-10-29 13:01:41 +02:00
Zhangfei Gao
53ae139336 crypto/uadk: support basic operations
Support the basic dev control operations: configure, close, start,
stop and get info, as well as queue pairs operations.

Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-10-29 13:01:41 +02:00
Zhangfei Gao
8c515d9680 crypto/uadk: introduce HiSilicon UADK crypto driver
Introduce a new crypto PMD for hardware accelerators based on UADK [1].

UADK is a framework for user applications to access hardware accelerators.
UADK relies on IOMMU SVA (Shared Virtual Address) feature, which share
the same page table between IOMMU and MMU.
Thereby user application can directly use virtual address for device dma,
which enhances the performance as well as easy usability.

This patch adds the basic framework.

[1] https://github.com/Linaro/uadk

Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-10-29 13:01:41 +02:00
Brian Dooley
10d64144b0 examples/fips_validation: fix block parsing
When parsing request files check for file type. This fix will remove
dependence on command line parameter for using libjansson

Fixes: 0f42f3d603 ("examples/fips_validation: share callback with multiple keys")

Signed-off-by: Brian Dooley <brian.dooley@intel.com>
Acked-by: Ciara Power <ciara.power@intel.com>
Acked-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
2022-10-29 13:01:41 +02:00
Radu Nicolau
c05f2e9688 examples/ipsec-secgw: fix Tx checksum offload flag
Fix a typo in computing port mask for Tx checksum offload capability.

Fixes: 4edcee19fc ("examples/ipsec-secgw: use Tx checksum offload conditionally")
Cc: stable@dpdk.org

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
2022-10-29 13:01:41 +02:00
Nithin Dabilpuram
3edd1197a6 test/security: add multi-segment inline IPsec cases
Add support to run multi-seg inline ipsec test using
new test command `inline_ipsec_sg_autotest`

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-10-29 13:01:41 +02:00
Ciara Power
7ae361307d crypto/scheduler: fix session in size-based distribution
The index for sess_ctx was incorrect when setting the op session.

Fixes: 6812b9bf47 ("crypto/scheduler: use unified session")

Signed-off-by: Ciara Power <ciara.power@intel.com>
2022-10-29 13:01:41 +02:00
Ciara Power
09fcf99dca test/crypto-perf: fix number of scheduler sessions
The scheduler PMD needs 1 session header,
along with a session per worker.

After the session rework, this change was made to other apps,
for example l2fwd-crypto, but was missed in test-crypto-perf.

Fixes: bdce2564db ("cryptodev: rework session framework")

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2022-10-29 13:01:41 +02:00
Kai Ji
b35848bc01 crypto/ipsec_mb: add multi-process IPC request handler
As the queue pair used in secondary process needs to be set up by
the primary process, this patch adds an IPC register function to help
secondary process to send out queue-pair setup request to primary
process via IPC request messages. A new "qp_in_used_pid" param stores
the PID to provide the ownership of the queue-pair so that only the PID
matched queue-pair can be free'd in the request.

Signed-off-by: Kai Ji <kai.ji@intel.com>
Acked-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2022-10-29 13:01:41 +02:00
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