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 <ano...@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 c176cda0b1..64a66ef911 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