[PATCH 26/31] crypto: qat - change return value in adf_cfg_add_key_value_param()

2020-10-12 Thread Giovanni Cabiddu
If the parameter type provided to adf_cfg_add_key_value_param() is invalid, return -EINVAL instead of -1 that is treated as -EPERM and may confuse. Suggested-by: Andy Shevchenko Signed-off-by: Giovanni Cabiddu Reviewed-by: Andy Shevchenko --- drivers/crypto/qat/qat_common/adf_cfg.c | 2 +- 1 f

[PATCH 30/31] crypto: qat - allow for instances in different banks

2020-10-12 Thread Giovanni Cabiddu
Allow for crypto instances to be configured with symmetric crypto rings that belong to a bank that is different from the one where asymmetric crypto rings are located. This is to allow for devices with banks made of a single ring pair. In these, crypto instances will be composed of two separate ba

[PATCH 28/31] crypto: qat - refactor qat_crypto_create_instances()

2020-10-12 Thread Giovanni Cabiddu
Refactor function qat_crypto_create_instances() to propagate errors to the caller. Suggested-by: Andy Shevchenko Signed-off-by: Giovanni Cabiddu Reviewed-by: Andy Shevchenko --- drivers/crypto/qat/qat_common/qat_crypto.c | 68 +- 1 file changed, 41 insertions(+), 27 deletio

[PATCH 25/31] crypto: qat - remove unnecessary void* casts

2020-10-12 Thread Giovanni Cabiddu
Remove superfluous casts to void* in function qat_crypto_dev_config(). Suggested-by: Andy Shevchenko Signed-off-by: Giovanni Cabiddu Reviewed-by: Andy Shevchenko --- drivers/crypto/qat/qat_common/qat_crypto.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --

[PATCH 29/31] crypto: qat - refactor qat_crypto_dev_config()

2020-10-12 Thread Giovanni Cabiddu
Refactor function qat_crypto_dev_config() to propagate errors to the caller. Suggested-by: Andy Shevchenko Signed-off-by: Giovanni Cabiddu Reviewed-by: Andy Shevchenko --- drivers/crypto/qat/qat_common/qat_crypto.c | 67 +- 1 file changed, 41 insertions(+), 26 deletions(-)

[PATCH 31/31] crypto: qat - extend ae_mask

2020-10-12 Thread Giovanni Cabiddu
Change type of ae_mask in adf_hw_device_data to allow for devices with more than 16 Acceleration Engines (AEs). Signed-off-by: Giovanni Cabiddu Reviewed-by: Wojciech Ziemba Reviewed-by: Fiona Trahe Reviewed-by: Andy Shevchenko --- drivers/crypto/qat/qat_common/adf_accel_devices.h | 2 +- 1 fi

[PATCH 27/31] crypto: qat - change return value in adf_cfg_key_val_get()

2020-10-12 Thread Giovanni Cabiddu
If a key is not found in the internal key value storage, return -ENODATA instead of -1 that is treated as -EPERM and may confuse. Suggested-by: Andy Shevchenko Signed-off-by: Giovanni Cabiddu Reviewed-by: Andy Shevchenko --- drivers/crypto/qat/qat_common/adf_cfg.c | 2 +- 1 file changed, 1 ins

[PATCH 24/31] crypto: qat - call functions in adf_sriov if available

2020-10-12 Thread Giovanni Cabiddu
Call the function configure_iov_threads(), adf_enable_vf2pf_interrupts() and adf_pf2vf_notify_restarting() only if present in the struct adf_hw_device_data of the device. This is to allow for QAT drivers that do not implement those functions. Signed-off-by: Giovanni Cabiddu Reviewed-by: Wojciech

[PATCH 23/31] crypto: qat - remove hardcoded bank irq clear flag mask

2020-10-12 Thread Giovanni Cabiddu
Replace hardcoded value of the bank interrupt clear flag mask with a value calculated on the fly which is based on the number of rings present in a bank. This is to support devices that have a number of rings per bank different than 16. Signed-off-by: Giovanni Cabiddu Reviewed-by: Wojciech Ziemba

[PATCH 04/31] crypto: qat - fix configuration of iov threads

