raw/dpaa2_qdma: reduce memset in enqueue multi
authorGagandeep Singh <g.singh@nxp.com>
Thu, 15 Oct 2020 09:47:03 +0000 (17:47 +0800)
committerThomas Monjalon <thomas@monjalon.net>
Mon, 19 Oct 2020 11:53:32 +0000 (13:53 +0200)
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

index 530ee15..09e295f 100644 (file)
@@ -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;