From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0051.outbound.protection.outlook.com [104.47.36.51]) by dpdk.org (Postfix) with ESMTP id F07D269C6 for ; Sun, 9 Apr 2017 09:49:05 +0200 (CEST) Received: from CY4PR03CA0002.namprd03.prod.outlook.com (10.168.162.12) by BN1PR03MB284.namprd03.prod.outlook.com (10.255.200.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1019.17; Sun, 9 Apr 2017 07:49:04 +0000 Received: from BN1BFFO11FD043.protection.gbl (2a01:111:f400:7c10::1:108) by CY4PR03CA0002.outlook.office365.com (2603:10b6:903:33::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1019.17 via Frontend Transport; Sun, 9 Apr 2017 07:49:04 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1BFFO11FD043.mail.protection.outlook.com (10.58.144.106) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1019.14 via Frontend Transport; Sun, 9 Apr 2017 07:49:03 +0000 Received: from DTS-02.ap.freescale.net (DTS-02.ap.freescale.net [10.232.132.223]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v397mBLb024015; Sun, 9 Apr 2017 00:49:01 -0700 From: Hemant Agrawal To: , CC: , , Date: Sun, 9 Apr 2017 13:20:21 +0530 Message-ID: <1491724224-6319-19-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1491724224-6319-1-git-send-email-hemant.agrawal@nxp.com> References: <1489754838-1455-1-git-send-email-hemant.agrawal@nxp.com> <1491724224-6319-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131361977441024017; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(336005)(39450400003)(39380400002)(39850400002)(39860400002)(39840400002)(39400400002)(39410400002)(2980300002)(1109001)(1110001)(3190300001)(339900001)(189002)(199003)(9170700003)(54906002)(575784001)(86362001)(53936002)(77096006)(4326008)(2950100002)(6666003)(47776003)(8656002)(50986999)(76176999)(305945005)(5003940100001)(48376002)(50466002)(356003)(36756003)(2906002)(5660300001)(33646002)(104016004)(189998001)(81166006)(8936002)(50226002)(8676002)(85426001)(38730400002)(105606002)(106466001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN1PR03MB284; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; MLV:ovrnspm; MX:1; A:1; PTR:InfoDomainNonexistent; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD043; 1:l4yns0KdAq69HdLKmchgZtQTDAX2qB2Zk0uaRMEH2VDU/Vs724EsvwmZfaUIXCLQcryTdZjxgprMzuU3lGx7OOzKZwhZvqBkzwpse/eW1A4cWfVD73XVR705o7k5+66NQOpTtzdCWf4JD0i7GiVUtVaB6gK434xJDsYSQE7aaRsIdgoGemW3vYwA5tO8MJMi1g5qgQtRQILgTYdiYL3UcIVd0TicMeH8s74WR7gfbIowzslesnjjSEDEnSsoy0O4y9UDgIJ7OvF3JqErDKIUvMRfvEwMP0hLTeycayVryfnXJz5NcKaE9LdAR+8KhYMGSZYKUPLsI76+TmFNqe5EswnATJja0gpeCjZvjUAgVYKiKOGVqqzGNH0vI8by7+n5ctdq3IE582pIEe+2yHw42h65Lig76QoyJYa2KfnKlVEdM3lzbr1cKkpbaZN6BYDIbDpqVZk47bZziLEp90roAN47OV+XkTGPYCvGbq3yT8KlFA1UrAZ3Y+5OdPQXeHq1JD/o72dXSXtChZu/6yI60oU7MZfSlI5cP8jCZLTbJOKhONGjF2WdPXxBX6CgxZnauEZm+qxfxP5xvkDGKWqhFgTpIPm++VhjWZtPd//3+mZoffclUjBTGPOjNdbKDMwgHOQ8VRZr4rFXFFAQdQgzVsQn+YL3WehlJ6LocX5DbibZ36QeX4oqiTKnHVssrS9N MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 6a395b17-f600-4680-7811-08d47f1ce4d4 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131430075)(201703131517081); SRVR:BN1PR03MB284; X-Microsoft-Exchange-Diagnostics: 1; BN1PR03MB284; 3:6DkudfcCYheYAso2Ae32uolFLmxHuOSnwyn//OXAEh7aEkn3UFwF6yItNW96yUkLgpyBAotcLykz5Eho3uzVYbmdQcBFAuGkSrPG/JUBg6Tvna8aDLLYtLfxOERKoBMgTZsArmYY4UBa8TNzCh9exCqZPN+zjFBgGNS6IOHZE/Ro14SjxW8TjWdBF5qYzMJpciF0kvLnwtMyMCue4wWztqZcHWoY5IOBAHuszQs3F5crEVgwkireYmLsEOsoM6sNHSpC86fdsk7wb6FfJGGsFyce081HKEsYYA2K8TzHqH5pefc50meQvPKTKOaTPNvpGckVLBlmHZmOASBBY511CPWR2DNUJcsVgcXv0opaiIq9F8B2CShuU6vTN03QZ/j8pi3JkngnY8AH+rDM1zuUNhY9tx5tKHu8FfyyqEFE27G7ZNbU6+pkIzdFw7RjiWl0; 25:zFpzu2R5vjtiEMilRaX5sGTSd6FU3HHglja9soU2LeP2T4/bmW7N5tBrfPF5Y8OkU+SXCzyQFmWirpTTcaKUupdP5jJe7QM34wZDMzA79BvVxY6SMFP2aC6LRagi/WeSNbQeOXDJLpEGJ4IdDryuBPXRYtuCbAt3UQgYRWlMFiomHmGvhwCSqLf+yZ8s338WeMbteBcY4UKJuZG3gh9tdHt9bx7TJZ5NofDaBNZsnXMCK20EA3Nq0VcrV12+JWdkvSOLSm8TpZ+anyNKwXc9VMgK15biV1r2aFnUIxUUOllnQTHboWbF+e8N8czZsYTS1wsgYeFIBbfycXZM3EJUkaJ0ivGiu8YIEDAp95lOWXbLgIBErIoMY0qsP44ltUgaNMt2toK1g+d1NXrWbJYH+i9ZeV5KrU8GezKOLMoP/K4zcTsPtv07pkqC7P7mC83U09ns1WXgMX70WZQkXY8Qug== X-Microsoft-Exchange-Diagnostics: 1; BN1PR03MB284; 31:WLFI2iCvs/gdLlLAyFlJ8UW1AvhPvTT6lmz0O936dt2RgXIuB+NWLUwSAGSvc7iOEg37abqIcuaVtcHBBHVv5LBkCETKER1XuLvzyHGD2oSmv1wLWntjK+QendeLYivRp8zEhTnElHeiQDjlUIVh6r798G+HCB7NB+iFBDZnJ60vsBFwH1V4H0/Q+Low4CwAgcfaibPkJl9r7RMkZLphMzriAwFKxAE/V8esvsbWF5C3CSMpPeNY/5Ve6HMsFHfxTZ7t8r1hTsRmVc5sTwjoAg== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(275809806118684); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(601004)(2401047)(13015025)(13017025)(13018025)(13024025)(13023025)(8121501046)(5005006)(10201501046)(3002001)(93006095)(93001095)(6055026)(6096035)(201703131430075)(201703131448075)(201703131433075)(201703161259075)(20161123561025)(20161123565025)(20161123556025)(20161123563025); SRVR:BN1PR03MB284; BCL:0; PCL:0; RULEID:(400006); SRVR:BN1PR03MB284; X-Microsoft-Exchange-Diagnostics: 1; BN1PR03MB284; 4:T3AsOKA/UfUhtv2iIMwSE2QS+O0tP6QJbyp1Su0KZvD5iFVcNCNhXKZx0WCzZkr6UQ9u9H28V55n451uVZeRD5WfRDHJle4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v/qxz4nBlOXvPHTDbSJJ?= =?us-ascii?Q?+gjoByii+Wdw9n/B+AwAY4PA8osoennuHvD51Z0REtRNJAL9UIc03b9DYpDA?= =?us-ascii?Q?gvmIIdaF0r1oj7jms/h40O+iXC0fnhYT8oNtdOPTJhRkTfdpimWQTB2L4jxr?= =?us-ascii?Q?oLE98RDYADe4NHqq1YNpdW8M/JHd3BitbHOVsaaLTvol0I5hSrhezrkyF/b9?= =?us-ascii?Q?wuYcC8/+SuUzHq4NrMc1C4ppu7Bin4eufKl1mGkFDHveDmuoxAOFB2ttzunf?= =?us-ascii?Q?h2++cbKoQur1Wrv6jELdGxaE3lk5Mem2LI3TZZEJ8zEl4m3TbHPrGehqO51l?= =?us-ascii?Q?j/LA3bgEVtKFMqIOv62V6igqSmf7tC9tGZBwwbt+ihbLUAgwu76zQczOlhyE?= =?us-ascii?Q?a8ua+VwjskQW2R6Cy9RMHCmWY31HqiSURPoSntYwaomkndBAPHDxvldkE1a6?= =?us-ascii?Q?jsM+QGSsSeASSI4CCltRuamGWmYLVfLYfP95LNE4ZGWhrg4bEa2woOazFhIG?= =?us-ascii?Q?1kaNTNerSu5cijt1WeFd/VuP+uywq2/GkSHZXIJ+QGoCTvP0zRgWuxHpht7F?= =?us-ascii?Q?49HLok61wUDJrLcQ0EYR6aqT1KujkRIINsj3du7xuyFvXhtPy7paLOSaPf/J?= =?us-ascii?Q?MZJjSZfn9Kay/nli2lNHtrrEfyAhOON3UlpQrNU17iDxIxBrzkLxKZOMtcet?= =?us-ascii?Q?5sD/l0W7PNc05+EuruUCNHSw1fQT8NS+3n+BxbFbM6M9P9E+RRR8/Sipu/l0?= =?us-ascii?Q?BK4QCcSGboXwtNDUMwgAuB/E2vP8YGSZxfSeikKMug4b98BMa7GhM3H734Xo?= =?us-ascii?Q?iiUWKJ1yTzHHzXX5ShJdpv+EityPno1rJRQzhS106OT9VF2JLDgSePLpXYEs?= =?us-ascii?Q?l+EVX2+faYP9pr2Etc47qSFsXJa7NA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nosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN1PR03MB284; 7:e6EW0drmM174eYBaVqid8Hl9JtZGypAlZ3OI8yxBZMDIaDQ2srqhZYaWvb0rg+gfVPHak+FRuYAfhRAWkIfOyVw4ZNH5rYtr47CmGHxtHn1DCdpJQXP18kVPJBbePsTd/jlLGabGYe7ztYDtl4pgTT3yug8GoHkra0sW4oo+jcgWyGBKGmSma/mtjGaZhQzyes8f7pxDXWYM5igm94m34il7u2T1RwdJsUDNzAIajYSFJW9j0i69CEYyo95vhHNpUopfbKlDDRH26f/AWpxTL7RAEKlfR56jXp+iO5MGWeoDe8MzjKRoiE5GEq1RBwvzhPswoeR3+Vplzjg8gcY/fQ== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Apr 2017 07:49:03.9152 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN1PR03MB284 Subject: [dpdk-dev] [PATCH v3 18/21] bus/fslmc: add packet FLE definitions 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: Sun, 09 Apr 2017 07:49:07 -0000 Signed-off-by: Hemant Agrawal --- drivers/bus/fslmc/portal/dpaa2_hw_pvt.h | 53 +++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h index 4e25803..b405af8 100644 --- a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h +++ b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h @@ -43,10 +43,16 @@ #ifndef true #define true 1 #endif +#define lower_32_bits(x) ((uint32_t)(x)) +#define upper_32_bits(x) ((uint32_t)(((x) >> 16) >> 16)) #ifndef ETH_VLAN_HLEN #define ETH_VLAN_HLEN 4 /** < Vlan Header Length */ #endif + +#define MAX_TX_RING_SLOTS 8 + /** simple.addr_lo = lower_32_bits((uint64_t)(addr)); \ + fd->simple.addr_hi = upper_32_bits((uint64_t)(addr)); \ +} while (0) +#define DPAA2_SET_FD_LEN(fd, length) (fd)->simple.len = length +#define DPAA2_SET_FD_BPID(fd, bpid) ((fd)->simple.bpid_offset |= bpid) +#define DPAA2_SET_FD_OFFSET(fd, offset) \ + ((fd->simple.bpid_offset |= (uint32_t)(offset) << 16)) +#define DPAA2_RESET_FD_CTRL(fd) (fd)->simple.ctrl = 0 + +#define DPAA2_SET_FD_ASAL(fd, asal) ((fd)->simple.ctrl |= (asal << 16)) +#define DPAA2_SET_FD_FLC(fd, addr) do { \ + fd->simple.flc_lo = lower_32_bits((uint64_t)(addr)); \ + fd->simple.flc_hi = upper_32_bits((uint64_t)(addr)); \ +} while (0) +#define DPAA2_GET_FD_ADDR(fd) \ +((uint64_t)((((uint64_t)((fd)->simple.addr_hi)) << 32) + (fd)->simple.addr_lo)) + +#define DPAA2_GET_FD_LEN(fd) ((fd)->simple.len) +#define DPAA2_GET_FD_BPID(fd) (((fd)->simple.bpid_offset & 0x00003FFF)) +#define DPAA2_GET_FD_OFFSET(fd) (((fd)->simple.bpid_offset & 0x0FFF0000) >> 16) +#define DPAA2_INLINE_MBUF_FROM_BUF(buf, meta_data_size) \ + ((struct rte_mbuf *)((uint64_t)(buf) - (meta_data_size))) + +#define DPAA2_ASAL_VAL (DPAA2_MBUF_HW_ANNOTATION / 64) + +/* Only Enqueue Error responses will be + * pushed on FQID_ERR of Enqueue FQ + */ +#define DPAA2_EQ_RESP_ERR_FQ 0 +/* All Enqueue responses will be pushed on address + * set with qbman_eq_desc_set_response + */ +#define DPAA2_EQ_RESP_ALWAYS 1 + struct dpaa2_dpbp_dev *dpaa2_alloc_dpbp_dev(void); void dpaa2_free_dpbp_dev(struct dpaa2_dpbp_dev *dpbp); -- 2.1.4