2020-10-12 Thread Giovanni Cabiddu
The number of AE2FUNC_MAP registers is different in every QAT device (c62x, c3xxx and dh895xcc) although the logic and the register offsets are the same across devices. This patch separates the logic that configures the iov threads in a common function that takes as input the number of AE2FUNC_MAP

[PATCH 02/31] crypto: qat - mask device capabilities with soft straps

2020-10-12 Thread Giovanni Cabiddu
Enable acceleration engines (AEs) and accelerators based on soft straps and fuses. When looping with a number of AEs or accelerators, ignore the ones that are disabled. This patch is based on earlier work done by Conor McLoughlin. Signed-off-by: Giovanni Cabiddu Reviewed-by: Fiona Trahe Reviewe

[PATCH 22/31] crypto: qat - abstract writes to arbiter enable

2020-10-12 Thread Giovanni Cabiddu
Abstract writes to the service arbiter enable register. This is in preparation for the introduction of the qat_4xxx driver since the arbitration enable register differes between QAT GEN2 and QAT GEN4 devices. Signed-off-by: Giovanni Cabiddu Reviewed-by: Wojciech Ziemba Reviewed-by: Maksim Lukos

[PATCH 01/31] crypto: qat - update IV in software

2020-10-12 Thread Giovanni Cabiddu
From: Marco Chiappero Do IV update calculations in software for AES-CBC and AES-CTR. This allows to embed the IV on the request descriptor and removes the allocation of the IV buffer in the data path. In addition, this change allows the support of QAT devices that are not capable of updating th

[PATCH 09/31] crypto: qat - rename ME in AE

2020-10-12 Thread Giovanni Cabiddu
Rename occurrences of ME in the admin module with the acronym AE (Acceleration Engine) as the two are equivalent. This is to keep a single acronym for engined in the codebase and follow the documentation in https://01.org/intel-quickassist-technology. Signed-off-by: Giovanni Cabiddu Reviewed-by:

[PATCH 12/31] crypto: qat - update constants table

2020-10-12 Thread Giovanni Cabiddu
Extend admin contansts table to support QAT GEN4 devices. This change does not affect QAT GEN2 devices (c62x, c3xxx and dh895xcc) as the table was extended in an unused area which is not referenced by any of those drivers and devices. Signed-off-by: Giovanni Cabiddu Reviewed-by: Fiona Trahe Rev

[PATCH 19/31] crypto: qat - abstract build ring base

2020-10-12 Thread Giovanni Cabiddu
Abstract the implementation of BUILD_RING_BASE_ADDR. This is in preparation for the introduction of the qat_4xxx driver since the value of the ring base differs between QAT GEN2 and QAT GEN4 devices. Signed-off-by: Giovanni Cabiddu Reviewed-by: Wojciech Ziemba Reviewed-by: Maksim Lukoshkov Rev

[PATCH 05/31] crypto: qat - split transport CSR access logic

2020-10-12 Thread Giovanni Cabiddu
Abstract access to transport CSRs and move generation specific code into adf_gen2_hw_data.c in preparation for the introduction of the qat_4xxx driver. Signed-off-by: Giovanni Cabiddu Reviewed-by: Fiona Trahe Reviewed-by: Wojciech Ziemba Reviewed-by: Andy Shevchenko --- .../crypto/qat/qat_c3x

[PATCH 11/31] crypto: qat - use admin mask to send fw constants

2020-10-12 Thread Giovanni Cabiddu
Introduce admin AE mask. If this mask set, the fw constant message is sent only to engines that belong to that set, otherwise it is sent to all engines. This is in preparation for the qat_4xxx driver where the constant message should be sent only to admin engines. In GEN2 devices (c62x, c3xxx and

[PATCH 03/31] crypto: qat - num_rings_per_bank is device dependent

2020-10-12 Thread Giovanni Cabiddu
From: Ahsan Atta This change is to allow support for QAT devices that may not have 16 rings per bank. The rings structure in bank is allocated dynamically based on the number of banks supported by a device. Note that in the error path in adf_init_bank(), ring->inflights is set to NULL after the

[PATCH 21/31] crypto: qat - use BIT_ULL() - 1 pattern for masks

2020-10-12 Thread Giovanni Cabiddu
Replace occurrences of the pattern GENMASK_ULL(var - 1, 0)) with BIT_ULL(var) - 1 since it produces better code and it is easier to read. Suggested-by: Andy Shevchenko Signed-off-by: Giovanni Cabiddu Reviewed-by: Andy Shevchenko --- drivers/crypto/qat/qat_common/adf_sriov.c | 2 +-

