From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0074.outbound.protection.outlook.com [104.47.2.74]) by dpdk.org (Postfix) with ESMTP id B36142C23 for ; Tue, 24 Apr 2018 13:50: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=Rw+u0LRPoGT8Rw42JHTK8tihcJpxOhyHexp30ySGTPE=; b=kPQqvYHjS2gBooS1ihu2O7a8/vVaGZ/H/DiTLnBENM9GVA9ba0dbGCJPNUC1H71zSnpdR9+S6rujR3PigHZm2Tkbg7i/GvopUiMmHjKBqWUyLy9OFg/CAjRTfkvjg3Ab3VGeU6O8o1d3fUbrpp5g7e0cvI8AXW17dBj87ilu1rY= 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.696.15; Tue, 24 Apr 2018 11:50:31 +0000 From: Nipun Gupta To: shreyansh.jain@nxp.com, thomas@monjalon.net, hemant.agrawal@nxp.com Cc: dev@dpdk.org, Nipun Gupta Date: Tue, 24 Apr 2018 17:19:45 +0530 Message-Id: <1524570589-20148-5-git-send-email-nipun.gupta@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1524570589-20148-1-git-send-email-nipun.gupta@nxp.com> References: <1523114224-9852-1-git-send-email-nipun.gupta@nxp.com> <1524570589-20148-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: PN1PR01CA0085.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c00:1::25) To DB6PR0401MB2424.eurprd04.prod.outlook.com (2603:10a6:4:4a::27) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(48565401081)(2017052603328)(7153060)(7193020); SRVR:DB6PR0401MB2424; X-Microsoft-Exchange-Diagnostics: 1; DB6PR0401MB2424; 3:u7SOE/1ZZgej3XaKd29Ycuah9l7MLWjlN9jhnSsIUmTMUEsDELQ/M2pdcQTeOEamXGEW1H9ygH9Qu+eXfCHQWegiudQRJ4b6+PpLvWcxyJnk8koo1dGglHfoN2G9jyOJ9PeXA4dmPb3kCkCqftGvr2O6f2X1cpg5pF0BQpzOcWU4956VwdQj/9VJiKqjGQXIxYokvPFW/LNRXT5L9H7VXuoMCvOBds4o6Ovc1+gkEYQiGNegJMqN2vgfuIZtLyfs; 25:oFCyC+zJxdgq3GcLu5KyGYtvYDp+m67A4LwAqft5D203F6HvtnY0qflIyu2BToVvzl3AXoAXOhBNRlbjpKb16HJuoWMvLTZioZNh05vFBX3oBoA/jdbHNYu4hqsEwuKuoREnX1keXoLOCMZsPBzp5SwG0gsmxsRMmb6JV3D5IB6E1oLbT5meVM/PD0Ve+5eikYJqkfi/jNa/Le8xKQXuKfB2ktljv7OFqgxDVlBqPGW17M972f9U08v0XBYnDMMLzWC203FVepEA9leBWXXwtoyCq1xOw+u326wSdUc6fjasyF91dWCm4ZVgfWtETJlqVWHLFn7rI/Jz9xASL6NHgQ==; 31:W/S8rwI4xSt45NNFMhVdgVyFvZHothXyLW3UNd8t70kcqMrRDl4enXexvnLTPCzT/SHcL6Css86lV3Y1kdIeTEsWpYsYejNOndqkIDycihiTcvobDxjBs3U5ZehuL6NkRHAaX5CgDktUeCRXKWFWqmp13qKDbbZMaCVfNrcVHn4RDR14I5MCoyuFB+dkkch/s6MSAnD31jxWLya/8prqownW5VCKaYTWsOitZiwFHAA= X-MS-TrafficTypeDiagnostic: DB6PR0401MB2424: X-Microsoft-Exchange-Diagnostics: 1; DB6PR0401MB2424; 20:CXYgq+DGdzMAtIz/w38sKYQNyXwDV79SLmZua81GEng2/njWusR9V+9IEUTkq6i5G+BwtDOHyjEquNBaPNSeGYzBaOu+/kFRqClD2Ivsz46+69lWIRsg+aCkT6d/BI2oQZf5EbFqe7u+OEMJadAEeCTxe/pPCTnnFxusDIXTmf4r7hvn8sk3g5juEoEh/GPPtl3ZWt8yxAOJD9182ErJZQYxhbOxHYzCTpAbRGKVZYgVaE7xNz1yEAYOSbAvsaKFexS5Ep/wo5m6GQIwYpCAffzq2I6PeeWsULJ/E/Cp7yegSrTI07AJfiNM6LujVOqLpCm4Wz+ZPVEJceuIXa1S3Jxzo1rmP7Pxvsi5ldImAtHgCak4hu+eLhXChsDWCrX6p93FQvt/an0n4Lr+OnkfiU/8cKyegxBb7Rz92zJLbo8uu6MHSfmNzBmuznaOpHS4Kqd+nEHRUjh3jJSksjFYy1YDYHt48Ev1aEQ2U6nTLGdQjpVY2GvougkLfidSZGVt; 4:Pa0znetNgFE6O6r3GpMjlSC/poITEjL3MEoB9vGH83SvItGmz3A3DiuicT7Lr1d4YXD7pLb9xUkG2oDEYq/z/brKOpbzU0+itu7t2Pm9f1zV2K2LuqQHbAOjwEOXr2LdjG2C80/QHW0qaVC9IIufnbA/X6tnLa4B96j+XTInDKk76B3fxZJ17c2A0xEbRc1clQKBgf3595ArVNgXOopJtf1+JqRh6gqKvRHmSvYB5FS3LVodiT3N1F5lZnUGuSDbi+t0cB4N1Y6pUYodvvqRhyNdZsAopdwyHMCojaL+r3Zjef7CpKvvQKOAu2BHtpcYBTc0Ua0Q16juQbUSKYElOMS9td+ll5DEH1IlyMc8RFQ= 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)(3002001)(3231232)(944501410)(52105095)(6055026)(6041310)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123564045)(6072148)(201708071742011); SRVR:DB6PR0401MB2424; BCL:0; PCL:0; RULEID:; SRVR:DB6PR0401MB2424; X-Forefront-PRVS: 0652EA5565 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(376002)(346002)(39860400002)(396003)(39380400002)(366004)(199004)(189003)(3846002)(97736004)(316002)(486006)(305945005)(6486002)(6636002)(476003)(2616005)(956004)(4326008)(25786009)(5009440100003)(446003)(575784001)(86362001)(6512007)(6666003)(11346002)(5660300001)(478600001)(44832011)(53936002)(52116002)(16526019)(76176011)(68736007)(7736002)(47776003)(51416003)(6506007)(106356001)(66066001)(26005)(36756003)(386003)(59450400001)(50466002)(81166006)(8676002)(6116002)(105586002)(16586007)(48376002)(50226002)(81156014)(8936002)(2906002)(110426005); DIR:OUT; SFP:1101; SCL:1; SRVR:DB6PR0401MB2424; 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; DB6PR0401MB2424; 23:pyJSs7qygHaftI+LzEBO7R+vmJz3vhRpq90MMuL?= =?us-ascii?Q?yrhZHIjLf48ETSwo+dEKm2PCardVhLqJCZRvinYtS3E2FeuQddY9YW/oXI49?= =?us-ascii?Q?J69EeQLlVyZ8tjgDYiqwlYaw00FnA/TTYNrBiIavdnYaVXFa5n8YFZef75j2?= =?us-ascii?Q?640R2FgNAMYZkLeRSRhZ9uGD6prCmWXxr5kKlRnqK2EYA4gpcBB/2/1wFOCm?= =?us-ascii?Q?UirGNr+K5UJyknRWK/lLcpXVXM51Cqa6yH46lvFneY9e1OyISpeWMTe9Ol/y?= =?us-ascii?Q?jHo+GkbHMKLgC3+PnxPJU6boRWfrw5YdAB1+n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EN9MF4iKMxB+qhF6ig3Af/CZRjZBSR7MXn+wkcjfMIUqijxwWthlwO+lT3EnhP8Wltt8lJTMjY63Zks8= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DB6PR0401MB2424; 7:CZxXY81UXHOPdcLM33uSjhhvPfJhOkSq/OBx7yYkXOv/zKS8xYSjNQ2hYcVFjcqyRWdTAVik1+4C4/vxknKI+1V1+48V5eHOhJI3lXuAmQEwEWpoC9A/deWp4BRJ9qq1VoUJTMUJ0kQYS8Irw0fTLV+3ZENw89kQZTWkHllVQjKDXkZmeHD59nUt4Su/nVa5V16M7aJFO9cRTRBD5S4FqZ8sPyrLhcLjJMDMgBdzgv2kwayfAmzcYtuXSu4CJPU3 X-MS-Office365-Filtering-Correlation-Id: 2e66efb2-2f2f-4ffe-3ac4-08d5a9d9956e X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Apr 2018 11:50:31.1882 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2e66efb2-2f2f-4ffe-3ac4-08d5a9d9956e 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 4/8 v4] 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, 24 Apr 2018 11:50: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 c76393d..8fd4ef9 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