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 6EAED374E for ; Tue, 1 May 2018 11:59:26 +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=ktMFZEqGvF2/ZKFR8bJhchb8kdS3gPM3fH4n3Bwpva8=; b=fgj9SlHIhOKOk2PEn9xLwNcYYsUfjz3Y6yhTKvhXe8pHWxbAa0cCIE0ZR6UZgFess/PFtQM+clABLeGpMc4Ewk/TvUIz167yMeUjFs5ssJ3MJeG6X47ASaf35Z03KZA2NvCnpQuxmiGKjWIlQqwxPN486G26iDYXJ3TlWIzkBQc= 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.715.23; Tue, 1 May 2018 09:59:23 +0000 From: Nipun Gupta To: shreyansh.jain@nxp.com, thomas@monjalon.net, hemant.agrawal@nxp.com Cc: dev@dpdk.org, Nipun Gupta Date: Tue, 1 May 2018 15:28:47 +0530 Message-Id: <1525168731-30912-5-git-send-email-nipun.gupta@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1525168731-30912-1-git-send-email-nipun.gupta@nxp.com> References: <1524570589-20148-1-git-send-email-nipun.gupta@nxp.com> <1525168731-30912-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: PN1PR0101CA0028.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c00:c::14) 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:HC2NlfJbRMVZ2xjy07X4asYLic2WCsotepcFTpO3tJE5skgIKVoRIUJ0pckVHUiQgervOCmAO7r/dPjXihUow6NIxpCJrplEj989XE7aM0Az/dJx/VWvxRCjNfmRsq0H+RR7IFgVCu9/9SExaQhNBFaQm7YWAV94WQR4/x0BPYneBiSFEBfv+F0wjxfpgkZEBY4hfuaX8eMHACw1RBu/g7NDe+C9C5jkvDPyh/PIETnZFWvmfz8fw9CTD3w3tOWw; 25:+6pz+hf+DOAQaZwT4O1FUyMevdCBklNcHLOXbNs90DYoeTOmw+LpMlc5+ZG714o7jxaIhKBSawy1OdxWcWxBGnXLwv/+5uZh3YeZ6LNr2lG0nveXfM8TOQBmER1Jw7EifocG3i2TmULDwjZ7jT5Q/a6kAJAFJ9ORm/mBxfzg3CYDVjU1s/ocuIddR8fgQQ/AdJxnv08M8pEcSrQbA9ZI4mZBQVzVIruXwOiSWFC2pSVcCmssrGvX+ofHTSSwRt3tBhHxEAScBhLCYmp+f4DnqCLU41Z990a36PYmNPhNHBlnczx0K2m35k+8/ga2pJkP2Rql4fjkYDfxtV4NGOrfwg==; 31:7/5hTs7gKQyA6s/64QSKMzXfmRfjHkskS1TZ0ecG/7owXdbCbwuJRNa2YSxQ+Mb4sOlStdlx8rUoQgWPv5VB17SfYkit8Il0wmpOuiLVy/iBC8wNSsDlXI7H2gKP23CcIZazDsONpI96+pEJQeaq9FTrVUGzbiBZPy5iV0B7oXRSnNvrLjNw89UILKSKoSstWorF1ZA/w0TnV6WxS7nIDq+RswyuIp+GbIViWWNe7pY= X-MS-TrafficTypeDiagnostic: HE1PR0401MB2427: X-Microsoft-Exchange-Diagnostics: 1; HE1PR0401MB2427; 20:Aa/QzgoIbYpJOa4wxh6qFhbYMlwOheRjUzogjUSWueA2G4Q/TJX7erhA+cAxj/3zCQRzgPbsdZx/7R8dcspOQZn+usPlbxuCtvk+NeF8/YHzGz3sli7ChU294yYtqKtXLiZUJ0kXmQiZzHUb+0x+ARjJfd1zfGcyR9cz9QETBpnzvDm9RzY0KlpcvSLP4WAG5eVpwx/U0uzMk92WbviDpIt2u7Jb0plaexifyu6MCNVKvQZnlbZd6fihcK7YgKwnHq9fG2iFBOMPlbl9bEIqnEIutwCg+JcQGhGZH/hfMoTdfl0RET84G5ffWO8zTBDe6ZbH2fpZLstw9qEuazzojpKCCqwPtfsx0JWpfFeuqEjFIM9xgQ4fgQNRevwtANvQ3qVE0+Gf2EIfxgro/54LYDarRrTtcsOOgS6HOzwSnhq2sGwG7Z42wSL7+kdBbKyB/VgBEIAxmuqnRzx9YqfjOyz+8p+GeVDpxJPR6SlpDmHYNQEVkRUdy+/oD2aV8lph; 4:6K1SrY4dYUkzmT+tNUGeniCGryGHkIiaeT1ZeoJHIFuSVtgVuJp7ovQyhAQU3uNMgfA1nboR6sqGl+ZtQeWAcp4qGK+4RUkpusM3DWY0Rw7CdROTi0zqqtH3NHIcrsBNV3XbSZlog27a1Lb/KG1l351fT8pmf2CNScBWf/iWNHsAODdtfzEhF6QwuyR69qhxpJd8Ely2qVCwS9O1CA+7rUG0Zs/mWcE4aF2Zdqk4O/56ZPsmktYiVMFoGRAFnpsAIgA5YbNtqCyFe3WB8BjVSES5wUE2MFTxxczgtiS8ujitxp+we56z+/88zGP6dq+qtidM5lATOhiAm3P4IN9QsU0/kN9qW4OuGeD0LwcS7D8= 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)(3231254)(944501410)(52105095)(10201501046)(3002001)(93006095)(93001095)(6055026)(6041310)(20161123562045)(20161123564045)(20161123558120)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:HE1PR0401MB2427; BCL:0; PCL:0; RULEID:; SRVR:HE1PR0401MB2427; X-Forefront-PRVS: 06592CCE58 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39380400002)(39860400002)(366004)(396003)(346002)(376002)(199004)(189003)(81156014)(3846002)(8936002)(97736004)(50226002)(48376002)(81166006)(316002)(50466002)(16586007)(2906002)(36756003)(44832011)(478600001)(5660300001)(8676002)(6116002)(486006)(16526019)(6512007)(53936002)(476003)(4326008)(446003)(956004)(11346002)(59450400001)(386003)(5009440100003)(76176011)(52116002)(51416003)(26005)(305945005)(68736007)(6506007)(105586002)(106356001)(47776003)(6636002)(66066001)(7736002)(86362001)(575784001)(6666003)(25786009)(6486002)(2616005)(110426005); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR0401MB2427; H:b27504-OptiPlex-790.ap.freescale.net; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR0401MB2427; 23:e+mYaSamO2UyvrFMITGuZxzJIeAu41ia+0sd1x3?= =?us-ascii?Q?fdxtpBrOgvj+SMKtZ6GeGVULGhmfw1xjPgZE/5jBfZa5T/LdM5vl5GUGqO2j?= =?us-ascii?Q?Wxj76iXm/irOoL1Y55NoBXNn4RskSTZmTAVRVrMhG/k1uDz2nhTAOIyS5Ith?= =?us-ascii?Q?KB0436u1yJOYBEnog7emfqfqqsFEYiwwsAAQ0wb0ESJnTw2dOsU2CkgPYUpN?= =?us-ascii?Q?QwzK98mclJGp0aEIJp688UOhOjSgyi8J+DTVGDKYLAHW728puWymR1TGcras?= =?us-ascii?Q?KzsIay/wqjyB35vb133RMEeOIQi/zGtWoydithjlY/bOTQTywNR8GotG5cqJ?= =?us-ascii?Q?FgvdZWHD99n22Kg85icYaWWIrG1JkaHncDvmB9U7+U7bGEfAC1UT+Wc5uCrB?= =?us-ascii?Q?/t1MoNKjc1NDvYODLGA/Oh7vb15HZrSDksWeSg53/tRzRHPienEYaRIZDHci?= =?us-ascii?Q?5mXqugvDN7GfVFGLRVAKes3EAQMyGMR02plNy/egTyvWhClt60fM723SihL7?= =?us-ascii?Q?fQEMkZBfbdROdIwr+pXS2RF8BNtfgVH4wulfbX6NpgggHrgLohhqd+9yQdyd?= =?us-ascii?Q?Mrq8UqvR/82PU6OWFbf/w/PU8eGoCBfC5cyowMCMCgsN4UGLVc7YiQowEk9f?= =?us-ascii?Q?Ez84rKyERgu4olzn8/eglbmmLveqRb3w2c9FD/1L33aewopbI0g0cuetd6lK?= =?us-ascii?Q?g0N8fPW0XjRncUV6dLHGXs4qr1KOwvKgCs5Yqi7WkQMGNRUreAPctiQo4LV4?= =?us-ascii?Q?kAYbidJOzxO9h2inqdmC3IRwATAXLTR60DBf706DeiDtpGJYHGM1Py5Qval4?= =?us-ascii?Q?i1lj3zu7sdAhwZpLojZEhHI93/RrC2bO4mXeya05csEDGiQY8XZXzokUzU3B?= =?us-ascii?Q?CHhf3o3JUiSD/bdxvvWeOqflTKmAR5hmbRTzz5/mL2oXzTLRN7DYsCReuE2R?= =?us-ascii?Q?reuXOVxviEDIiipQnM5Cf2XLjWT3Ba0trJgPdspmYnReT9kOeao12uc4u7ki?= =?us-ascii?Q?BZS3WL/2z1bgpSljsG/LDrQQJsApHRGFXn6Zf20OsZ3iD/45+8QpLAWWxWlz?= =?us-ascii?Q?n+g5WRjgfr02O/VU6S/fsVfm+OIdLq7bBpe/MPUfRd5dQwKABcfYNkq00jKV?= =?us-ascii?Q?ueUehJmWb9KChfE3t2gy+0n+Y6aFM0i78ORiBF2yxsdGq0YoGiWf7Ku1pkxJ?= =?us-ascii?Q?SjroNEblULwc7ba3G1G7cd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g7AjF0kPGvIhCXTJ5JSyjNd7zbQh4MHZg0GzebREHuaCRzN178M3Jbma8P9N6E= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; HE1PR0401MB2427; 7:CHQror31wy5BEjaz6McN8w1+A82i3LPKsumG8B6w4VECmdwO6g4CLSaSu/3X/h4uWwVF0cQrlJzGafyojZVckh30GLnO583EMJEUHfzcywiucTVFaI3npC43v1txoXykrkQMVZGnSdl+MRw+Dt6PQKX1mnU2BW7c0ZKha1D54KoXKPz7EPtpULTkgLL14Fq7poFBq+k5977O7ttWnH0l4IbSJevjgQHPYLn0XzS8hPt7ODawokOQXi5p7L2IC3pq X-MS-Office365-Filtering-Correlation-Id: 3a4de4c7-a4cb-4e63-d3d1-08d5af4a3854 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 May 2018 09:59:23.8442 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3a4de4c7-a4cb-4e63-d3d1-08d5af4a3854 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 v5 4/8] 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: Tue, 01 May 2018 09:59:26 -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 e081afb..09ea603 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