[PATCH v2 10/18] crypto/cnxk: remove extra digest len check
Anoob Joseph
anoobj at marvell.com
Tue Aug 9 12:53:48 CEST 2022
When the flag ROC_SE_VALID_MAC_BUF is set, digest length will be
non-zero. Remove extra check in datapath.
Signed-off-by: Anoob Joseph <anoobj at marvell.com>
---
drivers/crypto/cnxk/cnxk_se.h | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/crypto/cnxk/cnxk_se.h b/drivers/crypto/cnxk/cnxk_se.h
index 64100e8376..f382194c27 100644
--- a/drivers/crypto/cnxk/cnxk_se.h
+++ b/drivers/crypto/cnxk/cnxk_se.h
@@ -680,11 +680,9 @@ cpt_enc_hmac_prep(uint32_t flags, uint64_t d_offs, uint64_t d_lens,
return -1;
}
}
- /* mac_data */
- if (mac_len) {
- i = fill_sg_comp_from_buf(scatter_comp, i,
- &fc_params->mac_buf);
- }
+
+ /* Digest buffer */
+ i = fill_sg_comp_from_buf(scatter_comp, i, &fc_params->mac_buf);
} else {
/* Output including mac */
size = outputlen - iv_len;
--
2.25.1
More information about the dev
mailing list