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@dpdk.org
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
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);
}