[PATCH 00/31] crypto: qat - rework in preparation for qat_4xxx driver

2020-10-12 Thread Giovanni Cabiddu
This set is an initial rework of the QAT driver in preparation for the inclusion of the qat_4xxx driver (QAT GEN4). Summary of changes: * IV update logic moved to software to remove allocation of the IV buffer in the data-path and allow for devices that are not capable of updating it whe

[PATCH 06/31] crypto: qat - relocate GEN2 CSR access code

2020-10-12 Thread Giovanni Cabiddu
Move gen2 specific transport macros to adf_gen2_hw_data.c. Signed-off-by: Giovanni Cabiddu Reviewed-by: Fiona Trahe Reviewed-by: Wojciech Ziemba Reviewed-by: Andy Shevchenko --- .../crypto/qat/qat_common/adf_gen2_hw_data.c | 1 - .../crypto/qat/qat_common/adf_gen2_hw_data.h | 68 ++

[PATCH 13/31] crypto: qat - remove writes into WQCFG

2020-10-12 Thread Giovanni Cabiddu
WQCFG registers contain the correct values after reset in all generations of QAT. No need to write into them. Signed-off-by: Giovanni Cabiddu Reviewed-by: Fiona Trahe Reviewed-by: Wojciech Ziemba Reviewed-by: Andy Shevchenko --- drivers/crypto/qat/qat_common/adf_hw_arbiter.c | 13

[PATCH 17/31] crypto: qat - register crypto instances based on capability

2020-10-12 Thread Giovanni Cabiddu
Introduce the function adf_hw_dev_has_crypto() that returns true if a device supports symmetric crypto, asymmetric crypto and authentication services. If a device has crypto capabilities, add crypto instances to the configuration. This is done since the function that allows to retrieve crypto insta

[PATCH 14/31] crypto: qat - remove unused macros in arbiter module

2020-10-12 Thread Giovanni Cabiddu
Remove the unused macros ADF_ARB_WTR_SIZE, ADF_ARB_WTR_OFFSET and ADF_ARB_RO_EN_OFFSET. These macros were left in commit 34074205bb9f ("crypto: qat - remove redundant arbiter configuration") that removed the logic that used those defines. Signed-off-by: Giovanni Cabiddu Reviewed-by: Fiona Trahe

[PATCH 07/31] crypto: qat - abstract admin interface

2020-10-12 Thread Giovanni Cabiddu
Abstract access to admin interface and move generation specific code into adf_gen2_hw_data.c in preparation for the introduction of the qat_4xxx driver. Signed-off-by: Giovanni Cabiddu Reviewed-by: Fiona Trahe Reviewed-by: Wojciech Ziemba Reviewed-by: Andy Shevchenko --- .../crypto/qat/qat_c3

[PATCH 15/31] crypto: qat - abstract arbiter access

2020-10-12 Thread Giovanni Cabiddu
The arbiter configuration, the offset to the arbiter config CSR and the offset to the worker thread to service arbiter CSR are going to be different in QAT GEN4 devices although the logic that uses them is the same across all QAT generations. This patch reworks the gen-specific parts of the arbite

[PATCH 20/31] crypto: qat - replace constant masks with GENMASK

2020-10-12 Thread Giovanni Cabiddu
Replace constant 0xULL with GENMASK_ULL(63, 0) and 0x with GENMASK(31, 0) as they are masks. This makes code less error prone. Suggested-by: Andy Shevchenko Signed-off-by: Giovanni Cabiddu Reviewed-by: Andy Shevchenko --- drivers/crypto/qat/qat_common/adf_gen2_hw_data.h

[PATCH 10/31] crypto: qat - change admin sequence

2020-10-12 Thread Giovanni Cabiddu
Call adf_set_fw_constants() before adf_init_ae(). This is required by QAT GEN4 devices, which expect that the FW_CONSTANTS_CFG command is sent to the admin AEs before the FW_INIT_AE command. Swapping the order of the two commands (FW_INIT_AE and FW_CONSTANTS_CFG) is allowed in QAT GEN2 devices as

[PATCH 16/31] crypto: qat - add support for capability detection

