From: Nipun Gupta <nipun.gupta@nxp.com>
To: thomas@monjalon.net, hemant.agrawal@nxp.com, shreyansh.jain@nxp.com
Cc: dev@dpdk.org, Nipun Gupta <nipun.gupta@nxp.com>, stable@dpdk.org
Subject: [dpdk-stable] [PATCH 4/9] bus/fslmc: add preprocessors to get flc and frc from fd
Date: Thu, 22 Feb 2018 15:04:44 +0530 [thread overview]
Message-ID: <1519292089-13851-5-git-send-email-nipun.gupta@nxp.com> (raw)
In-Reply-To: <1519292089-13851-1-git-send-email-nipun.gupta@nxp.com>
This patch also fixes the typecasting in iova/virt conversion
macros
Fixes: df0011c92312 ("bus/fslmc: add physical-virtual address translation helpers")
Cc: stable@dpdk.org
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
---
drivers/bus/fslmc/portal/dpaa2_hw_pvt.h | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
index 3829988..f8412c8 100644
--- a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
+++ b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
@@ -189,7 +189,7 @@ enum qbman_fd_format {
((fd)->simple.frc = (0x80000000 | (len)))
#define DPAA2_GET_FD_FRC_PARSE_SUM(fd) \
((uint16_t)(((fd)->simple.frc & 0xffff0000) >> 16))
-#define DPAA2_SET_FD_FRC(fd, frc) ((fd)->simple.frc = frc)
+#define DPAA2_SET_FD_FRC(fd, _frc) ((fd)->simple.frc = _frc)
#define DPAA2_RESET_FD_CTRL(fd) ((fd)->simple.ctrl = 0)
#define DPAA2_SET_FD_ASAL(fd, asal) ((fd)->simple.ctrl |= (asal << 16))
@@ -226,6 +226,9 @@ enum qbman_fd_format {
#define DPAA2_GET_FD_BPID(fd) (((fd)->simple.bpid_offset & 0x00003FFF))
#define DPAA2_GET_FD_IVP(fd) (((fd)->simple.bpid_offset & 0x00004000) >> 14)
#define DPAA2_GET_FD_OFFSET(fd) (((fd)->simple.bpid_offset & 0x0FFF0000) >> 16)
+#define DPAA2_GET_FD_FRC(fd) ((fd)->simple.frc)
+#define DPAA2_GET_FD_FLC(fd) \
+ (((uint64_t)((fd)->simple.flc_hi) << 32) + (fd)->simple.flc_lo)
#define DPAA2_GET_FLE_OFFSET(fle) (((fle)->fin_bpid_offset & 0x0FFF0000) >> 16)
#define DPAA2_SET_FLE_SG_EXT(fle) ((fle)->fin_bpid_offset |= (uint64_t)1 << 29)
#define DPAA2_IS_SET_FLE_SG_EXT(fle) \
@@ -329,8 +332,8 @@ static phys_addr_t dpaa2_mem_vtop(uint64_t vaddr)
#define DPAA2_MBUF_VADDR_TO_IOVA(mbuf) ((mbuf)->buf_addr)
#define DPAA2_OP_VADDR_TO_IOVA(op) (op)
-#define DPAA2_VADDR_TO_IOVA(_vaddr) (_vaddr)
-#define DPAA2_IOVA_TO_VADDR(_iova) (_iova)
+#define DPAA2_VADDR_TO_IOVA(_vaddr) ((phys_addr_t)(_vaddr))
+#define DPAA2_IOVA_TO_VADDR(_iova) ((void *)(_iova))
#define DPAA2_MODIFY_IOVA_TO_VADDR(_mem, _type)
#endif /* RTE_LIBRTE_DPAA2_USE_PHYS_IOVA */
--
1.9.1
next parent reply other threads:[~2018-02-22 9:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1519292089-13851-1-git-send-email-nipun.gupta@nxp.com>
2018-02-22 9:34 ` Nipun Gupta [this message]
[not found] ` <1523111645-8076-1-git-send-email-nipun.gupta@nxp.com>
2018-04-07 14:34 ` [dpdk-stable] [PATCH v2 " 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=1519292089-13851-5-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).