From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0081.outbound.protection.outlook.com [104.47.1.81]) by dpdk.org (Postfix) with ESMTP id 30A558E59 for ; Fri, 20 Apr 2018 12:34:33 +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=V+7qxE1l02ivtNF6ade7/HMwFOiz2mSZ90W52jkPtpk=; b=gtX6T+peeXKkq50jGBX+2cvgYJLuICtgLEGUk4Y9fTeLcl6K9HcwJn3tXIXMJDpYQjc2AI4qOMU5dsI+vy+T0IR3nAo9o9X9gcwx55BqMk+LrtHvIX1Co8/gwD58qtCGG4CdOc2faKJHC8dr0AFM10BjvGyU1/XXpkWO/jOkqdc= 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 HE1PR0401MB2427.eurprd04.prod.outlook.com (2603:10a6:3:25::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.696.13; Fri, 20 Apr 2018 10:34:30 +0000 From: Nipun Gupta To: shreyansh.jain@nxp.com, thomas@monjalon.net, hemant.agrawal@nxp.com Cc: dev@dpdk.org, Nipun Gupta Date: Fri, 20 Apr 2018 16:00:58 +0530 Message-Id: <1524220264-17281-4-git-send-email-nipun.gupta@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1524220264-17281-1-git-send-email-nipun.gupta@nxp.com> References: <1523114224-9852-1-git-send-email-nipun.gupta@nxp.com> <1524220264-17281-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: BM1PR01CA0102.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00::18) To HE1PR0401MB2427.eurprd04.prod.outlook.com (2603:10a6:3:25::24) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(2017052603328)(7153060)(7193020); SRVR:HE1PR0401MB2427; X-Microsoft-Exchange-Diagnostics: 1; HE1PR0401MB2427; 3:a3sxRmHKbkxDWwaOknGsO6GI3mfxVoI9L8TfA9y1a50JHBXSySo7DGrKpB3sOQbmyiayU0JVKjjXRdzo1Td6Xoj9+NpO9Aw4Bg76/fYv2fXd/yAlt9REEsQWfq2Y347B+fxIolTQQ7grdLJd6Hq+lgzBTcCSki6X2l5zUUmLL2WlNZfcozTpT0y8uZDZnE7Kb/c+NeASgxk4aayzyxU5fezSGtrz/4m8k4T8RQChHj6fC18W9k0MrEllcxIyMKBL; 25:J8PLVKEy55FXkJ7W9ecyjc+i4OmAEb56ZwUGPVuUY3Oi5MEClQCqwzvztRfR4aQg3kXWzGQvmhiPaTjH0JayUvYWjxxGwKJ9xNtH2M9XWbCSXTuaVQiDXuz7YyalayzxgU6NeK9g3FN+87sx56bVuUsKyAuIQ35+QBGWtWdr7BKuoG5G7jBYpvMm8fJzw81Grn6pTpW+h1gZJGTe9Ql8IvSqN3ecRsTxEjVkhZZOuQACNmiNxmIb+EafvGW52b4nSxIFigHYXRjInL46Hz91HeOONvRrpee8gFmb6LgGC9uZYaoEcIMeQ5AX2vMnvaurmBGGkjCIjpeka2ik02J1hw==; 31:f4Vi2/Ot7ZrY3c7ueSUvDGjCXXda0UTZQ72gMYsiPCBQFPuyJ2O79NtRoa47Q+NrQstaJ/Pd1X1p1PXIwaeIPO2pFg87EE7gvK3fQUy5htOkU79wJ9sqR5MuYLNLvvjNMendpliF+h+3oCYHRrFKLNau/FgSnRtnu94q0JU1lAEm6Oe3gpRR8q/X2CEv5+Sg/rL1QEus4fyu4XTNUKRwABJl6ahMUNrswwKOW6YCmKU= X-MS-TrafficTypeDiagnostic: HE1PR0401MB2427: X-Microsoft-Exchange-Diagnostics: 1; HE1PR0401MB2427; 20:LtM9jmGktze6jTHg1DuNyvqzAmZm9DMzlWb2MDd77KT4+VxUgJPjetYtHlHOx4JZSYrnhaI34A01d9uiIoN3T/SL+0+Wq/m+plEVuzvXcuWTXLbaKGTMpEbGMLPAW4aYF5Q+tWQ13Ov2hseOzUEvc7odRwZx3PjYHCe61XmU1WHxeehQaMQHxlroLUlqXGocqbLEsVjA9CDaDtNwf/gdC50osoRAsbvtfH8knkJH4rfr0VIGUfNDiFhTyPxGhmyu7VOxAYjaUsCS/hnizvv/RE72E6WtH+DvMKcHpuRi//oh7SFcBWpFA5ytZYcQOtn/Vvl4Jb/8GN6D8+3PhubIQI9NOUswLJffXeRqFk3DPNA4aiY0UrB66tgd1BqlW2XYjB1QcNjaoewCnjmC/z0xFY6lRIlGCsrGAQYDpSINCFhLv2YoAKI7Kya3+T+Nr89DrGS5NV81WVbiC3mQQEv5KpEukm25YlYWG7AQHe2RZ0YcqTNoBIR9K8UPT+BrBXyu; 4:RfVJoeJJQSfMtJSM2XXniZFzl+sbbUTVfAhIHv3fPmVY00lmVS3GwHXVwFrjlcALeb4Q0QxY1mBtwrD3L7ic4YYjRJWv9bwBiH3aKHcLN35GJtQ6w8uZRT16+LzGgoXW0Mj9a4mIukOKvqsbwLdgiVe8CXjCcsT/rs6SXk+AjiOa1G5R8quPAJGiFcRIIXgVFZ9T/5QmxA6yQo8sBU8d5MIxlQsodROf8AhwsWc7P0nvFVsaLz3Ud4aplw806O/DQF700sByQfOpAZIRKHkEE1jMCKYjOwk5gwdhweAwUwxZZE3QW4qB2symDp3B5FARpH7HiyAySPX4z2T6eh5wTeDAmPGb5f93O3ncbN4zLk4= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(275809806118684); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(93006095)(93001095)(3002001)(3231232)(944501393)(52105095)(10201501046)(6055026)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(20161123560045)(20161123558120)(6072148)(201708071742011); SRVR:HE1PR0401MB2427; BCL:0; PCL:0; RULEID:; SRVR:HE1PR0401MB2427; X-Forefront-PRVS: 0648FCFFA8 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(346002)(376002)(396003)(366004)(39860400002)(39380400002)(4326008)(16526019)(59450400001)(6506007)(48376002)(386003)(8936002)(8676002)(81166006)(26005)(36756003)(25786009)(6116002)(3846002)(6486002)(575784001)(86362001)(956004)(11346002)(446003)(476003)(52116002)(2616005)(6666003)(76176011)(6636002)(5009440100003)(51416003)(6512007)(53936002)(2906002)(316002)(16586007)(50226002)(50466002)(305945005)(44832011)(478600001)(7736002)(47776003)(5660300001)(66066001)(110426005); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR0401MB2427; H:b27504-OptiPlex-790.ap.freescale.net; FPR:; SPF:None; LANG:en; MLV:nov; PTR:InfoNoRecords; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR0401MB2427; 23:4Lz3ExnPfcQMNXsj/GHqs6uphbHePE1vPyQqwU0?= =?us-ascii?Q?8L/deFzi7LCN5dRxU4xELiSQPkY3KSIeZ6V75csQITrnM/Pb4jqPeqpxMnli?= =?us-ascii?Q?iRWOq5XTuRjUWj5N/BUPI5bJ/qkR6h9KSuhho4Px28yR+W/euUone81DQe0q?= =?us-ascii?Q?FszYi6hrAx4J4fLOpjQBEkF23/T34Qga0s9gsQ/9AexkJyJcGZ8qkuGBaMnN?= =?us-ascii?Q?RyLmnmUuudxNZQT/4Vm0pgIFR3ZG5WHchvsRXkv0NGtHW3yq3Tp8Q9pImLBS?= =?us-ascii?Q?4TYy3YGDZ6KbR22x6ZYYKjir46zbhGlTGnjamkvpqrAfO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TTPjaDzIdjvBN/DfqZJzLDBlDTn3+av5rbdtuG6isIXvk0BT09YzAthiwkE3jcg9DQHwyAGrrESsk1NAYXID7YZbCBGLvjupYgGRWa4MPvf4GkKUglxA7urVqDwF050+ncEoeG5x5SJ2EJhznmdoMBZ1WFcYjmnpAw3gWDDXa2QyJ7/WmRW2LfFFy6dR7wC2+glSPLCv8QAtIsva5FurwpVY7SNBAysek8zaZ X-MS-Office365-Filtering-Correlation-Id: b3bdc0fb-76a5-4bf0-81dd-08d5a6aa4d8f X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Apr 2018 10:34:30.6351 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b3bdc0fb-76a5-4bf0-81dd-08d5a6aa4d8f X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0401MB2427 Subject: [dpdk-dev] [PATCH 3/9 v3] bus/fslmc: add macros required by QDMA for FLE and 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: Fri, 20 Apr 2018 10:34:33 -0000 Signed-off-by: Nipun Gupta Acked-by: Hemant Agrawal --- drivers/bus/fslmc/portal/dpaa2_hw_pvt.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h index 72aae43..1b67bed 100644 --- a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h +++ b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h @@ -188,7 +188,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)) @@ -211,10 +211,12 @@ enum qbman_fd_format { } while (0) #define DPAA2_SET_FLE_OFFSET(fle, offset) \ ((fle)->fin_bpid_offset |= (uint32_t)(offset) << 16) +#define DPAA2_SET_FLE_LEN(fle, len) ((fle)->length = len) #define DPAA2_SET_FLE_BPID(fle, bpid) ((fle)->fin_bpid_offset |= (size_t)bpid) #define DPAA2_GET_FLE_BPID(fle) ((fle)->fin_bpid_offset & 0x000000ff) #define DPAA2_SET_FLE_FIN(fle) ((fle)->fin_bpid_offset |= 1 << 31) #define DPAA2_SET_FLE_IVP(fle) (((fle)->fin_bpid_offset |= 0x00004000)) +#define DPAA2_SET_FLE_BMT(fle) (((fle)->fin_bpid_offset |= 0x00008000)) #define DPAA2_SET_FD_COMPOUND_FMT(fd) \ ((fd)->simple.bpid_offset |= (uint32_t)1 << 28) #define DPAA2_GET_FD_ADDR(fd) \ @@ -224,6 +226,10 @@ 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_FD_ERR(fd) ((fd)->simple.bpid_offset & 0x000000FF) #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) \ -- 1.9.1