From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0056.outbound.protection.outlook.com [104.47.37.56]) by dpdk.org (Postfix) with ESMTP id 7AE09FA4E for ; Wed, 15 Feb 2017 20:07:24 +0100 (CET) Received: from BN3PR03CA0111.namprd03.prod.outlook.com (10.174.66.29) by BY2PR0301MB0727.namprd03.prod.outlook.com (10.160.63.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.16; Wed, 15 Feb 2017 19:07:22 +0000 Received: from BL2FFO11FD054.protection.gbl (2a01:111:f400:7c09::168) by BN3PR03CA0111.outlook.office365.com (2603:10b6:400:4::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.16 via Frontend Transport; Wed, 15 Feb 2017 19:07:23 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; caviumnetworks.com; dkim=none (message not signed) header.d=none;caviumnetworks.com; dmarc=fail action=none header.from=nxp.com;caviumnetworks.com; dkim=none (message not signed) header.d=none; 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 BL2FFO11FD054.mail.protection.outlook.com (10.173.161.182) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.904.16 via Frontend Transport; Wed, 15 Feb 2017 19:07:22 +0000 Received: from bf-netperf1.idc ([10.232.134.28]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v1FJ5fM3020023; Wed, 15 Feb 2017 12:07:19 -0700 From: Hemant Agrawal To: CC: , , , , , Date: Thu, 16 Feb 2017 06:09:32 +0530 Message-ID: <1487205586-6785-34-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1487205586-6785-1-git-send-email-hemant.agrawal@nxp.com> References: <1485172803-17288-1-git-send-email-hemant.agrawal@nxp.com> <1487205586-6785-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131316592428610983; (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)(7916002)(336005)(39380400002)(39850400002)(39860400002)(39450400003)(39840400002)(39410400002)(39400400002)(2980300002)(1110001)(1109001)(339900001)(199003)(189002)(48376002)(5660300001)(6666003)(110136004)(50466002)(8676002)(2950100002)(5003940100001)(38730400002)(76176999)(47776003)(50226002)(81156014)(8936002)(389900002)(85426001)(97736004)(33646002)(50986999)(2906002)(189998001)(356003)(68736007)(4326007)(305945005)(86362001)(104016004)(6916009)(81166006)(36756003)(575784001)(92566002)(2351001)(53936002)(105606002)(54906002)(77096006)(8656002)(626004)(106466001); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR0301MB0727; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD054; 1:naM5mPAX4BIaYnRe7N1BItnOWBv1pFwJI+hn4/MuEWGC87iZrWVhooQVhL/iHZHGEejfConERVgTjwDfiznE2OEk4zPdAHYPFemB0qJT0xZB0nXK41KG+Ap7Kb/ubxXAyAYtOiChNYbRlqFKxZ/7dzCp0R7iUDTstliINFSOHbcGlRp/gxkr7v4/Q9oHZ8H/l64NRJtyFgfa3B1MVnzZJtjfxJYlEB035CmnnWTS9tnw51APcMBv6fl47oYJg1tsBBYCFPaD54LgxVdS7Kh6N6aJV7ebyglFFh26Ax4X3/tbTTy41Aw3tghppoNLlRM2RlDYjOIc+fPnDVTCN7yIJDq0zuFnItr1QcjMv3cgc7K6wt2HW2x3U6nCPfnNrU5/xpuSGN3Vvzm8P6+8XojvAER0oSK13JazsbyuVeSBzya1q9xrxPpr5XUKAb8meDyr8zG4za14x5AL6m1sjeKXLl/QMmnUVzzghNKtIz8QmOMN7R9HN66ggCXe/Y8V4Fq6oGjxQ5x9Bk8zZ7OLN2eTW9drQd/aNZtsXSI8sZTLMsId/2NomI02nan84728HWXOir+5hE+INJOS1YuzqQiiBaPZ/nRo/3B/j7G+EMwauEZOkeeoa7JwAHBIPYaDLDMrreCHXprR/hBSOOdLpnU5yw== MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 58d4a5fe-8822-40ec-6aaf-08d455d5df36 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:BY2PR0301MB0727; X-Microsoft-Exchange-Diagnostics: 1; BY2PR0301MB0727; 3:QfjUX37n0CfeYvDFVQ4GOs9xXldFRohfR7WhSmwzU4C57nhYfBPz/CqMfqo83yFABSO+wgP31jeuQsKnRSaEhNqN9wmND3A/s8dZf7bi++NMs7B52V2gIQlI/OllOXgRm6GZtV9tROrufDJ7rVzyMTLWZhX9KS4gqb+QIzu+Tlo6X8mz01YnA5pf4/zzPJhOZGMCEWJFIdwxGliqIiISud/cXf9Ck5q02GLmZCtevVFshQzxSL2blmBD7n75KHNuelv898UcWqo0CojVW1jfMPDYz4hlAyZRK7xDkoJIfI+Qxn0A5uf3GINscCnzEgtiVOY1ATH0PURy4ZGYbGONtZiYtepCY6FcfjPCrVmbFlqpcSkKx7oTeD6zU/5wQQsY; 25:+KYAdZWPJAYkx4B93a0fVpabvaXnGEf9ZjkTh6GVyvNasOYLpRzNKH5vHc6OONh9LdBYrEnw1eEH68uf2B1tWe2eGg4xcWj2KrperXqzxkiEh1uWFii5+JhZZkJ4xwqpm+a4FBDIYAcbHOZ9XDZJgIcaU6enlLWBzqJvPV1QWYoPMhYdqWzXgKrau/8mzI2uMm36CV79LVw+nFaR1qL/PlaahhyLLmuLrDx7UL1vR9ujz3ioThsOJ1eQ7CkQEpbFqHmauJSwXrf2P0OafEGHZa2DJ+hc+Vv6ru+SdZtghyplq+B/s4kDUoFL+0cbg25lUUTKuBBKppbehSbO3IwWfaELAgHUTAATImAF0zlrnhFjJnmag0ZBBkh+RpLWWv+9pcuvqHH83tJwRi3ZyM3QhOfTf5h9u+ULhaDuKObvywUuFaoQ0m3n0role4v6PNsZzIRQ8+ssgNffSAuRKjWmlw== X-Microsoft-Exchange-Diagnostics: 1; BY2PR0301MB0727; 31:qW0Os0r/1qRVGxbU1sSwZelDJVFP/MjjJ2w61pS15apYiGNNHK+d/XV2R1l6EJhQqCb4kR2L2uNNQWhKcPRus5hhuL6Dq0kffPziDtEHM8w59OWaCEsCepgCvYlL4FfvIopkgO5RHt9u+7wXD8tzk+mEpNKDGDzU3MNvKv08mvkNpKj+2omSFEdLm4hnAXTd6L9z1Gqv2PIDN+SzGvGYEmnYZpgH5ghYZtpnjtremk3jNr7ZzGswTSkIauCvwIzuLPhEliCd1uBsn5lShTi2Fg== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(275809806118684); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095060)(601004)(2401047)(13017025)(13018025)(13023025)(13015025)(13024025)(8121501046)(5005006)(3002001)(10201501046)(6055026)(6096035)(20161123565025)(20161123556025)(20161123561025)(20161123559025)(20161123563025); SRVR:BY2PR0301MB0727; BCL:0; PCL:0; RULEID:(400006); SRVR:BY2PR0301MB0727; X-Microsoft-Exchange-Diagnostics: 1; BY2PR0301MB0727; 4:rtRZHWP4S1qjyKLGmCUO8AM1q+PP0ZfzZf43DDjqFiBIiA8TiGOgc0z9I8nmQmgKL32a+kMrBRKqAQq07z7V6dn0qITgak7xii5PEOGnL7XzD8m4h6YLAyP5A+J8k52LxEOJmZXv41rMignLlQrJnmFRRy/IiYaT+/LqSEpT8BspICCcUf+vn4M9JBIIJLg9PuGFpw0Zq4usmuHegEoCbJfpHaI6zdHjtc6KjmMHOOELKK8qbETVsjqzyizUreE4X35fMRG7benPJCUhpeStrMxvexbMBzQIT7szrMSXvlFSRq6S5U36lsCQa4q72a7z36rotjX+m9frvCTiMk7hSRrvcDJXdErIAsbVf0hbIOn5fqT98NdPnEa00BDhUAQDcZ9aN6+tkUT2kEsrUpacP8TST0fFZl3YWcv+gNEo3a/a0CTE8QqktzUYqXQ2dFZQD/cog0BAKV4Ds0sxal7vanrROpApSF2F5oJo6+MphBb4/6+w1QzkXozbtZdn4UImh3LtQRPRJV9PzGsUvfkkNde1BG9/mLNcGrPm9IU0z0BYtDblRAj5ZPsvqnjnUkm6bVbvC8/oRe3p85SgmpQm1lqvgkDP76GZ52b/GRQHd4MA7X/ht8AkV/jiG5/BmheitWiczcefCV+HHqbmBZNEM9qpDUTE2ExYN2xVYW2flw65YQQnd8MoXmbkTta4Amxsqxy3H/BPE2L/1yXTol5/CS4dkDXszkK89/9stoIf8n9gmhebFpvJN/RSEWDlzl+tuZA5Yacq6IFSLK3pzG3irw== X-Forefront-PRVS: 021975AE46 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY2PR0301MB0727; 23:tunfdnB2lXA44KWxQX0ItBqw1hF6CLqPC7cqx73?= =?us-ascii?Q?HrXo0VbCynsNzRM8B1G2rDZ453BKjloWRfhgR3jfV+r6z44n8cg2XXKZL/gF?= =?us-ascii?Q?UyOJoZrwCF/8sVIQLiR7CizcsFUOe6HjNlGOpj0N2zE1PZKUrJ+/Z1tUftO0?= =?us-ascii?Q?nYVVx1/zuvJB8cI38rz+bfj43IFgq+qfClWVzphY+skPDeG5/VtP+kzvrObn?= =?us-ascii?Q?Zp4WZbCd+WVfVDjzlQrDPWjXtCRk6oZaes5wyRwlpTT36EbcAzTzlD6PlKl1?= =?us-ascii?Q?34bBAwVAqNn1aMJDO44+IO6D5ldLeU0VuQmScR6QFdD7n4qcCxha218a/Yk0?= =?us-ascii?Q?EsvSgvhmTIeOzKnDKW4s/aU7zI405kTkD6cbNmvak2h+qT6sR61iezr6C1w1?= =?us-ascii?Q?cWc+M+cn5ljoFps2SXF4rfTwGuKbbRTS1WkXXU1iHkR85xEQFOXDPjoqsxIs?= =?us-ascii?Q?cN5hagCwMbIJBvpKRzIwj+pqTaTEQVnaz3fpa1jINJxlcFJA9cKbUQMto8zI?= =?us-ascii?Q?/+1+2wvKYuiAxLtXrUQhdoDffUjx/dG40P3vt5xMgugJcrla3H/HABGn1x7H?= =?us-ascii?Q?WRm3LVpY2JHjreQRYa56nmkDemssq5tBB0anrZjVwzVb3lwWi6KSWTcFefn8?= =?us-ascii?Q?0DrEK6TvdWOsHlT+GBerZQ38tYQsC1BgM3YEcSCiwM/MY8P3YizcLvxgIb1B?= =?us-ascii?Q?YCMlo1BtFZgUTEatoYgs+y5dSKMi98RkDotYb0Z+7ZcP2yAFfa1hJLfn7Jnu?= =?us-ascii?Q?7rb3Jnun004qrOQ5XS6snk5uG9l9wGW+NLuthVK/TuSGEwyLU1eFgXUkjxia?= =?us-ascii?Q?ucDk+zwT38pVXXH+26X+rAKwcsBbn5jF5X9ZQy0UlCqiToy66iY8QIwoaFEK?= =?us-ascii?Q?leafYHBtdKbbQUGwGYBMSfYOYopPp00l6NQH5b+wi4nTk0ZgtL1z8ai3CGeA?= =?us-ascii?Q?fj9q3d/jnW1emzMLKTocHJUThHAv6VIczlworMTLpEfYR4vMcUbibeHPTw5M?= =?us-ascii?Q?mkBvduCJW6G8Eet51OcWP5Nai32E6jZhJS5Ec6qxko+hCFg3KQsvhaIGhGBz?= =?us-ascii?Q?lU3xegqWcIu9iQPpEV29PPHnv0FMYD78MGEWaf2tSx92yX3JgScks5zoW3qC?= =?us-ascii?Q?/hmsUhWc3H3nF3V7HMYzmntz7aozm78b3TSKwAbLGR7rRSDlJ6u3RZOm9eHh?= =?us-ascii?Q?UoivgjKPRO383D9AOREA6cir7FKujaJRVfnGfXk+zYH/+kYjgbQj5ixfPX4U?= =?us-ascii?Q?fqz+99d/ZNDPbB3PZrj10zmftpGa4OJWeUUIIo00ITAhqx8g/K8Iyb3qVDx6?= =?us-ascii?Q?O54kO9qlqm2glCkldDR49Bl9MF622xOwJ971WPuqR46IC+RiKlaX3ri4HtWp?= =?us-ascii?Q?ex30R9A=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; BY2PR0301MB0727; 6:OrT3iuOsqtQtmQlFGltWNUFnfa48vQdjbt7REurtgXtmrEs2CcDwLLm6rRO/48A57wWWRYFIzN1oSYVq8Kgy6wgvrbGlyVUt9ue15I31YaX/2csRYW66fTqMUKVY1a27w6PSmDXjhznjvEnp5zATefVDCA+d8mtJBp0+ZIBPUQQH2wuDNG9MKuVKDaBkxq/NsGMblxOtP77ctzf0nwWeMvrdUiVfNywXue7/pZ8YVQVPrZGXcQKMnwaq5qtqwRrdyhFS0afHrK8aS6mQ541tDQS9O6M6CJ+tGXPH8u/Ij8MCgHLmH5bmk8h9jGlKerYC+7oimJpYKDVK2KGUo7bG8cGZhVUkEatkt3KiMUPM8bx5l+8GeviHmfnKzsF2cPYRHK/ZyMfedLovI/wVQA6zyD6fCsBCae4AFLyYt1/XJOA=; 5:FuYQOfRr+8Z1O284uM6ChyKAWwhs0wmt8B1q9lfP8695lXzXIx3sLh4jjC1UwtkKJakuw0qZwyGiYwwa2CAMp/rdtxNEnfsc6QFOVYmwOmCIy3vbztf+cz4USrdl3gkB6wY7sg4cJJRrV895pUkkrFpq9AaFA5ji1wHxiDtN5xycXvGiCvMeYCHjhvvCE0xu; 24:ebBrorFBqBWj/gmREIOCIAi0Ghg7X2niAbQfmxFOIRxMPiuqIGtXB1HFTv87Hzsm9UPVUSvuk+S4nsiXMj0BxyVoo80VjvjuqdAFQhgYSGk= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY2PR0301MB0727; 7:Ib+cf43sVnyKs2bC7GMhk3jecpTMOL3mYm/PduR6CRWoqD02T2Xp0Nc+E8cTKQ55oVDVQrmyeJsOA0F0pQ5LUmxQkQx4o5yUVP5IQuoUK6QduB65W6x/8md4hLCmur/U0C3HKTpFWKQcpJARXXE1SresyRiHoQ/eYK5c7ESai8pacoQB9PNdQnI/vjuwT/l9Vlk5XWLjtK/vCTLaQGnCMx706yaqbp/oOOCXTL64HROSa89KchifqbHf/hptpgJ4BwdbOfr2BIn92cmoBjenVltJ2vPVp/o2A5uxYJ8+foG/A6rrvSPvSR/2sapnf5h569a/fmiMcgsTmxw3xvdiPA== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Feb 2017 19:07:22.5647 (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: BY2PR0301MB0727 Subject: [dpdk-dev] [PATCHv7 33/47] 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: Wed, 15 Feb 2017 19:07:25 -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 2a8d9e5..c26360d3 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); -- 1.9.1