[dpdk-dev] [PATCH 1/7 v2] bus/dpaa: check flag in qman multi enqueue

Hemant Agrawal hemant.agrawal at nxp.com
Wed Jan 24 06:24:56 CET 2018



> -----Original Message-----
> From: Nipun Gupta [mailto:nipun.gupta at nxp.com]
> A caller may/may not pass the flags in qman enqueue multi API.
> This patch adds a check on that flag and only accesses it if passed by the
> caller.
> 
> Fixes: 43797e7b4774 ("bus/dpaa: support event dequeue and
> consumption")
> Cc: stable at dpdk.org
> 
> Signed-off-by: Nipun Gupta <nipun.gupta at nxp.com>
> ---
>  drivers/bus/dpaa/base/qbman/qman.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/bus/dpaa/base/qbman/qman.c
> b/drivers/bus/dpaa/base/qbman/qman.c
> index 609bc76..e7fdf03 100644
> --- a/drivers/bus/dpaa/base/qbman/qman.c
> +++ b/drivers/bus/dpaa/base/qbman/qman.c
> @@ -2198,7 +2198,7 @@ int qman_enqueue_multi(struct qman_fq *fq,
>                 eq->fd.addr = cpu_to_be40(fd->addr);
>                 eq->fd.status = cpu_to_be32(fd->status);
>                 eq->fd.opaque = cpu_to_be32(fd->opaque);
> -               if (flags[i] & QMAN_ENQUEUE_FLAG_DCA) {
> +               if (flags && (flags[i] & QMAN_ENQUEUE_FLAG_DCA)) {
>                         eq->dca = QM_EQCR_DCA_ENABLE |
>                                 ((flags[i] >> 8) & QM_EQCR_DCA_IDXMASK);
>                 }

Series-
Acked-by: Hemant Agrawal <hemant.agrawal at nxp.com>


More information about the dev mailing list