2020-10-12 Thread Giovanni Cabiddu
From: Marco Chiappero Add logic to detect device capabilities for c62x, c3xxx and dh895xcc. Read fuses, straps and legfuses CSRs and build the device capabilities mask. This will be used to understand if a certain service is supported by a device. This patch is based on earlier work done by Con

[PATCH 18/31] crypto: qat - enable ring after pair is programmed

2020-10-12 Thread Giovanni Cabiddu
Enable arbitration on the TX ring only after the RX ring is programmed. Before this change, arbitration was enabled on the TX ring before the RX ring was programmed allowing the HW to process a request before having the ring pair configured. With this change, the arbitration logic is programmed on

[PATCH 08/31] crypto: qat - add packed to init admin structures

2020-10-12 Thread Giovanni Cabiddu
Add packed attribute to the structures icp_qat_fw_init_admin_req and icp_qat_fw_init_admin_resp as they are accessed by firmware. Signed-off-by: Giovanni Cabiddu Reviewed-by: Fiona Trahe Reviewed-by: Wojciech Ziemba Reviewed-by: Andy Shevchenko --- drivers/crypto/qat/qat_common/icp_qat_fw_ini

Re: [PATCH] module: statically initialize init section freeing data

2020-10-12 Thread Jessica Yu
+++ Daniel Jordan [08/10/20 13:32 -0400]: Corentin hit the following workqueue warning when running with CRYPTO_MANAGER_EXTRA_TESTS: WARNING: CPU: 2 PID: 147 at kernel/workqueue.c:1473 __queue_work+0x3b8/0x3d0 Modules linked in: ghash_generic CPU: 2 PID: 147 Comm: modprobe Not tainted 5.

Re: [PATCH v6,net-next,03/13] octeontx2-af: add debugfs entries for CPT block

2020-10-12 Thread kernel test robot
documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Srujana-Challa/octeontx2-af-add-debugfs-entries-for-CPT-block/20201012-161457 base: https://git.kernel.org/pub/scm/linux/kernel/git/horms/ipvs.git master config: arm64-randconfig-r001-20201012

[PATCH v7,net-next,08/13] crypto: octeontx2: add LF framework

2020-10-12 Thread Srujana Challa
CPT RVU Local Functions(LFs) needs to be attached to the PF/VF to submit the instructions to CPT. This patch adds the interface to initialize and attach the LFs. It also adds interface to register the LF's interrupts. Signed-off-by: Suheil Chandran Signed-off-by: Srujana Challa --- drivers/cryp

[PATCH v7,net-next,12/13] crypto: octeontx2: add support to process the crypto request

2020-10-12 Thread Srujana Challa
Attach LFs to CPT VF to process the crypto requests and register LF interrupts. Signed-off-by: Suheil Chandran Signed-off-by: Srujana Challa --- drivers/crypto/marvell/octeontx2/Makefile | 2 +- .../marvell/octeontx2/otx2_cpt_reqmgr.h | 145 + drivers/crypto/marvell/octeontx2/ot

[PATCH v7,net-next,09/13] crypto: octeontx2: add support to get engine capabilities

2020-10-12 Thread Srujana Challa
Adds support to get engine capabilities and adds a new mailbox to share the engine capabilities to CPT VFIO drivers. Signed-off-by: Suheil Chandran Signed-off-by: Srujana Challa --- .../marvell/octeontx2/otx2_cpt_common.h | 36 .../marvell/octeontx2/otx2_cpt_reqmgr.h | 51 +++

[PATCH v7,net-next,11/13] crypto: octeontx2: add virtual function driver support

2020-10-12 Thread Srujana Challa
Add support for the Marvell OcteonTX2 CPT virtual function driver. This patch includes probe, PCI specific initialization and interrupt handling. Signed-off-by: Suheil Chandran Signed-off-by: Srujana Challa --- drivers/crypto/marvell/octeontx2/Makefile | 4 +- .../marvell/octeontx2/otx2_c

[PATCH v7,net-next,13/13] crypto: octeontx2: register with linux crypto framework

2020-10-12 Thread Srujana Challa
CPT offload module utilises the linux crypto framework to offload crypto processing. This patch registers supported algorithms by calling registration functions provided by the kernel crypto API. The module currently supports: - AES block cipher in CBC,ECB,XTS and CFB mode. - 3DES block cipher in

