From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0040.outbound.protection.outlook.com [104.47.1.40]) by dpdk.org (Postfix) with ESMTP id B213F3230 for ; Wed, 2 May 2018 19:10:28 +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=qclGv02WC3uetoyyqonBscX4u0dScJ0NTmfjCTKXm2bzHZH0MM3XUkcIDOikYLovLmpamxNdwBXhUDHVx9FJx8TIAFZqmaUGVtJNNMUTpLoKzZ9y+k/eGV42iDhXBK1gPJbvmqJrioEhnM48iFn2/dkBJTJzRg3l4t5JAxB0/8Q= 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 VI1PR0401MB2431.eurprd04.prod.outlook.com (2603:10a6:800:2a::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.696.13; Wed, 2 May 2018 17:10:26 +0000 From: Nipun Gupta To: thomas@monjalon.net, hemant.agrawal@nxp.com, shreyansh.jain@nxp.com Cc: dev@dpdk.org, Nipun Gupta Date: Wed, 2 May 2018 22:39:28 +0530 Message-Id: <1525280972-27736-5-git-send-email-nipun.gupta@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1525280972-27736-1-git-send-email-nipun.gupta@nxp.com> References: <1525168731-30912-1-git-send-email-nipun.gupta@nxp.com> <1525280972-27736-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: MAXPR0101CA0016.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:c::26) To VI1PR0401MB2431.eurprd04.prod.outlook.com (2603:10a6:800:2a::24) 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:VI1PR0401MB2431; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0401MB2431; 3:FpUEHT4CCKJHcJsW+4sxKnM6qDi660g/K3yHoRXmwsZqzrV/x0xGpT935xrdg3RyBS6bF1ksALli8bc7DF9surtAXxGx5fwedEvoY6ieVPAemgk++JVETY5LxEltTW2zyp8GSwZyPzIVapHKBl/juSAPYXBAK5brYZyjT8SkA/LdFrqZlwZ5jhdmXXA765ZrvtNPrU4Ga6SOI8maqi1S8vJrfy3tUHKo4bG06F2P0s125gPRK0XerJIoD+meC9Ni; 25:PVZoWLgmzzY5zM/6lBL1AV4UxWNz+wUmxyo2iqoZK4VSkpSChZa/hvMAkgOm6GSsMmH7kemKztI9ZHv/IgmZf9ZX1v3rMdak2KD+mn4VkkWJKSKR+tZ4fBjk6/+Y4qjjUUKh3ayQXIp2QlG4MbFdYcTFi2i15DXpyKTw2CPIYT6ZlLNN8Qn7IntqoHxTM69HjnRlDnPcRNdMhA1ILEfbLhh32gvl/Y6fB3Nm/EnHEkWxxIw1TFmql3UqTEjLwMLoXeXj+ee9AT8UYWu33mwOUjmAtqH3oiL//OFA/UQbUerLqEUoIdAKXJTWiszZ/rtTA+lvn/zIwKizsl8byUEOtw==; 31:ZAZwdO0fvqkBm7m1mECOxAlusv3lRbp2v1d63CwgiEzUWw4HUz/dZnrG3szATG+lsPT2kqRPVck/6Y2wRtrst8Pubf5apJUezkaokTikPkY2lFPAhJ69pcov4pLnyWP6ffZQpIJZS0e00FmPIU43IcN1wg5f5VJbDnVadPL82qkw7O1JoDp2wS23eKVy9hFhPyLKBKL3YN9jSH0VE6j2b/HkUzlgEjU+CvsqAoo8ATQ= X-MS-TrafficTypeDiagnostic: VI1PR0401MB2431: X-Microsoft-Exchange-Diagnostics: 1; VI1PR0401MB2431; 20:L0oalFJRBuLhqtE/Y+jt6sa8zhluW7FNuUlTFL3+Ei+KwYNly4IXc1ujq3VUW0YsZKj6vCF4jWZEnWeB3A5Iblv2pS0jIOVI6CNJMxe067A3hP6+/qJRW2zdnJ7ABvAVhit4QHi9B3+uryJIt3LKuTPYtKn7m6suJcNGhrqn7bg9js1omF93W2TkGYrrHIHhq/FoHS6U5v44v1f4hPX25OK6rIGpUmz/YC371MPeA/T8kduvlZIrqJr1sMcvHddFrNQkAD5it6J2zFxMDjtMh+X7FXmWWrvs+teawD445nS9WLK+pM/t5HnQzCtQG2Byj+uuag1J0cFEPErKq2IwzgwfBRKc4TW17HYTtLC+stBt3K6qCmGeBOq6zw0p2KYfiRaRBUeZbA97rYrsuMCirEnAR9aoJPn4khGfGJfRJqZFUz6pDedgA7qF2WORlr9z1pk+7bS6NFaKTmetmTryQVPDy6WeYa0zm0rxZ3FT0D34dWwQiXhGZEE29Y+9X3LY; 4:rNlQ1LYlfQuGdPrCXIfGRzOePufCa/4i2QbHGIL5yfz0BTo+a7OK+DzXNcH+OZZsVPQ3dkOVNYq/OuNAnnU1rX6vDXSUP5mYvkgchQRNw7degEiS4Otnu7w9m6grypTj2eQA6EV0WnIX2Crk0cZNe0RcD4NFveeueyO21KbmwnmVDurFoYAAD0EkV0WY/n4sEj/b/LAABHEh3WpcR6MxfaQJu8nUUALfcExR3nMtVrAWj6O42yHy/ntMCGhkwtaBCPmoIB7dIPOPG5bVjrujbFHAGk+n1IuPibcUKANBpFh9eJ5sByFwLCK+E5VUNvdKIj9bX69wAaAp0YJI0ZM6sX5HVZrAy6KFGpOllrclsw4= 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)(8121501046)(5005006)(10201501046)(3002001)(3231254)(944501410)(52105095)(93006095)(93001095)(6055026)(6041310)(20161123562045)(20161123560045)(20161123558120)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:VI1PR0401MB2431; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0401MB2431; X-Forefront-PRVS: 06607E485E X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39860400002)(366004)(39380400002)(376002)(346002)(396003)(189003)(199004)(106356001)(2616005)(305945005)(6636002)(16526019)(50466002)(7736002)(5660300001)(48376002)(6486002)(25786009)(478600001)(53936002)(105586002)(97736004)(4326008)(59450400001)(44832011)(186003)(26005)(47776003)(8676002)(956004)(52116002)(81156014)(5009440100003)(51416003)(386003)(486006)(476003)(6512007)(2906002)(8936002)(3846002)(6506007)(68736007)(6116002)(66066001)(446003)(11346002)(76176011)(36756003)(16586007)(316002)(55236004)(86362001)(575784001)(81166006)(50226002)(110426005); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0401MB2431; H:b27504-OptiPlex-790.ap.freescale.net; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR0401MB2431; 23:NqOlw9PuKYtHbliqZkjcsAeYt/B+oPbLEne09wx?= =?us-ascii?Q?t5U+Z235zJXZ58ti4YcTGz8R6aecq+3m1/EyjEut7Drmka/+bY3EfrJ8KLvb?= =?us-ascii?Q?V71m+ap5OJUCv+6XSY/GlhsYxnh55V4R3XosUyV1uecNIDjhymcmd0NnUe5v?= =?us-ascii?Q?wom14l5hqa/MSVftAX2kuexmRtXZHRckfUKVeJbIN9rom7bFTUmlszydb5A/?= =?us-ascii?Q?FChn40WsV2kKVi1uMnK3CXWdCmZMjjskoxCYPDVIJjjuKk+EarJtvrtRcl78?= =?us-ascii?Q?qWl6ord9d4k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; 24:/gqslUHPVF/s/5jcV0BdjZYuuZeGSqSFKn5wmwXLdVKk5OpJSJXKlGIqeGQCNaRMHcCN7rcTiRY3MBf90bFuWjHkxkq/+TPf/zEDi0p2n9E= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; VI1PR0401MB2431; 7:Ya8rLmf+OAFBsXj71E2IKcDCMx2UPmKY2UY2vrTtbW0ft/PIGSBnq13A0GmHlkwWw7NziQ0Oii0HsNwiY1adsUrbT5C5Ij/F4NyIz+tDsApE9pNEooj7tz1VZ0B5J1lgVqAcpqQMG3UUyD3oVZptVPxV+bTSjGIJ6dnMN8U09a3oXk55rcUUhaT6Fn31w7YRBG1fEqwdRqShEiRfJKSgoIv20o4rXovVu+NBjVRM5848ADBiILqPTwMZc2bJ13SM X-MS-Office365-Filtering-Correlation-Id: fdbd9750-126b-4473-334e-08d5b04f99f8 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 May 2018 17:10:26.2065 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: fdbd9750-126b-4473-334e-08d5b04f99f8 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0401MB2431 Subject: [dpdk-dev] [PATCH v6 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: Wed, 02 May 2018 17:10:29 -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