diff mbox series

[v2,2/7] raw/dpaa2_qdma: memset to only required memory

Message ID 1602755228-25535-3-git-send-email-g.singh@nxp.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers show
Series raw/dpaa2_qdma: driver enhancement | expand

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Gagandeep Singh Oct. 15, 2020, 9:47 a.m. UTC
performance improvement: memset should be done only
for required memory.

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
---
 drivers/raw/dpaa2_qdma/dpaa2_qdma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/raw/dpaa2_qdma/dpaa2_qdma.c b/drivers/raw/dpaa2_qdma/dpaa2_qdma.c
index 530ee156d..09e295fe8 100644
--- a/drivers/raw/dpaa2_qdma/dpaa2_qdma.c
+++ b/drivers/raw/dpaa2_qdma/dpaa2_qdma.c
@@ -692,7 +692,7 @@  dpdmai_dev_enqueue_multi(struct dpaa2_dpdmai_dev *dpdmai_dev,
 	qbman_eq_desc_set_no_orp(&eqdesc, 0);
 	qbman_eq_desc_set_response(&eqdesc, 0, 0);
 
-	memset(fd, 0, RTE_QDMA_BURST_NB_MAX * sizeof(struct qbman_fd));
+	memset(fd, 0, nb_jobs * sizeof(struct qbman_fd));
 
 	while (nb_jobs > 0) {
 		uint32_t loop;