[v2,04/11] crypto/cnxk: use direct mode for zero aad length
Checks
Commit Message
Using direct mode if aad length is zero.
Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
---
drivers/crypto/cnxk/cnxk_se.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
@@ -2258,9 +2258,9 @@ fill_fc_params(struct rte_crypto_op *cop, struct cnxk_se_sess *sess,
aad_data = sym_op->aead.aad.data;
aad_len = sess->aad_length;
- if (likely((aad_data + aad_len) ==
- rte_pktmbuf_mtod_offset(m_src, uint8_t *,
- sym_op->aead.data.offset))) {
+ if (likely((aad_len == 0) ||
+ ((aad_data + aad_len) ==
+ rte_pktmbuf_mtod_offset(m_src, uint8_t *, sym_op->aead.data.offset)))) {
d_offs = (d_offs - aad_len) | (d_offs << 16);
d_lens = (d_lens + aad_len) | (d_lens << 32);
} else {