From: Nipun Gupta <nipun.gupta@nxp.com>
To: <thomas@monjalon.net>
Cc: <dev@dpdk.org>, <hemant.agrawal@nxp.com>,
<shreyansh.jain@nxp.com>, Nipun Gupta <nipun.gupta@nxp.com>,
<stable@dpdk.org>
Subject: [dpdk-stable] [PATCH 1/7 v2] bus/dpaa: check flag in qman multi enqueue
Date: Tue, 23 Jan 2018 17:57:01 +0530 [thread overview]
Message-ID: <1516710427-22843-2-git-send-email-nipun.gupta@nxp.com> (raw)
In-Reply-To: <1516710427-22843-1-git-send-email-nipun.gupta@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@dpdk.org
Signed-off-by: Nipun Gupta <nipun.gupta@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);
}
--
1.9.1
next parent reply other threads:[~2018-01-23 13:03 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1516710671-13897-1-git-send-email-nipun.gupta@nxp.com>
[not found] ` <1516710427-22843-1-git-send-email-nipun.gupta@nxp.com>
2018-01-23 12:27 ` Nipun Gupta [this message]
2018-01-24 5:24 ` Hemant Agrawal
2018-01-31 12:45 ` [dpdk-stable] [dpdk-dev] " Thomas Monjalon
2018-01-23 12:27 ` [dpdk-stable] [PATCH 2/7 v2] bus/dpaa: allocate qman portals in thread safe manner Nipun Gupta
2018-01-23 12:27 ` [dpdk-stable] [PATCH 3/7 v2] mempool/dpaa: fix the phy to virt optimization Nipun Gupta
2018-01-23 12:27 ` [dpdk-stable] [PATCH 4/7 v2] bus/dpaa: fix port order shuffling Nipun Gupta
2018-01-23 12:31 ` [dpdk-stable] [PATCH 1/7] bus/dpaa: check flag in qman multi enqueue Nipun Gupta
2018-01-23 12:31 ` [dpdk-stable] [PATCH 2/7] bus/dpaa: allocate qman portals in thread safe manner Nipun Gupta
2018-01-23 12:31 ` [dpdk-stable] [PATCH 3/7] mempool/dpaa: fix the phy to virt optimization Nipun Gupta
2018-01-23 12:31 ` [dpdk-stable] [PATCH 4/7] bus/dpaa: fix port order shuffling Nipun Gupta
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1516710427-22843-2-git-send-email-nipun.gupta@nxp.com \
--to=nipun.gupta@nxp.com \
--cc=dev@dpdk.org \
--cc=hemant.agrawal@nxp.com \
--cc=shreyansh.jain@nxp.com \
--cc=stable@dpdk.org \
--cc=thomas@monjalon.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).