From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0048.outbound.protection.outlook.com [104.47.2.48]) by dpdk.org (Postfix) with ESMTP id 29CEB1BB22; Sat, 7 Apr 2018 16:34:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=hoAwUHn5n5BlvNgao2pNOZNG/0zgjSfUUGKQJPDlS9o=; b=v76HEAbtlgGe7X0k2QgWfxS+YITPnaz7qxEGBFgViTD8OYvFMnl0RFkhCxjKerkaB5ivelizmRPXz+Y8WnXxHAYc0AS/evp9fPCakbQpi0blI6wz57XzyA/XLMpxTSPzBZujSnpVjxa8Gox/whwmqG0OvuCBe6iSnbwcFpHAMVM= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=nipun.gupta@nxp.com; Received: from b27504-OptiPlex-790.ap.freescale.net (14.142.187.166) by DB6PR0401MB2424.eurprd04.prod.outlook.com (2603:10a6:4:4a::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.653.12; Sat, 7 Apr 2018 14:34:51 +0000 From: Nipun Gupta To: thomas@monjalon.net, hemant.agrawal@nxp.com, shreyansh.jain@nxp.com Cc: dev@dpdk.org, Nipun Gupta , stable@dpdk.org Date: Sat, 7 Apr 2018 20:04:00 +0530 Message-Id: <1523111645-8076-5-git-send-email-nipun.gupta@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1523111645-8076-1-git-send-email-nipun.gupta@nxp.com> References: <1519292089-13851-1-git-send-email-nipun.gupta@nxp.com> <1523111645-8076-1-git-send-email-nipun.gupta@nxp.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [14.142.187.166] X-ClientProxiedBy: PN1PR0101CA0017.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c00:e::27) To DB6PR0401MB2424.eurprd04.prod.outlook.com (2603:10a6:4:4a::27) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4c9b7cac-98d2-4a8f-a274-08d59c94b9f3 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(48565401081)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:DB6PR0401MB2424; X-Microsoft-Exchange-Diagnostics: 1; DB6PR0401MB2424; 3:iscQ+Ji9ZrMNhgEwn3WkFbsh2hg3OZJhQe/MQwP5o3Qe+1udD5/g4BsB6VicOeImSiSsn857ZQfTBEmezHNiSEqusx9fa8/BLnvoa/uGNO6MuW3fjoXNnnewXiXLBF1CgoZ4s1pg91dgvbhkVaOo0qOiGdU/wDnh8ePcAOcSAHfkZBuaaVkcgH9kZE19hP0G/VAvxjCQipV25wQwi+vjVk5cY1ZT8y+PDF54E4hwjH/MXaIsr55aI399ne0rLBjd; 25:NTYZARxgqMy5kxLJqJiE5PU6b5GsydnCzGNh+uSjDooCt+MBmwOxCLmj9GK0lodWdQCrjXYbDjV8pp7tiozGYDSMuON1PYDFOU6XNLz6j7NTUCLT5l4P5cfSttxcGUxIs29Yp6Tzaoy1/Ka3DpIuI97wbb3pdvp7n0eGL/jljjdabYQag0CO/XFqY/JEhR8Bmb2QyTKX+ney2akaSJFLAvyse5ZjjTtFTplK/W07vqlw40wqVWxwfsq+JS06iktFeRiv0wAEZmAHrioU94J+LDvZ49/RXsDRFt07JA9w3HvVtL1d0SaKLQodTRYBneYzWZU9gb1R1lTeLeRbkE02Eg==; 31:dASBU1HJuMl/o5FPXw9QaKhFoj6Jchrd0/3SQpNmd+BscuWYKLIPfzNbh77gZYGYqlOa0NGhACJzBD88S8pxStDB4w2wnyt43Sf2WXBRw6H9YYbv+Z2LiByA7dfm4hUIFOPz+Ga9AAY+TO9wqGCQdI5J9p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-Antispam-Report-Test: UriScan:(185117386973197)(275809806118684); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3002001)(3231221)(944501327)(52105095)(10201501046)(93006095)(93001095)(6055026)(6041310)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:DB6PR0401MB2424; BCL:0; PCL:0; RULEID:; SRVR:DB6PR0401MB2424; X-Forefront-PRVS: 0635D5275E X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(396003)(39380400002)(366004)(376002)(346002)(39860400002)(189003)(199004)(105586002)(26005)(446003)(5009440100003)(48376002)(50226002)(186003)(16526019)(53936002)(47776003)(50466002)(52116002)(476003)(6486002)(36756003)(76176011)(305945005)(575784001)(86362001)(66066001)(6512007)(6116002)(2616005)(51416003)(956004)(2906002)(16586007)(3846002)(4326008)(7736002)(8936002)(478600001)(81156014)(81166006)(486006)(11346002)(5660300001)(97736004)(316002)(6636002)(55236004)(6666003)(8676002)(25786009)(386003)(106356001)(6506007)(68736007)(110426004); DIR:OUT; SFP:1101; SCL:1; SRVR:DB6PR0401MB2424; H:b27504-OptiPlex-790.ap.freescale.net; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DB6PR0401MB2424; 23:CgCpLmGf+VUgLwaclR9HSB3n2YuJJ5jxpe4W4RA?= =?us-ascii?Q?22am6KNKOURv7msr+07Szg55K2KVWGofrZEVRa6ZXg2zYG1T7+MkicXDXvFC?= =?us-ascii?Q?TbQMmD+TVn36UFGo+wtdjOJWsfQ4fNkuPaZfB9W4UunQYtb8s0hkTpw6awwp?= =?us-ascii?Q?QKIGY5u+NFJMb8xAJCS2aBYD1xjhZJZVafPCFowXpyNCqKHHhkhPJz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Wv1J7rv9v5uIOz0wAggzGlzcmvSj8rJNBVF1+faaeNau4c6prgj1c=; 24:rJgkCfosZjrk+ZGy+/RP0wHyYkD73Za7K/wY6hwRoqPx7xajW4qWkw8jbNI1ecmDqKtmby+32hkTdINhG8UXfhr/nkFyJSefdfQ7Zq7rqyk= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DB6PR0401MB2424; 7:AlXtrU7d0UaqF/Ry5pCtATo0+kdBfEdjAmuy4TkmQhmIaDYIPCQ9MozP3uTLkpjhh1K9Boz581KrOumxojsGtPsq4C/oDCFCZI6lONhw8r3tduVUmd/cyLmuQFDI2CeMGHk1jTBepIQa0s0eusOJXgG3Lsni0uAvWapqH80pMbCWXth5iP7g/aa+Fl8mHpljaOAFWvCXM274aL3tYWhPs6dO95rduFDD5TbUcdex35QtzNmzvgjePeIqburQ7Z0Q X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Apr 2018 14:34:51.9137 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4c9b7cac-98d2-4a8f-a274-08d59c94b9f3 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0401MB2424 Subject: [dpdk-dev] [PATCH v2 4/9] bus/fslmc: add preprocessors to get flc and frc from fd X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Apr 2018 14:34:54 -0000 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 --- 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 bdc33ea..1ef9502 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)) @@ -225,6 +225,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) \ @@ -328,8 +331,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