[PATCH v7,net-next,10/13] crypto: octeontx2: add mailbox for inline-IPsec RX LF cfg

2020-10-12 Thread Srujana Challa
Add new mailbox message to configure a LF for RX inline-IPsec. This message is added to serve Marvell CPT VFIO driver, since a VF can not send mailbox messages to admin function(AF) directly. Signed-off-by: Suheil Chandran Signed-off-by: Srujana Challa --- .../marvell/octeontx2/otx2_cpt_common.

[PATCH v7,net-next,05/13] crypto: octeontx2: add mailbox communication with AF

2020-10-12 Thread Srujana Challa
In the resource virtualization unit (RVU) each of the PF and AF (admin function) share a 64KB of reserved memory region for communication. This patch initializes PF <=> AF mailbox IRQs, registers handlers for processing these communication messages. Signed-off-by: Suheil Chandran Signed-off-by: S

[PATCH v7,net-next,07/13] crypto: octeontx2: load microcode and create engine groups

2020-10-12 Thread Srujana Challa
CPT includes microcoded GigaCypher symmetric engines(SEs), IPsec symmetric engines(IEs), and asymmetric engines (AEs). Each engine receives CPT instructions from the engine groups it has subscribed to. This patch loads microcode, configures three engine groups(one for SEs, one for IEs and one for A

[PATCH v7,net-next,06/13] crypto: octeontx2: enable SR-IOV and mailbox communication with VF

2020-10-12 Thread Srujana Challa
Adds 'sriov_configure' to enable/disable virtual functions (VFs). Also Initializes VF<=>PF mailbox IRQs, register handlers for processing these mailbox messages. Admin function (AF) handles resource allocation and configuration for PFs and their VFs. PFs request the AF directly, via mailboxes. Unl

[PATCH v7,net-next,04/13] drivers: crypto: add Marvell OcteonTX2 CPT PF driver

2020-10-12 Thread Srujana Challa
Adds skeleton for the Marvell OcteonTX2 CPT physical function driver which includes probe, PCI specific initialization and hardware register defines. RVU defines are present in AF driver (drivers/net/ethernet/marvell/octeontx2/af), header files from AF driver are included here to avoid duplication.

[PATCH v7,net-next,02/13] octeontx2-af: add mailbox interface for CPT

2020-10-12 Thread Srujana Challa
On OcteonTX2 SoC, the admin function (AF) is the only one with all priviliges to configure HW and alloc resources, PFs and it's VFs have to request AF via mailbox for all their needs. This patch adds a mailbox interface for CPT PFs and VFs to allocate resources for cryptography and inline-IPsec. In

[PATCH v7,net-next,01/13] octeontx2-pf: move lmt flush to include/linux/soc

2020-10-12 Thread Srujana Challa
On OcteonTX2 platform CPT instruction enqueue and NIX packet send are only possible via LMTST operations which uses LDEOR instruction. This patch moves lmt flush function from OcteonTX2 nic driver to include/linux/soc since it will be used by OcteonTX2 CPT and NIC driver for LMTST. Signed-off-by:

[PATCH v7,net-next,00/13] Add Support for Marvell OcteonTX2 Cryptographic

2020-10-12 Thread Srujana Challa
This series introduces crypto(CPT) drivers(PF & VF) for Marvell OcteonTX2 CN96XX Soc. OcteonTX2 SOC's resource virtualization unit (RVU) supports multiple physical and virtual functions. Each of the PF/VF's functionality is determined by what kind of resources are attached to it. When the CPT bloc

[PATCH v7,net-next,03/13] octeontx2-af: add debugfs entries for CPT block

2020-10-12 Thread Srujana Challa
Add entries to debugfs at /sys/kernel/debug/octeontx2/cpt. cpt_pc: dump cpt performance HW registers. Usage: cat /sys/kernel/debug/octeontx2/cpt/cpt_pc cpt_engines_sts: show cpt engines current state (busy/free status) Usage: echo "AE/SE/IE/all" > /sys/kernel/debug/octeontx2/cpt/cpt_engines_sts

[PATCH v6,net-next,13/13] crypto: octeontx2: register with linux crypto framework

2020-10-12 Thread Srujana Challa
CPT offload module utilises the linux crypto framework to offload crypto processing. This patch registers supported algorithms by calling registration functions provided by the kernel crypto API. The module currently supports: - AES block cipher in CBC,ECB,XTS and CFB mode. - 3DES block cipher in

[PATCH v6,net-next,11/13] crypto: octeontx2: add virtual function driver support

2020-10-12 Thread Srujana Challa
Add support for the Marvell OcteonTX2 CPT virtual function driver. This patch includes probe, PCI specific initialization and interrupt handling. Signed-off-by: Srujana Challa --- drivers/crypto/marvell/octeontx2/Makefile | 4 +- .../marvell/octeontx2/otx2_cpt_common.h | 1 + .../m

[PATCH v6,net-next,12/13] crypto: octeontx2: add support to process the crypto request

2020-10-12 Thread Srujana Challa
Attach LFs to CPT VF to process the crypto requests and register LF interrupts. Signed-off-by: Srujana Challa --- drivers/crypto/marvell/octeontx2/Makefile | 2 +- .../marvell/octeontx2/otx2_cpt_reqmgr.h | 145 + drivers/crypto/marvell/octeontx2/otx2_cptlf.h | 7 + .../marvell/

[PATCH v6,net-next,08/13] crypto: octeontx2: add LF framework

2020-10-12 Thread Srujana Challa
CPT RVU Local Functions(LFs) needs to be attached to the PF/VF to submit the instructions to CPT. This patch adds the interface to initialize and attach the LFs. It also adds interface to register the LF's interrupts. Signed-off-by: Srujana Challa --- drivers/crypto/marvell/octeontx2/Makefile

[PATCH v6,net-next,07/13] crypto: octeontx2: load microcode and create engine groups

2020-10-12 Thread Srujana Challa
CPT includes microcoded GigaCypher symmetric engines(SEs), IPsec symmetric engines(IEs), and asymmetric engines (AEs). Each engine receives CPT instructions from the engine groups it has subscribed to. This patch loads microcode, configures three engine groups(one for SEs, one for IEs and one for A

[PATCH v6,net-next,10/13] crypto: octeontx2: add mailbox for inline-IPsec RX LF cfg

2020-10-12 Thread Srujana Challa
Add new mailbox message to configure a LF for RX inline-IPsec. This message is added to serve Marvell CPT VFIO driver, since a VF can not send mailbox messages to admin function(AF) directly. Signed-off-by: Srujana Challa --- .../marvell/octeontx2/otx2_cpt_common.h | 12 +++ drivers/crypto

[PATCH v6,net-next,09/13] crypto: octeontx2: add support to get engine capabilities

2020-10-12 Thread Srujana Challa
Adds support to get engine capabilities and adds a new mailbox to share the engine capabilities to CPT VFIO drivers. Signed-off-by: Srujana Challa --- .../marvell/octeontx2/otx2_cpt_common.h | 36 .../marvell/octeontx2/otx2_cpt_reqmgr.h | 51 ++ drivers/crypto/marvell/octe

[PATCH v6,net-next,05/13] crypto: octeontx2: add mailbox communication with AF

2020-10-12 Thread Srujana Challa
In the resource virtualization unit (RVU) each of the PF and AF (admin function) share a 64KB of reserved memory region for communication. This patch initializes PF <=> AF mailbox IRQs, registers handlers for processing these communication messages. Signed-off-by: Srujana Challa --- drivers/cryp

[PATCH v6,net-next,02/13] octeontx2-af: add mailbox interface for CPT

2020-10-12 Thread Srujana Challa
On OcteonTX2 SoC, the admin function (AF) is the only one with all priviliges to configure HW and alloc resources, PFs and it's VFs have to request AF via mailbox for all their needs. This patch adds a mailbox interface for CPT PFs and VFs to allocate resources for cryptography and inline-IPsec. In

[PATCH v6,net-next,06/13] crypto: octeontx2: enable SR-IOV and mailbox communication with VF

2020-10-12 Thread Srujana Challa
Adds 'sriov_configure' to enable/disable virtual functions (VFs). Also Initializes VF<=>PF mailbox IRQs, register handlers for processing these mailbox messages. Admin function (AF) handles resource allocation and configuration for PFs and their VFs. PFs request the AF directly, via mailboxes. Unl

[PATCH v6,net-next,04/13] drivers: crypto: add Marvell OcteonTX2 CPT PF driver

2020-10-12 Thread Srujana Challa
Adds skeleton for the Marvell OcteonTX2 CPT physical function driver which includes probe, PCI specific initialization and hardware register defines. RVU defines are present in AF driver (drivers/net/ethernet/marvell/octeontx2/af), header files from AF driver are included here to avoid duplication.

[PATCH v6,net-next,03/13] octeontx2-af: add debugfs entries for CPT block

2020-10-12 Thread Srujana Challa
Add entries to debugfs at /sys/kernel/debug/octeontx2/cpt. cpt_pc: dump cpt performance HW registers. Usage: cat /sys/kernel/debug/octeontx2/cpt/cpt_pc cpt_engines_sts: show cpt engines current state (busy/free status) Usage: echo "AE/SE/IE/all" > /sys/kernel/debug/octeontx2/cpt/cpt_engines_sts

[PATCH v6,net-next,01/13] octeontx2-pf: move lmt flush to include/linux/soc

2020-10-12 Thread Srujana Challa
On OcteonTX2 platform CPT instruction enqueue and NIX packet send are only possible via LMTST operations which uses LDEOR instruction. This patch moves lmt flush function from OcteonTX2 nic driver to include/linux/soc since it will be used by OcteonTX2 CPT and NIC driver for LMTST. Signed-off-by:

[PATCH v6,net-next,00/13] Add Support for Marvell OcteonTX2 Cryptographic

2020-10-12 Thread Srujana Challa
This series introduces crypto(CPT) drivers(PF & VF) for Marvell OcteonTX2 CN96XX Soc. OcteonTX2 SOC's resource virtualization unit (RVU) supports multiple physical and virtual functions. Each of the PF/VF's functionality is determined by what kind of resources are attached to it. When the CPT bloc

RE: [PATCH v5,net-next,00/13] Add Support for Marvell OcteonTX2 Cryptographic

2020-10-12 Thread Srujana Challa
I am sorry, please ignore this version of series, it was sent by mistake without removing Gerrit Change IDs. Thanks, Srujana > This series introduces crypto(CPT) drivers(PF & VF) for Marvell OcteonTX2 > CN96XX Soc. > > OcteonTX2 SOC's resource virtualization unit (RVU) supports multiple > physi

[PATCH v5,net-next,13/13] crypto: octeontx2: register with linux crypto framework

2020-10-12 Thread Srujana Challa
CPT offload module utilises the linux crypto framework to offload crypto processing. This patch registers supported algorithms by calling registration functions provided by the kernel crypto API. The module currently supports: - AES block cipher in CBC,ECB,XTS and CFB mode. - 3DES block cipher in

[PATCH v5,net-next,08/13] crypto: octeontx2: add LF framework

2020-10-12 Thread Srujana Challa
CPT RVU Local Functions(LFs) needs to be attached to the PF/VF to submit the instructions to CPT. This patch adds the interface to initialize and attach the LFs. It also adds interface to register the LF's interrupts. Change-Id: I6a674bab7f905de63fed0a9b611ac4d69baa164f Signed-off-by: Srujana Chal

[PATCH v5,net-next,12/13] crypto: octeontx2: add support to process the crypto request

2020-10-12 Thread Srujana Challa
Attach LFs to CPT VF to process the crypto requests and register LF interrupts. Change-Id: Idd9b8ff9a435d9dfc2591f17a84d2f96206dd994 Signed-off-by: Srujana Challa --- drivers/crypto/marvell/octeontx2/Makefile | 2 +- .../marvell/octeontx2/otx2_cpt_reqmgr.h | 145 + drivers/crypto

[PATCH v5,net-next,09/13] crypto: octeontx2: add support to get engine capabilities

2020-10-12 Thread Srujana Challa
Adds support to get engine capabilities and adds a new mailbox to share the engine capabilities to CPT VFIO drivers. Change-Id: Ic43320c02ca4595b5b82f1da9c7d3a070f046f55 Signed-off-by: Srujana Challa --- .../marvell/octeontx2/otx2_cpt_common.h | 36 .../marvell/octeontx2/otx2_cpt_req

[PATCH v5,net-next,07/13] crypto: octeontx2: load microcode and create engine groups

2020-10-12 Thread Srujana Challa
CPT includes microcoded GigaCypher symmetric engines(SEs), IPsec symmetric engines(IEs), and asymmetric engines (AEs). Each engine receives CPT instructions from the engine groups it has subscribed to. This patch loads microcode, configures three engine groups(one for SEs, one for IEs and one for A

[PATCH v5,net-next,10/13] crypto: octeontx2: add mailbox for inline-IPsec RX LF cfg

2020-10-12 Thread Srujana Challa
Add new mailbox message to configure a LF for RX inline-IPsec. This message is added to serve Marvell CPT VFIO driver, since a VF can not send mailbox messages to admin function(AF) directly. Change-Id: I66c984eb3a865a28d59952e7210319c669ef9e6c Signed-off-by: Srujana Challa --- .../marvell/octeo

[PATCH v5,net-next,11/13] crypto: octeontx2: add virtual function driver support

2020-10-12 Thread Srujana Challa
Add support for the Marvell OcteonTX2 CPT virtual function driver. This patch includes probe, PCI specific initialization and interrupt handling. Change-Id: Ib0c81fcc7c0d43144463c37e7ea0e954bafe4b62 Signed-off-by: Srujana Challa --- drivers/crypto/marvell/octeontx2/Makefile | 4 +- .../mar

[PATCH v5,net-next,03/13] octeontx2-af: add debugfs entries for CPT block

2020-10-12 Thread Srujana Challa
Add entries to debugfs at /sys/kernel/debug/octeontx2/cpt. cpt_pc: dump cpt performance HW registers. Usage: cat /sys/kernel/debug/octeontx2/cpt/cpt_pc cpt_engines_sts: show cpt engines current state (busy/free status) Usage: echo "AE/SE/IE/all" > /sys/kernel/debug/octeontx2/cpt/cpt_engines_sts

[PATCH v5,net-next,02/13] octeontx2-af: add mailbox interface for CPT

2020-10-12 Thread Srujana Challa
On OcteonTX2 SoC, the admin function (AF) is the only one with all priviliges to configure HW and alloc resources, PFs and it's VFs have to request AF via mailbox for all their needs. This patch adds a mailbox interface for CPT PFs and VFs to allocate resources for cryptography and inline-IPsec. In

[PATCH v5,net-next,00/13] Add Support for Marvell OcteonTX2 Cryptographic

2020-10-12 Thread Srujana Challa
This series introduces crypto(CPT) drivers(PF & VF) for Marvell OcteonTX2 CN96XX Soc. OcteonTX2 SOC's resource virtualization unit (RVU) supports multiple physical and virtual functions. Each of the PF/VF's functionality is determined by what kind of resources are attached to it. When the CPT bloc

[PATCH v5,net-next,06/13] crypto: octeontx2: enable SR-IOV and mailbox communication with VF

2020-10-12 Thread Srujana Challa
Adds 'sriov_configure' to enable/disable virtual functions (VFs). Also Initializes VF<=>PF mailbox IRQs, register handlers for processing these mailbox messages. Admin function (AF) handles resource allocation and configuration for PFs and their VFs. PFs request the AF directly, via mailboxes. Unl

[PATCH v5,net-next,05/13] crypto: octeontx2: add mailbox communication with AF

2020-10-12 Thread Srujana Challa
In the resource virtualization unit (RVU) each of the PF and AF (admin function) share a 64KB of reserved memory region for communication. This patch initializes PF <=> AF mailbox IRQs, registers handlers for processing these communication messages. Change-Id: I9826d1703a1a19c347c9e3f3cd6a395c5a64

[PATCH v5,net-next,04/13] drivers: crypto: add Marvell OcteonTX2 CPT PF driver

2020-10-12 Thread Srujana Challa
Adds skeleton for the Marvell OcteonTX2 CPT physical function driver which includes probe, PCI specific initialization and hardware register defines. RVU defines are present in AF driver (drivers/net/ethernet/marvell/octeontx2/af), header files from AF driver are included here to avoid duplication.

[PATCH v5,net-next,01/13] octeontx2-pf: move lmt flush to include/linux/soc

2020-10-12 Thread Srujana Challa
On OcteonTX2 platform CPT instruction enqueue and NIX packet send are only possible via LMTST operations which uses LDEOR instruction. This patch moves lmt flush function from OcteonTX2 nic driver to include/linux/soc since it will be used by OcteonTX2 CPT and NIC driver for LMTST. Change-Id: I148