[v2] crypto/qat: fix IPsec MB header include for ARM

Thomas Monjalon thomas at monjalon.net
Mon Jul 6 15:44:12 CEST 2026


06/07/2026 13:27, Emma Finn:
> Update the header file to always include the platform-specific
> IPsec MB header. Additionally, guard DOCSIS BPI-related fields
> that depend on IPsec MB so they are not included for ARM build.
> 
> Fixes: 03c475d609eb ("crypto/qat: require IPsec MB for HMAC precomputes")
> 
> Reported-by: Thomas Monjalon <thomas at monjalon.net>
> Signed-off-by: Emma Finn <emma.finn at intel.com>
> ---
> v2:
> * Add guards around DOCSIS BPI

The guards skip some code, leaving some variables unused or unset.
I've fixed them:

--- a/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h
+++ b/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h
@@ -102,6 +102,9 @@ qat_bpicipher_preprocess(struct qat_sym_session *ctx,
 #ifndef RTE_ARCH_ARM
                bpi_cipher_ipsec(last_block, dst, iv, last_block_len, ctx->expkey,
                        ctx->mb_mgr, ctx->docsis_key_len);
+#else
+               RTE_SET_USED(dst);
+               RTE_SET_USED(iv);
 #endif
 #endif
 #if RTE_LOG_DP_LEVEL >= RTE_LOG_DEBUG

--- a/drivers/crypto/qat/qat_sym.h
+++ b/drivers/crypto/qat/qat_sym.h
@@ -242,6 +242,9 @@ qat_bpicipher_postprocess(struct qat_sym_session *ctx,
 #ifndef RTE_ARCH_ARM
                bpi_cipher_ipsec(last_block, dst, iv, last_block_len, ctx->expkey,
                        ctx->mb_mgr, ctx->docsis_key_len);
+#else
+               RTE_SET_USED(dst);
+               RTE_SET_USED(iv);
 #endif
 #endif
 #if RTE_LOG_DP_LEVEL >= RTE_LOG_DEBUG

--- a/drivers/crypto/qat/qat_sym_session.c
+++ b/drivers/crypto/qat/qat_sym_session.c
@@ -387,7 +387,8 @@ qat_sym_session_configure_cipher(struct rte_cryptodev *dev,
        struct rte_crypto_cipher_xform *cipher_xform = NULL;
        enum qat_device_gen qat_dev_gen =
                                internals->qat_dev->qat_dev_gen;
-       int ret, is_wireless = 0;
+       int ret = 0;
+       int is_wireless = 0;
        struct icp_qat_fw_la_bulk_req *req_tmpl = &session->fw_req;
        struct icp_qat_fw_comn_req_hdr *header = &req_tmpl->comn_hdr;

Applied, thanks.




More information about the dev mailing list