From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0056.outbound.protection.outlook.com [104.47.0.56]) by dpdk.org (Postfix) with ESMTP id 536B0374E for ; Thu, 3 May 2018 17:52:38 +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=QEVeFMjXTJQTYhrsAZQVbWPMNldDr+cGAvfCHSgeL/8=; b=gU2c8U55cwmqg6Wn2XFX/cY2hdRoMws6skVH3cDo92q7N9lQmxNsfOVwPN38b/TTD7cmUZLHaoshOL3wj9cJKDmY/oh1KeWmMmu2iJtf7x/13C7YV4H96Bb+UYm75BeFaR/HSlfBENaWm8egEbahqzOig3GC37jBLREZEDR4H5o= 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 VI1PR0401MB2429.eurprd04.prod.outlook.com (2603:10a6:800:2a::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.715.24; Thu, 3 May 2018 15:52:35 +0000 From: Nipun Gupta To: thomas@monjalon.net, hemant.agrawal@nxp.com, shreyansh.jain@nxp.com Cc: dev@dpdk.org, Nipun Gupta Date: Thu, 3 May 2018 21:21:58 +0530 Message-Id: <1525362722-32726-5-git-send-email-nipun.gupta@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1525362722-32726-1-git-send-email-nipun.gupta@nxp.com> References: <1525280972-27736-1-git-send-email-nipun.gupta@nxp.com> <1525362722-32726-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: MA1PR0101CA0046.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:22::32) To VI1PR0401MB2429.eurprd04.prod.outlook.com (2603:10a6:800:2a::22) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:VI1PR0401MB2429; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0401MB2429; 3:FuIXcvVamX06WsdF0UMccOK//JURzNu4qYyrc/FBYD7eAVO4YlnP51yJ63ZRCMFvts6RfFiqQW1bYS24zZQpBznyEM7ZZBOA0McE/lBFEoLltwx3LwVhRRV+XImzwdM1/7PlqDj/0qUO3wZZcwRTWSYeBhothdjqY+QFQ5u1PCtvkyHIV/nqePX7OKlf3JWL+EWrtANSPO+e6K2MW5yN+n7I0NYMvu6zCqYf1MIZ3R5wJs/ay/Rq3AMVHo/awL3W; 25:NsjudlF+Z+d15M5kJ9rzFc0eGfmqkUm+s3oznb9hIcukq69G/voQaSg0DJXCOOFbv+KINTW+cocmSDnSyoHae118SnLWWymsDlvNz9osr7GudfSA2YNqILwdWp2Z7BQJMqqcqzU091s6br3igL4iHsEXlfWqPqrpa2xtEkpC15GnJSAf+No3afWfkEzKS7zLN/bNSHp//dJmtSjKaG6ObTYyHaNySeKVzaFgdFiiF0QoBbB3wXSAY0CFMmqHuTSH6hIEibK622ZMQN9GqJJTfwh5x09Tp7w9LLAxlTrF8+AMhNuIbrwXePp7DsqfjSYvP8OsFfSo/4Ehbm0CHw+sTg==; 31:De19ce+aeWHK5cvRxVHFd4FDQ8HlZR2aKY/VCZ06ME6mVk07FhT5cYe7fNPvGuQQQQykk+P0heAw51e6LBahigo4N9syX7cXr/ZukZZgrf5+hGc905enAJbvHktK76cRY2MUqv2LqAMJn/1JPxJSbe1bf0iPooUIsyYgcOTy59dwZH9S2i6gWzAe+6Ib9SYooU7HLTfc4EdDgB8QMLAshTwQGOQosHCIpBSQ49cpdEk= X-MS-TrafficTypeDiagnostic: VI1PR0401MB2429: X-Microsoft-Exchange-Diagnostics: 1; VI1PR0401MB2429; 20:d3yvWLPhFCLe5gE2xeb/B3wqlCVSyVLYxn9J3uuFYtJxFeQbdUk4DK82r7Fy/afYiyv/MWskTZkiXkzjJApNag3hD+gQhK57HhRoRss+FLiyTCWJ+X3XBVQqSokT9pu2MGDDL7ZelZVC3bm09PC6bXlZ0iIoMassqLVB5mDuo9FQHDnpjam7Erm+GC6Z9VL8yri2hEL+vVa5oluLRv7TbQlhp7u0HUrR28+EzjX/FK3BUYJGyoLb9xY3BI8Bb7ifZI+L12fIaPBVUHD5i+i6zkBrm6a0fGPv6rIrg+k+2upBW5b51fDODTBBPbKBKP4URFwInGP7cSTwsTKBhplFbMX4OWwwB+6B22mrc09QnND3f+z2WJaSoQOlV0uHqT7ONl5snpp9iZw2lBK/9elz+Cp5OV87ySmCrmD5wfpDlXNTO9wrm9Y8r5+rKSjPG4t7lqNfGFlPvHlQhDK7YR88bKE1b+BaktwjgpMQ9wvPSkRyfW3iUfmVj/MYEaHfAQ39; 4:ckb9qKO72p5DKtYrRjKv4tQxijsWf17TnMe+JPz3p39jD4UK3cuT573CjXRFPwZfRpIsVVjq44da1Nu0CRZWC7bP2pU0Y2Oj9eG5o0z9MLRMN7eFmTYs5yMu69+jOpTWJWUptsaWPQSyzoJFBdu6UwjSmIPnAY4kQfjC2wHNuP+sJW0z9v77uRwJgjt3oAS/sTZr8TGuDAlh+6FVKGJ9Oi0vfcEYXcSBF9KinJJChsrVFyu3nxhdqtcudPSGJPrg/OJglfXQss7SmLBMzx2LtT/NMk3J5DfN+HnEOmcPowxYV0faarT8sxZ8FGwf+6VWD7wWfO34L7xRFeEke9YsFcZh5ToBTyQfqyQ1lF8YnmM= 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)(10201501046)(93006095)(93001095)(3231254)(944501410)(52105095)(3002001)(6055026)(6041310)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:VI1PR0401MB2429; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0401MB2429; X-Forefront-PRVS: 066153096A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(376002)(366004)(396003)(39380400002)(346002)(39860400002)(199004)(189003)(6666003)(50466002)(6636002)(4326008)(68736007)(6512007)(5009440100003)(25786009)(97736004)(6486002)(36756003)(106356001)(105586002)(2906002)(81166006)(6506007)(316002)(386003)(52116002)(59450400001)(66066001)(47776003)(86362001)(478600001)(446003)(305945005)(7736002)(48376002)(16586007)(76176011)(51416003)(55236004)(6116002)(486006)(186003)(476003)(16526019)(2616005)(11346002)(956004)(81156014)(3846002)(26005)(5660300001)(44832011)(50226002)(53936002)(8676002)(8936002)(575784001)(110426005); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0401MB2429; 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; VI1PR0401MB2429; 23:VLv5evnG9RwsD7+UPJUGMNyhAzNbOurVyAkvq7p?= =?us-ascii?Q?LfKZpC07DY90bIuaX3RQJ4NJ8fEUbmDnwhggNwCb+BBGRJTWPbhHHPgR2tq3?= =?us-ascii?Q?nMQWjB1/X2dbkLyDpNyUd4iawyw/qPpW27HW1xatXjuq3OlZ7EYbks+jhsdn?= =?us-ascii?Q?yrnma8i8R2omUvEBrcTRGiW1R3GJqC1yKoxsGc+Z/BuJVQhx8vR6izVYF/Mc?= =?us-ascii?Q?RGJz00hHKxLxgEL1bpEOiUB91KT42O/mnS9LfCIwEBYq12aLOPkUxcgiZGqZ?= =?us-ascii?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9FQjIgHwIjKncb9LQOJha5SzX6Vr3lcghW727Q=; 24:/CgPni/7aRHGFeDPf13BAMpXdoeywapE0Gq6A1Sz8fMEI/pGnNmz0m0SjNipYtUM2WxcI1luhDRn5k6/SdXfY6lv5Z9oUuF7fctF7OPZXNw= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; VI1PR0401MB2429; 7:o1zrM+9m2WDb1IiUn48APXvS08qITNrjAO0XLV7K5+raDiR6dz8oMicP2z2X8QAEEwb3bazUezCF+mzT37XwXf6PCrIPUF+Yx/sX2gTPEW9MbrzF9V0JYATGk0WCc2fxQDD2pBdbFN23CwSaK8SXNE8YRDwYuPoZCBcZ6DMA1KZ1g6ciC2XX/FI8SJw9O4OZtsr7vGWV8gs7Bdpj0nOTpbJaywDCFn7Rg+y6DLcJJyW/rmIT8ZK6Y0NheN1FYe+C X-MS-Office365-Filtering-Correlation-Id: 0bbb1020-cb67-469a-67a9-08d5b10de4af X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 May 2018 15:52:35.8748 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0bbb1020-cb67-469a-67a9-08d5b10de4af X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0401MB2429 Subject: [dpdk-dev] [PATCH v7 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: Thu, 03 May 2018 15:52:39 -0000 Signed-off-by: Nipun Gupta Acked-by: Hemant Agrawal Acked-by: Shreyansh Jain --- 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