[PATCH v2 06/24] crypto/cnxk: enable digest gen for zero len input
Anoob Joseph
anoobj at marvell.com
Tue Jan 2 05:53:59 CET 2024
From: Aakash Sasidharan <asasidharan at marvell.com>
With zero length input, digest generation fails with incorrect
value. Fix this by completely avoiding the gather component
when the input packet has zero data length.
Signed-off-by: Aakash Sasidharan <asasidharan at marvell.com>
---
drivers/crypto/cnxk/cnxk_se.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/crypto/cnxk/cnxk_se.h b/drivers/crypto/cnxk/cnxk_se.h
index c2a807fa94..1aec7dea9f 100644
--- a/drivers/crypto/cnxk/cnxk_se.h
+++ b/drivers/crypto/cnxk/cnxk_se.h
@@ -2479,7 +2479,7 @@ prepare_iov_from_pkt(struct rte_mbuf *pkt, struct roc_se_iov_ptr *iovec, uint32_
void *seg_data = NULL;
int32_t seg_size = 0;
- if (!pkt) {
+ if (!pkt || pkt->data_len == 0) {
iovec->buf_cnt = 0;
return 0;
}
--
2.25.1
More information about the dev
mailing list