From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0074.outbound.protection.outlook.com [104.47.33.74]) by dpdk.org (Postfix) with ESMTP id CE1567CE2 for ; Thu, 15 Jun 2017 11:00:36 +0200 (CEST) Received: from MWHPR03CA0015.namprd03.prod.outlook.com (10.175.133.153) by CY1PR0301MB1196.namprd03.prod.outlook.com (10.160.165.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1157.12; Thu, 15 Jun 2017 09:00:35 +0000 Received: from BN1AFFO11FD025.protection.gbl (2a01:111:f400:7c10::102) by MWHPR03CA0015.outlook.office365.com (2603:10b6:300:117::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1178.14 via Frontend Transport; Thu, 15 Jun 2017 09:00:34 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.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 BN1AFFO11FD025.mail.protection.outlook.com (10.58.52.85) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1157.12 via Frontend Transport; Thu, 15 Jun 2017 09:00:34 +0000 Received: from b27504-OptiPlex-790.ap.freescale.net (b27504-OptiPlex-790.ap.freescale.net [10.232.132.60]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v5F8xWSh012830; Thu, 15 Jun 2017 02:00:31 -0700 From: Nipun Gupta To: CC: , , , , , , Nipun Gupta Date: Thu, 15 Jun 2017 14:28:49 +0530 Message-ID: <1497517136-11824-14-git-send-email-nipun.gupta@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1497517136-11824-1-git-send-email-nipun.gupta@nxp.com> References: <1495735361-4840-1-git-send-email-nipun.gupta@nxp.com> <1497517136-11824-1-git-send-email-nipun.gupta@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131419908346682110; (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)(39850400002)(39410400002)(39450400003)(39400400002)(39380400002)(39860400002)(39840400002)(2980300002)(1109001)(1110001)(339900001)(189002)(199003)(9170700003)(2906002)(105606002)(2351001)(106466001)(33646002)(76176999)(50986999)(50466002)(86362001)(48376002)(5660300001)(77096006)(54906002)(104016004)(498600001)(8676002)(36756003)(356003)(50226002)(5003940100001)(81166006)(8936002)(305945005)(189998001)(53936002)(110136004)(85426001)(4326008)(6916009)(6666003)(38730400002)(2950100002)(8656002)(47776003); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR0301MB1196; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; MLV:ovrnspm; MX:1; A:1; PTR:InfoDomainNonexistent; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD025; 1:6mVaG8e78ZEHqHdMJRKigvgKMqSFL9jiNdn+PcnD/WchavDPoEkmviZZk125WI0/VqKfEdWz+VtdHJhdV0t7EJGyzuhIlrN8m0qTL3QzwrR5yfH49sgW2CUUV95qr+IFisHeEiB+IGXsm/EKY9FBqFLJuxHwxml7nVpW8YfsXy6jr+FnXhkuDIgHxP1+6eNgDo+2yzxVefUIPDKLcJ9UIrp3XldgLKw7MzOTLMCfijicpvtAS8+ggeUbmNz3AG26FQqwgCTlkqaC0Kj3u6Yngxmb8jxXrPT3Blglt8Jza0yk1JocdYhkiSwxA3KNfIu5nNJnlLhu1san3vVU2c7S+lWWMLb4U/AOzjHDF8GyDmS/+n65EuDFNTqRW5EkCSfeZ36d23HM8yhvajtaLPEeUU18VI1raADTQkLc0CLbtGFkJLgPV/Rn5IJrLEuZYqybGvjpdD7/y2CKhmPxna5a6ZfJXRBiK+iqs3uthdwq6OrRVQqbvM2KjpL7Ll2ntaYcQHIVFC4D3g5OYPePHHhmGOHp7SjkI2g+Df9vJkI+zcvf9ihZKt24LHAEAtFhlQ70Cct+AG/WxOgmxV5YbFM0LuKsPqzpcAxJMzLYVeQmcRG++49ZLN9PgJREEcPHmiy+oCTCAIaMND99G4S558GdyP8rAohEnjjr3XdFkdDgU3ybAKwJJjwXdB6cAkdq+VNEDkrgH0rORh12nYnJAOyt+d3XwCyruA4o9hZvatgn0ns= MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY1PR0301MB1196: X-MS-Office365-Filtering-Correlation-Id: 96c30f20-df63-465c-b99e-08d4b3ccfbdf X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131430075)(201703131517081); SRVR:CY1PR0301MB1196; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301MB1196; 3:iwQIPJvy6k3X581hB8oh1UOIc0TzHOqa3khbD0QthoqjrkGGQxwcUYPx+21RA6wq+O0OMzqbtYrb8msXMmRj6guMn3BAW/3OKCwGwMUssqBquEUYleFLbiaC081Z2BQqC9zK63yO4lJULFSmN5NR00KnWtqM1U5AK4+0yDyd6UG8jZ9h7EVGDePab1H4TlDQGf8C5nxrzPcbvvwShUK10kTzy4B/t6gxI9IVdIdib9v5AHy5GCiDlarYt2ixkFw9jgYTBhwj6NG0xlIeEi8n3cd5A3BSfz2QqxdVGaPwbauNcT0R8d36nPlnXXWOKjTkZ/QbzZ2Mte25snrmmv6N7HA90S+j8bEqNxnCXo7OswYwDbQYHByVJLRu8oP0BBpnkgtpQOiDItHp3nTcPHJ4yMEkWTP7rbjNz4a5LH5fQNXDvZ7JLAPT9kS1ewFSGDrP; 25:8KUDtWpz+h7Dkli1f6VosnTJX1gU2uItfyn0lMFTHi7XQCo8o671BGq1RXIoNLlcE4C5abzqkb8Z2Z1qluNLtDSYPS+ezBuhNtkyV4rilAB5pT0Vig4bwus6adLEkV/CH+oJri8v2/iW5ypZ+mG7f6JQ+InJUYQR4lLcfC5whSyRJ/jMgD9zplMB1/Si+2smG+ZTINN6W0yqE3JfSA0H0P+QxS0vZAEAMVt0jruVevnqn0ZBKap8Tpldrle8zFQQbu0bSBVtdNfQx/kZ8S0rMLoh6NjBBBuAXfdGsYbzCXUPhJKeRQs3/u8fIf+Uy7UJ94cUEv8bmFlJ6yLtOa6fnd73y5TqOQs521J5Ar6ZFS3FiE44lOXkfifRO53LUr8lGpZNeaYQH4Bfpa6fOborz0eQ0NYraYpcY7X7liDBRKe9lVapfppomQ/o0NxQcAInHsJj6ANR3kUqWe8s1tekpdIJVSt4sDCKbb+m2KEa/y8= X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301MB1196; 31:sqbuEd6V44nO4aH8EznlpMqabAEIfVfIBl+gO1yhB1MI51MT1Otjzjfumrgu1kztIY9G+iv/iolh1DiGBhprK/VTS/T9vy+sp/A9t5GzLyBkHQIEFeQP03ggD5oMNl+i51BXE8IafTRv0OyfgwdTvVC0IG7QrRt/mBLTf9hRXM0yAafzaX7SSiUgf1602Cig8+dPGcR/ZCE+69eHWz3HkZANCmiX2RjdHS9oyCjQl2Tdp8Ifl3+78gB75WUcUvLPn1TinlsWPMIRpoyJV3o1i3Zaf6pQUfi2xBF5Dr/s5wk= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(275809806118684); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(601004)(2401047)(5005006)(13016025)(8121501046)(13018025)(3002001)(10201501046)(100000703101)(100105400095)(93006095)(93001095)(6055026)(6096035)(20161123559100)(20161123563025)(20161123565025)(20161123556025)(20161123561025)(201703131430075)(201703131441075)(201703131448075)(201703131433075)(201703161259150)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY1PR0301MB1196; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY1PR0301MB1196; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR0301MB1196; 4:yKKzmOItu694fyzyIz82dBdOXbWGl1UJzLkK7RQt?= =?us-ascii?Q?EQthpB2IBaO77x7TuAA4WtSUh3cNDn191AkvcJ+SQjNngjARK9Bb8cfvC8JR?= =?us-ascii?Q?zr+aDgcCg/0K72SP4RSjt4mUtE8qQ7cdGc90LMUNE+aVUdA5h3ohXhoiKnOf?= =?us-ascii?Q?kZhIxsG5XhUgrqot5wSK6/q85W8OC4J3gquRM4FtzQn/Ac4CgREv2JqKmuGB?= =?us-ascii?Q?bhPaLJqm15VQXR1ccFrZoOWuoE2dTIIKIA0Fy9y4DgYGyUgmeDDtNyI0Hhge?= =?us-ascii?Q?yFcN1YYEFvB/s56zuQD6nysfh6gmPB2xYN0HORze1aeLI1k3whpHMaaxMgra?= =?us-ascii?Q?pBJkSbwnlW+2SWTgQcF/fb2AzG5miqRn5KzHvm9Gg9bjVUlLSorD3VQ/1NCu?= =?us-ascii?Q?ois95ARUx1PH0PCod25Pb1b7oVF9t70MAPWqYF7D5pQVOMnsWA8K6Wb2V+um?= =?us-ascii?Q?nSt3y/MJC5nCEqNICAzbJNAkVe6mLd2Z3uheVX21jZJL/G4mwl5XYjCmRX6h?= =?us-ascii?Q?XrUi+bNrHjStr/PE2ziL9S87ebMBH8TjO/p8T881SuyjIF0kKGWfrJ00c+qO?= =?us-ascii?Q?CGBO+BHmx7cXinjY8M6Ybo9rGfa4jUKU3HP5rz7Gkjdotjqvz7SdWiLi4FbC?= =?us-ascii?Q?sYngTmnc4/FqRejgWC1LZrpYht5dIjwPpUD8UcgaE/OYbkHXS7f5UCN5ZRf2?= =?us-ascii?Q?9c5d1/jzdhtosz6bm2ufxbX3JXyxtaZIhqOu1pXuF1z8S37bxGEH2pLmORGh?= =?us-ascii?Q?NmjwI9LDs1V8AN650DMcAawfs5CigXkY3+UygmaZPVU9aLWHC6AyHZAgoQi4?= =?us-ascii?Q?rm+NsT+1qeydVasngwhrVXlx5MwCo5ViAaNBgzKpTL1swT/UtbbAMpdi5QZ6?= =?us-ascii?Q?fRTM+T9mq/yX/z9igbK1aymTic+sTBdtfskBVUrtloVFnagoERNzNGjkyo+n?= =?us-ascii?Q?ntaoh897zFnGHD1ceDpizarmWN6j6jTa1ZpZ/OVeS93oZ8URkRNuu+HSUIAG?= =?us-ascii?Q?7gcAnHKYKoQxsfXGiakHgWnvbryrCR17JZkdASYaZ82ZJE6Ew4qBc7WvGmyd?= =?us-ascii?Q?51zHe81fQVr6BbeJBN7Sxh0r47jHOFvfFlOSPJeF/TJ20MsD7s2PaT5mvDfR?= =?us-ascii?Q?yPWy0STGxNEj23QuJ0JX/uJSH4sTeuwWPWU8UDiXLp/hpYDE9gYc2F9X6TIL?= =?us-ascii?Q?8pVcuulMm0rWa9GD1io5m9iYp8ttIvcwxNWLO0jO1zsHgBO5PKyno2Qizkp+?= =?us-ascii?Q?5DDn/qstynKLuZ2sNeS0CVsSCK8vQCnlSLEo2Ua5rcSWV/fsJACcfrfOiZsX?= =?us-ascii?Q?iA=3D=3D?= X-Forefront-PRVS: 0339F89554 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR0301MB1196; 23:4/WfaGTdTOrOL8+4RY0qMMx/ek0l93YC0DM8Uqh?= =?us-ascii?Q?B16UeFFY8atps1FY63SRdF1VsDW2DmfMO7JWBPPCBbMtH5S1Ieufx7iBbjYt?= =?us-ascii?Q?5EzkX2XzCJOb7DvMx7p0H/lMps+Vjm0jkFjp7NA3MyvTmsjVgZEH7EtVrVNm?= =?us-ascii?Q?JNMTl6PcW6uF+infc7L1cKZzkjdevj/dbc1Nlz4iCYyjCG0LD2WMWX8DwuIj?= =?us-ascii?Q?rhmVfNrlIF9tx0rVvXXrnJQdeEBIET9RvJhtKbIaBWPkvTj3HHkjMa0k6lUh?= =?us-ascii?Q?GiuH3bxWr5/q4UsT2pyE5JOCQCvlPhdbC9+bqPb9SazCHZ9p+nug37HcImfH?= =?us-ascii?Q?Pg3KYo3mcxP3mInP6wa+O3rBafj/2LElu/ltyGb+iFV+gBneaa4ktxUYwTw4?= =?us-ascii?Q?MJXh60fnNRe7TjO32uqqIvCQbH0HGwvVdsgVA0SMmE+BcLcurMcpMIl32Ryi?= =?us-ascii?Q?lG4BLTFyGTiYrySyO1vbavNg0NgRSxfW3LQQ2XS3VuTIv3qxohtrW2tBGGlq?= =?us-ascii?Q?wQLItcsqit9RNmDQWPvx7Rz3S3/vN2mptgO7TLg/n+9W0mvt1UPGgqZW2zM+?= =?us-ascii?Q?lQ5Poo4mpLyjznIyZmjWy2yHh5qYnqv6wCy+4zd5UxTA+E5A8zFPjJb/j3Ed?= =?us-ascii?Q?y3yzdrw+gM5tJ1wMgiAMjVQ/NlhFb6eVGtb4Cu5VV4dWRsWWNWfrHSPy9Rha?= =?us-ascii?Q?B6r1AGK6BZJgcxAX0Msh1V2iSti2BZsPP8LwMzkJFKfNnz697AeSngglBZk1?= =?us-ascii?Q?inyGZaMoC3SutmmagdBxEoowLXPvbzMi/oJgrozegTTyMqwbMrYjeCjuZ14/?= =?us-ascii?Q?eZ4mE+l5ua+FJ4x6MKHJfgOGHouI7srqRonQW/U8JPPoYFS1nuEgcan6jLWG?= =?us-ascii?Q?g+sMw5/nPtk8u2vciC26VGQBwc5dDNGAUdbrIcnwj1fYQr9fWdUFntg+WaaQ?= =?us-ascii?Q?tlNAq3T9sG8dQDjcIFFHYYzlrVk54yHqTJPkrNFRsKONUXeoCKD8gukWKSTe?= =?us-ascii?Q?dZC2xZY77wKSTX3huL5TgGtg/MDdN5HtiVgsfboPW1CIcKL12x0NHpnlDVUI?= =?us-ascii?Q?2fHW8JoVAHhWEbAUpEFVStjliDaCfrP+dL416qKpZQzvixfguyHRvng5nAJU?= =?us-ascii?Q?4XqwrLcgt1cdjMrruVKh40+PQ5PCBgVLrYPurCbb44w0zmQOjXNcN2QpYNJK?= =?us-ascii?Q?eC9kKTwEyeQ8h1Cn7vfkvjvN5dyIq1PLfsoBpdNbKe1lAyIqDLiBQVxmcqzC?= =?us-ascii?Q?ZdjLjRYRBhK+hT6Z4hcw=3D?= X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301MB1196; 6:26HfVZn36gf0zp4WK7hzQDohlc7Sf5hMTijtQwF9mqcLu/LlUBtyPvvNtQ3YRivyLGbH37t68+sLFdm4obwaVAPhn2x50tAwWFzgxP3wn2a1413KfvEV/v1mKXVPHAVGOSSVbsl99QQ6UYgBwu4aiamLbz4mK/7hNlWgu1xLi76yIZr+wma3tpQhRnQf6pVqQjQ1mRRK6bR+YRRhlmLdojKVOgyanyiDGTQEpQhZHdevht8l5OVzhL2tRnxv71labiZzLXvChXZBKI/KjSRnEAc+OzrbV/AeqqTgRF823biMLy5OuMihfF7fPBpwfPI/9cz49bGbuoMi5eWzvnW7f+uBCyv3auaU3FACc0aeqYgt+j1hvauOmG32Hr338U7c2MQsA8eCOxGy+PB6XSa2Gltq+Udd3EvlXgF4fhdTJ675aGRJQ41fVeSYcIpAmC7QEJgskQ5UZ5N9AqqbS1qenbDkSUAxC2yu9uTfon/VngmPmhJBJy4lAvl1I4lclL46 X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301MB1196; 5:zBm5/fNHV8YWBv3RONtMekpYvO70R3177QweXhnXF0Ul5UaC+uEvK53Or+/4K0ZFaon6T0q9QLBF6/ESiJPGItAOA/ublLq0iTB5YIOHp4KldOeodWdrRI0PY5Xq9uXHBNt/VAVC4P39FD3P335rZpcdvJiVSUiD4H0zjZm41PskPW3t5hZdhDaIj5bPWpwqDOfHd7R2R9tuL9kDN/sDdA4nfNaryaVOu69maydZ4AE+8wHke8CA/N9NvVH7jfSHiz9XKPkQLCTjJMeGZkuoiUUt5zxhmQbQNjV0ScsaFZ8u8rz1pQZmUVMmBUxGokiKeJuEjXaRR2fAeoGJiYTQPKCXVEnl//XeX026uQoCUfjJlXdJ9TPAb6iB1+MUKJKPkoF4dE0/ChcTJ8xJidbXdvibCRvjKrMIHjZm5XE9ulxkNb+J961qX8gZ8kzWSrJrfgQDZYC++iNdp6/3e76eYp7QQSRY+aA4F6Z6WL7B/M0i8Hd6ASA4dmfdSVYE13VseQ1SMWCgxBsWg50JN6lpPA==; 24:CfyVp7kMDaiDCYAdDNuqP5uwO3OJgrj+9kO81LhFqNTRBWWiwWK4+hkEn8lECjyp9/WjVG0Jouu2NBKbqhrACU76750LKxSokZiM6mEXA3M= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301MB1196; 7:28+eT5Hi5MwarSpfQwxS5g4rOjcFsTEAOcHnuOu8Wmq0AdKrPMhKFUTOJdLcNOck+vTMQqgQL17fTHtVNdUCYJOSggJ3cxY3Bg4+mgMelZUswzcgAjCfQ1Bp8tPt2sHq3wRfkLiMpLKu0PoqFEYfWertI6GuXkKfbpv663U37Jb08fY8O2C3s+PkMgddbH+z20A5b0NaKhgdIVzbWoNIttFjMyBwrql6g3wjqBGzB/ckElgHYH/kRbe85gSSmqBma+Pm9uLRvmn9NA6TMJvH3xguynoVdcxQ7GZyAsKP/qIe3j9lAN8eNbIX+nTYjpDRoUiR2KBLAfsQXsPsMUY53w== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jun 2017 09:00:34.4810 (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: CY1PR0301MB1196 Subject: [dpdk-dev] [PATCH 13/20 v2] bus/fslmc: support enqueue with multiple enqueue descriptors 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, 15 Jun 2017 09:00:37 -0000 This patch adds the QBMAN API which support multiple enqueue descriptors. Signed-off-by: Nipun Gupta --- drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h | 14 +++++ drivers/bus/fslmc/qbman/qbman_portal.c | 70 ++++++++++++++++++++++ drivers/bus/fslmc/rte_bus_fslmc_version.map | 1 + 3 files changed, 85 insertions(+) diff --git a/drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h b/drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h index 7731772..39407c8 100644 --- a/drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h +++ b/drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h @@ -883,6 +883,20 @@ void qbman_eq_desc_set_dca(struct qbman_eq_desc *d, int enable, */ int qbman_swp_enqueue(struct qbman_swp *s, const struct qbman_eq_desc *d, const struct qbman_fd *fd); +/** + * qbman_swp_enqueue_multiple_eqdesc() - Enqueue multiple frames with separte + * enqueue descriptors. + * @s: the software portal used for enqueue. + * @d: the enqueue descriptors + * @fd: the frame descriptor to be enqueued. + * @num_frames: the number of the frames to be enqueued. + * + * Return the number of enqueued frames, -EBUSY if the EQCR is not ready. + */ +int qbman_swp_enqueue_multiple_eqdesc(struct qbman_swp *s, + const struct qbman_eq_desc *d, + const struct qbman_fd *fd, + int num_frames); /* TODO: * qbman_swp_enqueue_thresh() - Set threshold for EQRI interrupt. diff --git a/drivers/bus/fslmc/qbman/qbman_portal.c b/drivers/bus/fslmc/qbman/qbman_portal.c index 5d407cc..3f1b31d 100644 --- a/drivers/bus/fslmc/qbman/qbman_portal.c +++ b/drivers/bus/fslmc/qbman/qbman_portal.c @@ -574,6 +574,76 @@ int qbman_swp_enqueue(struct qbman_swp *s, const struct qbman_eq_desc *d, return qbman_swp_enqueue_ring_mode(s, d, fd); } +int qbman_swp_enqueue_multiple_eqdesc(struct qbman_swp *s, + const struct qbman_eq_desc *d, + const struct qbman_fd *fd, + int num_frames) +{ + uint32_t *p; + const uint32_t *cl = qb_cl(d); + uint32_t eqcr_ci, eqcr_pi; + uint8_t diff; + int i, num_enqueued = 0; + uint64_t addr_cena; + + if (!s->eqcr.available) { + eqcr_ci = s->eqcr.ci; + s->eqcr.ci = qbman_cena_read_reg(&s->sys, + QBMAN_CENA_SWP_EQCR_CI) & 0xF; + diff = qm_cyc_diff(QBMAN_EQCR_SIZE, + eqcr_ci, s->eqcr.ci); + s->eqcr.available += diff; + if (!diff) + return 0; + } + + eqcr_pi = s->eqcr.pi; + num_enqueued = (s->eqcr.available < num_frames) ? + s->eqcr.available : num_frames; + s->eqcr.available -= num_enqueued; + /* Fill in the EQCR ring */ + for (i = 0; i < num_enqueued; i++) { + p = qbman_cena_write_start_wo_shadow(&s->sys, + QBMAN_CENA_SWP_EQCR(eqcr_pi & 7)); + memcpy(&p[1], &cl[1], 28); + memcpy(&p[8], &fd[i], sizeof(*fd)); + eqcr_pi++; + eqcr_pi &= 0xF; + /*Pointing to the next enqueue descriptor*/ + cl += (sizeof(struct qbman_eq_desc) / sizeof(uint32_t)); + } + + lwsync(); + + /* Set the verb byte, have to substitute in the valid-bit */ + eqcr_pi = s->eqcr.pi; + cl = qb_cl(d); + for (i = 0; i < num_enqueued; i++) { + p = qbman_cena_write_start_wo_shadow(&s->sys, + QBMAN_CENA_SWP_EQCR(eqcr_pi & 7)); + p[0] = cl[0] | s->eqcr.pi_vb; + eqcr_pi++; + eqcr_pi &= 0xF; + if (!(eqcr_pi & 7)) + s->eqcr.pi_vb ^= QB_VALID_BIT; + /*Pointing to the next enqueue descriptor*/ + cl += (sizeof(struct qbman_eq_desc) / sizeof(uint32_t)); + } + + /* Flush all the cacheline without load/store in between */ + eqcr_pi = s->eqcr.pi; + addr_cena = (uint64_t)s->sys.addr_cena; + for (i = 0; i < num_enqueued; i++) { + dcbf((uint64_t *)(addr_cena + + QBMAN_CENA_SWP_EQCR(eqcr_pi & 7))); + eqcr_pi++; + eqcr_pi &= 0xF; + } + s->eqcr.pi = eqcr_pi; + + return num_enqueued; +} + /*************************/ /* Static (push) dequeue */ /*************************/ diff --git a/drivers/bus/fslmc/rte_bus_fslmc_version.map b/drivers/bus/fslmc/rte_bus_fslmc_version.map index 79cb648..7dd28da 100644 --- a/drivers/bus/fslmc/rte_bus_fslmc_version.map +++ b/drivers/bus/fslmc/rte_bus_fslmc_version.map @@ -66,6 +66,7 @@ DPDK_17.08 { qbman_result_DQ_fqd_ctx; qbman_swp_dqrr_consume; qbman_swp_dqrr_next; + qbman_swp_enqueue_multiple_eqdesc; qbman_swp_push_set; rte_dpaa2_alloc_dpci_dev; rte_fslmc_object_register; -- 1.9.1