[PATCH v2 0/8] fixes and improvements to cnxk crypto PMD
Stephen Hemminger
stephen at networkplumber.org
Thu Aug 21 17:35:25 CEST 2025
On Thu, 21 Aug 2025 11:43:33 +0530
Tejasree Kondoj <ktejasree at marvell.com> wrote:
> Adding fixes and improvements to cnxk crypto PMD.
>
> v2:
> - Fixed coding style issues.
>
> Nithinsen Kaithakadan (3):
> common/cnxk: get context ilen as devarg
> crypto/cnxk: fix compilation error and warnings
> crypto/cnxk: align cptr to 256B in cn20k
>
> Sucharitha Sarananaga (3):
> crypto/cnxk: add new API to get fpm tbl address
> crypto/cnxk: add new API to get EC grp tbl address
> crypto/cnxk: refactor rsa verification
>
> Tejasree Kondoj (2):
> crypto/cnxk: align PDCP API with latest firmware
> crypto/cnxk: support custom metadata with CN20K
>
> doc/guides/cryptodevs/cnxk.rst | 11 +
> drivers/common/cnxk/cnxk_security.c | 20 +-
> drivers/common/cnxk/cnxk_security.h | 25 +-
> drivers/common/cnxk/hw/cpt.h | 14 +-
> drivers/common/cnxk/roc_cpt.c | 8 +-
> drivers/common/cnxk/roc_cpt.h | 5 +
> drivers/common/cnxk/roc_se.h | 37 +-
> drivers/crypto/cnxk/cn10k_cryptodev_ops.c | 16 +-
> drivers/crypto/cnxk/cn10k_ipsec.c | 4 +-
> drivers/crypto/cnxk/cn10k_tls.c | 16 +-
> drivers/crypto/cnxk/cn20k_cryptodev_ops.c | 20 +-
> drivers/crypto/cnxk/cn20k_ipsec.c | 80 +++--
> drivers/crypto/cnxk/cn20k_ipsec.h | 15 +-
> drivers/crypto/cnxk/cn20k_ipsec_la_ops.h | 41 ++-
> drivers/crypto/cnxk/cn9k_cryptodev_ops.c | 4 +-
> drivers/crypto/cnxk/cnxk_ae.h | 15 +-
> drivers/crypto/cnxk/cnxk_cryptodev.h | 1 +
> drivers/crypto/cnxk/cnxk_cryptodev_devargs.c | 49 +++
> drivers/crypto/cnxk/cnxk_cryptodev_ops.c | 130 ++++++-
> drivers/crypto/cnxk/cnxk_se.h | 340 +++++++++++++------
> drivers/crypto/cnxk/rte_pmd_cnxk_crypto.h | 96 ++++++
> drivers/net/cnxk/cn10k_ethdev_sec.c | 14 +-
> drivers/net/cnxk/cn20k_ethdev_sec.c | 8 +-
> 23 files changed, 725 insertions(+), 244 deletions(-)
>
I have been doing test builds with more warnings enabled.
These drivers have a lot of shadowed variables which are often a source of bugs.
In file included from ../drivers/crypto/cnxk/cnxk_cryptodev_ops.c:30:
../drivers/crypto/cnxk/cnxk_se.h: In function ‘cpt_sm_prep’:
../drivers/crypto/cnxk/cnxk_se.h:1160:41: warning: declaration of ‘src’ shadows a previous local [-Wshadow]
1160 | const uint64_t *src = fc_params->iv_buf;
| ^~~
../drivers/crypto/cnxk/cnxk_se.h:1105:24: note: shadowed declaration is here
1105 | const uint8_t *src = NULL;
| ^~~
../drivers/crypto/cnxk/cnxk_se.h: In function ‘cpt_enc_hmac_prep’:
../drivers/crypto/cnxk/cnxk_se.h:1330:41: warning: declaration of ‘src’ shadows a previous local [-Wshadow]
1330 | const uint64_t *src = fc_params->iv_buf;
| ^~~
../drivers/crypto/cnxk/cnxk_se.h:1200:24: note: shadowed declaration is here
1200 | const uint8_t *src = NULL;
| ^~~
../drivers/crypto/cnxk/cnxk_se.h: In function ‘cpt_dec_hmac_prep’:
../drivers/crypto/cnxk/cnxk_se.h:1487:41: warning: declaration of ‘src’ shadows a previous local [-Wshadow]
1487 | const uint64_t *src = fc_params->iv_buf;
| ^~~
../drivers/crypto/cnxk/cnxk_se.h:1369:24: note: shadowed declaration is here
1369 | const uint8_t *src = NULL;
| ^~~
../drivers/crypto/cnxk/cnxk_se.h: In function ‘fill_digest_params’:
../drivers/crypto/cnxk/cnxk_se.h:3233:34: warning: declaration of ‘src’ shadows a previous local [-Wshadow]
3233 | uint8_t *src, direction = 0;
| ^~~
../drivers/crypto/cnxk/cnxk_se.h:3200:14: note: shadowed declaration is here
3200 | char src[SRC_IOV_SIZE];
| ^~~
../drivers/crypto/cnxk/cnxk_se.h:3273:39: warning: declaration of ‘space’ shadows a previous local [-Wshadow]
3273 | int32_t dlen, space;
| ^~~~~
../drivers/crypto/cnxk/cnxk_se.h:3190:18: note: shadowed declaration is here
3190 | uint32_t space = 0;
| ^~~~~
../drivers/crypto/cnxk/cnxk_se.h: In function ‘fill_raw_fc_params’:
../drivers/crypto/cnxk/cnxk_se.h:3576:12: warning: this condition has identical branches [-Wduplicated-branches]
3576 | if (is_kasumi) {
| ^
More information about the dev
mailing list