From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50062.outbound.protection.outlook.com [40.107.5.62]) by dpdk.org (Postfix) with ESMTP id 5774C1B1C2; Thu, 22 Feb 2018 10:35:27 +0100 (CET) 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=70+SRcAN8RzyscHgHjcgK1HRF0HpCH/n4DDB42UtU/0=; b=WreNQhzHc1lTgwIweAPSMHNKFF3UEC+u476aEzFbkIx3udMWsZBCCpuaKCyWBB9CqQkRFxXmiP4soNLNrBjoT8RzjBm6N70pvq04rgGMSa24+g9uH7tL+zeZkuHH36KYni3g9kfIGvtSa7xuH/kdwkZ6si141eVGehL+99luEU4= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=nipun.gupta@nxp.com; Received: from b27504-OptiPlex-790.ap.freescale.net (192.88.169.1) by HE1PR0401MB2425.eurprd04.prod.outlook.com (2603:10a6:3:25::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.527.15; Thu, 22 Feb 2018 09:35:24 +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: Thu, 22 Feb 2018 15:04:44 +0530 Message-Id: <1519292089-13851-5-git-send-email-nipun.gupta@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1519292089-13851-1-git-send-email-nipun.gupta@nxp.com> References: <1519292089-13851-1-git-send-email-nipun.gupta@nxp.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [192.88.169.1] X-ClientProxiedBy: BM1PR0101CA0061.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:19::23) To HE1PR0401MB2425.eurprd04.prod.outlook.com (2603:10a6:3:25::22) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: eb5ae660-bea7-495e-023a-08d579d79a8c X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:HE1PR0401MB2425; X-Microsoft-Exchange-Diagnostics: 1; HE1PR0401MB2425; 3:TT/28m+JTOX6HdfNniv3UzcOn9FelduieuTddlfCgknhe6pjklGYqSsPog2YO51bM6JwPINTnxohKAVYOLalJI3Vyhz+mixCoBbwy6/td2rZFcMYX3gpn1CGt/DAyPQA2Vp2aTNYbhNTv6HXFobKaELQLIARR14q9azo72lz2sWcIYZOe01PsPK5NtHjaHLquuSQaQuUvSbqB2EnAqU8MrXs3Bh3iMjx1qem2va14hU9EEFFaLmI8/ke8pMDSSQh; 25:CkIoD26D/QJYDrzStu8K01m075klGu+foGlXNhplagMP6PnXK8PyYKFp04lBJFhL0FVb5p0lK/Wc8AXaCXJeBqcQwFRL807/CRfMQ4yvj0h/eWEYMJalvmwt+vHSzOdequLyK3aAfMBa+VMBpnml8p+P1AhZBNYRUII33bBdR9bjQotb9N7GjgzeyS0Ybsvkng1KHyqppL9RRzsoivHxbZHMSRRxs/Mo9OehSA4PFNVfrZRIrWA0V9c+tRcJSCc53r8tu+CUONwYHasVRXzONpBGIz1QB/yKoKiQ0oBL0/G1WHaan0sZ1sB3OTpgjnNKPvdvWhqCE75WZ80FmlmMZw==; 31:DDVZywKRuAex5xzTcndI4S3stSaF4U16UfC2oUXcrhc2KO3WI+3Wc0M6YTpfPz9FTwFcyMbuUQxySvuvlZA43XnBVRpqTEjMcEPOQIRKcaCuKUXEw3PsplxbOeRrb9qQQAvRUXDDWUrGy1kGJj1A9pm2pI86bqW0frJlFkbAbzvMdRwSTPul+HvEbB9/HC9ujLcqKFwYLaICHOYJT8NOh6VWchOQy5pHHETSFarbLQs= X-MS-TrafficTypeDiagnostic: HE1PR0401MB2425: X-Microsoft-Exchange-Diagnostics: 1; HE1PR0401MB2425; 20:lVQWaijN99gHG8sVtV2IXFR6bGy5J8NrKiMs+n8YYnDGGUZ1iohbhbvYQ1Cmd2GwA6UbMA7NUrWcgqbMfWwHvZezT5xFDw32preo2Togna2+xmYoOzGbQpTB4YRNv1eCfODc1SeVYQeRdyxLKItdlUJuWtleCkMLQ9lg0IBdh+3NWXulP2C5yLhBIJl9rUnXEjSbmCzGPI1URo1OCKqCOsrRv0GMRKPwa0rzCl4jFemtVrr9xHRcB7/bxUkaWmWXW11EmxuDABMBqSputaZ3sA15hZkoKaN5BsA4bHCoFeYQwopdsTPbqRJwY23lizkMwUyrnY2jVj0wWbnMpNcVKsMKIHL3KrR6FnnDGqdHJXUwNEPEh5ON57NHRP7NsqewbZwyqMMRy1d2MsiRU9akxuFmaRK6loVhx09+WOemij9yx2cEPNYX/TUowKlgo08I/u5ShxkgDR2vLeH7NphRcfHTHxPJ2xIaLS+1Py0rIrr6pPrKhUBtyYaEqx7uVim7; 4:doRlDSFj/3HohLJ1VHIvWOVRkoNhHYyD7gjPvshnfqkbzUfMfPK0F/tdLetxg+8MNfLiBJIR7/2eTrmqUp88yKo5+QPFh4Qgq2mA1TLACwRehskFYCZetmGO08wV7wKjNxLaGUy0aw2AEE/7C/60uoWctDH+YWavSqkaynaiamECHqRtXrqilYb5qtZBJbtM6J7baTPuGYxizz3ngdeNk3AvdQ11rBEYg+q4LwMUKfy/IM2MMWgoinJYFKJUUJJ24er0tG+e4IOBKPgA39+7Rl9QQu5J7SxV7VMrCemvneNN1RurQXHRnza3laRWjr/o+a1yMl/LW+9aGLdD/3+OWViWhtDM0rErQ2ZBcbh9Trg= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(275809806118684); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001077)(6040501)(2401047)(8121501046)(5005006)(3002001)(10201501046)(93006095)(93001095)(3231101)(944501161)(6055026)(6041288)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123558120)(20161123562045)(6072148)(201708071742011); SRVR:HE1PR0401MB2425; BCL:0; PCL:0; RULEID:; SRVR:HE1PR0401MB2425; X-Forefront-PRVS: 059185FE08 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39380400002)(39860400002)(376002)(346002)(366004)(396003)(199004)(189003)(7736002)(66066001)(26005)(316002)(305945005)(16586007)(25786009)(4326008)(97736004)(386003)(6506007)(478600001)(50226002)(6486002)(47776003)(36756003)(105586002)(2906002)(81156014)(8936002)(6666003)(106356001)(81166006)(48376002)(86362001)(52116002)(6512007)(51416003)(53936002)(575784001)(16526019)(5660300001)(186003)(50466002)(6636002)(6116002)(8676002)(68736007)(3846002)(2950100002)(76176011); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR0401MB2425; H:b27504-OptiPlex-790.ap.freescale.net; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR0401MB2425; 23:WBL1/b+gBeXsxp/2jT0ap9ih3sOX17IqNq9GSma?= =?us-ascii?Q?zbikKEAfTc+6CnD+ArMtQgGIEJ7qsBE78y9rIlrtBX+BptQQzobtIbAgwuUr?= =?us-ascii?Q?h0JBmtTzuu3joTBjkzRZN0GkzYEo2b4+TcuPo5lDInSbbgFQbKm1/KiGleFQ?= =?us-ascii?Q?pQWSsTI766tnx5zQpdRJ2hrKsb/u4JeE1ch7VX/0SOzFNUT/p0/lrAmTR9gu?= =?us-ascii?Q?Lm9AAoEEDyiSeUXxS+eXHJU3tm2Dujrez6B06XGCZLaC1EntgdClUtaDqc36?= =?us-ascii?Q?PVPNJ6GOyNNIFzGeg8dNyfmWGvb1XSR7Sl5CN+jkXfYH99PJW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+gUAkogYN5BrarxEXwzWsE+4qVW1Thn/dWGWXd5HKPQDO/ZtISSxnETFQF6x6cNiSghzYlfT+dmFZqo0GjTAxIXvA1zJ1wGsVZyYNv2qcVDc8LyLjNsnlaPYlkluwA4CpOjH+c1Vop6I9H0v2lRfN3ARHqRTSTZ31+1DJDPwy2UZxsi2MHywow+VRNDApGbhH2OsmhLImJZUouN3LimUTGkr4xVDf6UhvmkX91ZrfRsuZ0J6sOmU04+Z+tsqySmZc44B9Fbejo0dabBfEdYfyoPIXGct6keYkcpipSOI0ihNzBK2QX5KO47tdZU1wuL53Gv7BC1Bg0cyuxJQ=; 5:/itKPWfEf7S+lpf5zVZxqAh3DwvqyjyWNQFJy3dlM2H5D0kM8GePDl54vrOIgLOD//B6GhGiuEKfmTPr8BzIUSqKD5ITlBojWzwAsLKSx/PNWXzaJiiLXfezVYBbkSFs9wRx6NaxdIds6e71RplQgxaqhiNk/eAOKPu8syarh1Q=; 24:HrXXuDzhG/iROFgiSh4JdZtmHJWfDz2Fe9SmRlp2VPzwb8ntroTM8jP5MbkPo0wU1Bxsz//JPnfmsJgFmhknU+yJya8URI4g9OqfcMJu+08=; 7:/NNv66hJAtjcm3SgrurWpy40N2WV1vUShVraktvrOenhV8bMchxzpR5cnJNBdAnIlEjxYcg4FFE04lRRzI9NeCCVYIb1aMn36V4Trp8obm/A+VmZByYUOtygAjTSjdo9AB5/iySGEfxVUyPVeGYS4keYtqdj+Folh2ofe2lvhUGXYWbR+44XGVoNk3OGTWHlqWhl0P5EnJAQUi4EwjXvXxcOfuphZCwqXYCSW3EIc7oKz+oPEGLPDQ3BoJeW9k7o SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Feb 2018 09:35:24.6839 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: eb5ae660-bea7-495e-023a-08d579d79a8c X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0401MB2425 Subject: [dpdk-dev] [PATCH 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: Thu, 22 Feb 2018 09:35:27 -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 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