From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0089.outbound.protection.outlook.com [104.47.37.89]) by dpdk.org (Postfix) with ESMTP id 42DE87D8F for ; Tue, 4 Jul 2017 16:36:22 +0200 (CEST) Received: from DM5PR03CA0058.namprd03.prod.outlook.com (10.174.189.175) by BY2PR03MB474.namprd03.prod.outlook.com (10.141.141.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1220.11; Tue, 4 Jul 2017 14:36:19 +0000 Received: from BN1AFFO11FD040.protection.gbl (2a01:111:f400:7c10::150) by DM5PR03CA0058.outlook.office365.com (2603:10b6:4:3b::47) 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; Tue, 4 Jul 2017 14:36:20 +0000 Authentication-Results: spf=fail (sender IP is 192.88.158.2) 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.158.2 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Received: from az84smr01.freescale.net (192.88.158.2) by BN1AFFO11FD040.mail.protection.outlook.com (10.58.52.251) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1199.9 via Frontend Transport; Tue, 4 Jul 2017 14:36:19 +0000 Received: from Tophie.ap.freescale.net ([10.232.14.39]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id v64EZM79016426; Tue, 4 Jul 2017 07:36:17 -0700 From: Shreyansh Jain To: CC: , Date: Tue, 4 Jul 2017 20:14:16 +0530 Message-ID: <1499179471-19145-26-git-send-email-shreyansh.jain@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1499179471-19145-1-git-send-email-shreyansh.jain@nxp.com> References: <1497591668-3320-1-git-send-email-shreyansh.jain@nxp.com> <1499179471-19145-1-git-send-email-shreyansh.jain@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131436525793678902; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.158.2; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(336005)(39850400002)(39400400002)(39380400002)(39410400002)(39840400002)(39450400003)(39860400002)(2980300002)(1109001)(1110001)(339900001)(51234002)(199003)(189002)(9170700003)(86362001)(6916009)(53936002)(5003940100001)(8656002)(77096006)(38730400002)(2950100002)(305945005)(50986999)(76176999)(104016004)(110136004)(54906002)(2906002)(5660300001)(47776003)(36756003)(85426001)(189998001)(498600001)(8936002)(68736007)(81166006)(626005)(8676002)(2351001)(33646002)(356003)(69596002)(50466002)(50226002)(105606002)(4326008)(106466001)(48376002); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR03MB474; H:az84smr01.freescale.net; FPR:; SPF:Fail; MLV:ovrnspm; A:1; MX:1; PTR:InfoDomainNonexistent; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN1AFFO11FD040; 1:Gb3N/h6wZMMICgNIbj2CHMMiKPyuDm33oFiEr8IBi?= =?us-ascii?Q?ZNMXsGwHjlmasx0XOb1n7Q/8+c3Jt+k8RvwKsTI/T+apkJ/9uP2o76J79ljT?= =?us-ascii?Q?YDEqQ5hfXrg8bn15VPQsrunSXseTsN5NoV0teS8znM8C4qn1n1S7EthshqoH?= =?us-ascii?Q?DqDkUallCX1llNhOe1n5xly8A15qUkbJXz/4Ee+HN71daH845PSFZzEo9Iq9?= =?us-ascii?Q?TQ0vAqqvbU19U2Fx3KQ3V5ZRKgij5HHISy7onAzXd34InE9mJgb3cNM0zxlf?= =?us-ascii?Q?niXlqNG+Eg8lDS67BpapHxXbE8gHyQoKeO06+BcTdXO3g0IcWpjfkDYF2YY6?= =?us-ascii?Q?99Y2VbWxFTOBjJyUeIC9h0RHIpmNSXp3vCh0tN/ML90CX98m+ejJnPfFlodh?= =?us-ascii?Q?gTOmQe9MbDoM2MmfY6oqkZjwkyLUQRhAAeDSRwtf/2QcfztbOv3EjyIwnkUD?= =?us-ascii?Q?elRDGZSETxPTaIdF6S5tIMuVGPI8dSXYlSrUv2ENBNPYNPkLBNGk+cocT1Gu?= =?us-ascii?Q?JeVxo2CB/NTAbD+/A2fdk4NKN3MRheMi5SKzvLXbBQN8huAahGRFB40tmmk+?= =?us-ascii?Q?Xa2pHwjolOSiCtVIJtJvsdi3f2ww6N/WI4wi4GFfyDLJItUQGUoG4IGS9UdM?= =?us-ascii?Q?3iOwjv4aL8CgKhXqjyA5ajPSPrcE9oranLpJnnw3GdHZFMbfh9l6rDX/sy0N?= =?us-ascii?Q?rBfB/Xbe3Ke/W+2NeD/u9uOs/JcJiXlH3DwNQXqHjIM63e/JK9hpwZhJ7N0D?= =?us-ascii?Q?53a4hQTrpYO+7o6fJ84UKiQigYudVfWydwCNawQ9oLnf9eNDoqyH0OIltthB?= =?us-ascii?Q?at2/9QBsjZ7FS6LNsu6SuntMWbeim1op6pxhPDXcNV2Zb3+1OGGeEWbh6b5B?= =?us-ascii?Q?D4o5RlmUQljBEfJPNYRnKbMvYFs0W2CgHsUu2KK3pDZ/Qzr2Emvmc8TjCsP1?= =?us-ascii?Q?zArf5WPoARMlyTNo3uYJee1+HJQxKDsVkTgQQg5S+f/xEtW+wRusCwyQolod?= =?us-ascii?Q?IrvY9hGicowPDzx5QL+8zosqOQRCJeHgHKF/LCOnaHuZtv+SAsCoUWDDnscK?= =?us-ascii?Q?BszWCnunWEdDUqup0nX5foADd8dPN5oRh4mb8PeFMc7BonEkw=3D=3D?= MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: beb2894e-cfda-47a3-34d6-08d4c2ea08e6 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(2017052603031)(201703131430075)(201703131517081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:BY2PR03MB474; X-Microsoft-Exchange-Diagnostics: 1; BY2PR03MB474; 3:b6Esa+JlNun7TxcAjeQ8NOpEAfGm6bGxTzRmyR6W1SaB5bib0cPWqOs4lJJ39lg496wnhyQYdjwccSYR6/EZkOhP0JTZipyf8s7w5BH9WJyrV0rUy8y0uTerD/BOkbVrneLQbiLILAvh8mBMPTzZ0decCTSRC2r0zV8N0W2B17G+ZXGATcp1XS3/ErA18y+N5+W3GHx2l6HD6r1rZKEsVXM8mgX34fu+kBstcj7tJUekn/pCd3fytavdTWVWyQKSYY0kmykno5oA0dt57F30TPjEOXx2QEdYH8oSrdPA4C+nZOYfycwZ5PGgpPzvlmJ8qF9IJWeCF79t38RRkvpDHrm39eW3S7NHG9lMco9THjOC1R28O9VSmkUqtES3xfT2Gbo6uG6AA+nTGM4vdAX0mulCQT5fquWCDhVmjvtgDWPUiIteUvbMsrd0DOhaov0+3ZEqLjSX6d6LyIh0MXj9cnWpcRaQXYD4tmnB7T83ghVYMtj1LFpGtTc/Ta3FTJ/dvRhHEz/zGp3wcoe6kSidsfxlaptExfL/VTqsKlmuP0hxj1C8Kp8RoFJgXyxujynBTq1vJpOUvJjuNSjF9UMPQNwQNtjK0JWqyfUdG8KFmn80nwgRsmoIWAq8xMpOPGJSQNyKoyT9cATZ/f6kcbpb6CObCPoWgq2eNNeBpXLMGndFsdzJbbus5nocdS0S5ww6o++BwsWWwsgLCciPLClcMFDfKBdNuT4xjSHQfcUJ5V+rGJKxUqZjyUkb+Bhpy9RS/J0aNTTsvx7SIErmqaYP31ysmP11fMYbBODG5tcJ4a+lEnWUXPt0lyyC5Qr+dhDUnW1QnQmPIT2LLXrEUyLSUIIDVrjA1+DeEKqWyJz+J35RNyXcqaiQV3BxKmFoyiUw X-MS-TrafficTypeDiagnostic: BY2PR03MB474: X-Microsoft-Exchange-Diagnostics: 1; BY2PR03MB474; 25:TVt/1Mxuns+FBzx7fPv0H5622AUaRi9wlYB18e9NZVpWtBjFhqF3LZLJsc5Kb+oknXetgTilzJGf998Sw1JaiztP/KhfmgWV86M32f5W5Gf+s+DI+U+BKnEhFqOoVRDTdOlAX7fFd6sI0mTVvI0Kj7SBPSbLKbTsz4/zks2CIuWsUxV/2g15aN/PgKrfLpQ6Nen0keHOXlD3i6Tme5qc6/4vfr56+n+EWLAznZcBgIhbxZmJYcTwBW1qG/nrLx51QhwwZenAnaxPuzCvfl3a/8rlQRpfv8IFA17/SNymbkb+xKFFo8XSbA4YWHqZqkWG7eLVLJcvg78z+Ff8LsJDF8izyH18VvVy7jTrzzlpcSzovoHNU2llgQzReYGowQmXcKMKRsL5GQX5eknrU+3XvH66ZlVctiqNVxvhhngRqEBDTcqMNyHPcVA0a4Gq4J6eyFMWbUSuspszNiTe9wuQmjbruxxq44lOzRYJAgg4DKi9XIPi0mkzFYeO2ErTDJAhQhQ5SeTGu6Vxg5eJKeM6y/+eLokNmMD3XVUkPscsBNJSp1n/ovtctr7okD+9rNgEG+1VxWVMX6ZVCWVokd+QCN7s6A68gnjRC+umvh6s49yZI8EHEuEN7ILSjpRve79ndlSzLfe+BEE9YXWL5BilqFGaca2e67Du8ujkTc7PmU0DiK0BGv1r7KShAScSZnrBRHqFSMeqVnfG4ST6mYjDYxfFSeQusly6syfBVs167JACOf7ybW/Nc0eOw+TO8Y+IyCd74sNeYQVYWeXytleZZfdOdQ79/wPfNYbJ0zD/7sHLZdIBCYl3XapZC2e7UkUqwmYyx3krdGFmxq4Sn/YucUir7bYfwIIklqXNW/1KJvyMYGbBA364FQwELgbigDKDEKVrwrV6zHgJjFbuZcgx0KzQiHXZbzxW6W6flDQGoXc= X-Microsoft-Exchange-Diagnostics: 1; BY2PR03MB474; 31:j8RqCcXpen5dUiI1qAvg2OghFaaDT3Vjyw0GtqzttcbHYNCNq15jtMhwSjWZ6hCnBu4XaF3ZnjasMq/7SqMYyLHX5d6grdlNbOSUzstnM3qK2afwYNZ+Xn7E80NsVaG0MZZES89yPoao2xe2sc0YYYh9QXdivWefLhnV0aau1cB4QAbKwG2ZSgNpJcayR5Z9rXqTHv7K2mxZ6mIKPiggHxPmydt3owtsKIz1xb9tb928vCOldt2GX4VjQ7FF96ilEG5jp+JYErP7lHEDIwjTKu1T2543fXIwhiNV1J+uH/hBKuwnMBa+qpaDU+AlsK5C2zS/BM/h4m3hQUT/6rCjPAVu5VtKvLntBNV7seIaJ5c8fIMN4K5zFiBc5+ubqO83ADNJ+dJQlQAJH8kXaTCdh+vJv7KXCnVcXhakNcdmaosL5DjTXGPhe6cFCHl2fpY2ulzrl84U922ZiP0GV2k/kSxw7XzYBUYd2+BxnL8mYAP9gV8LcyTr7FJSqsLW4AN7aXIHyWNH9gehuxI1RlG6P0dwo/G5c9l+pDCQSPPc47H4DB92V/SRBsyxYy3J3xylkJpHKXPXW80GoA2vmP8+Nvn1RlTAN1aaR8bT/qx5AxBqrLT3LWZ8U2pYbb+Akzol1L2W71Rr9i+u1nR51XBkXGR0LxFxJJyDXkimucMqh/gmP3EZridZoksFWZOmoWZ4 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(133145235818549)(236129657087228)(185117386973197)(148574349560750)(275809806118684)(158140799945019)(247924648384137); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(601004)(2401047)(5005006)(13016025)(13018025)(8121501046)(3002001)(100000703101)(100105400095)(93006095)(93001095)(10201501046)(6055026)(6096035)(20161123559100)(20161123556025)(20161123565025)(201703131430075)(201703131433075)(201703131441075)(201703131448075)(201703161259150)(20161123561025)(20161123563025)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BY2PR03MB474; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BY2PR03MB474; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY2PR03MB474; 4:rO+Zx54sxLG1hLbt6HNpLx/j/Ia6cQsRqwa3OuzBBs5?= =?us-ascii?Q?v+/UPCfumXCw/3LXY5BmiadxnwBcoGvoWOQsIbAuQh+BuoHPfmxLqcSAbL1W?= =?us-ascii?Q?VZ0fo/XZV5fIVN4azj/JRo8Thn0WvXXLGMpRMtlPu5YAv5rC2Rtc3pR7ebjo?= =?us-ascii?Q?JBsFY9Zinl7Jg3UsYCIUA/OmvGEjphbir/dmfkHVr1tMbbXwM0h8XbkmCIg6?= =?us-ascii?Q?BAf9wIGmoDnlTvlq0MYPgIJPVgri7EWfNEqumdnb7ANcZPvzSR0QM7hjApR1?= =?us-ascii?Q?P+yuckI4Iw5S2lEuJTqRwi7htoinzFfHO01D6uzNgAU18eDMJrrBL5nLiEY/?= =?us-ascii?Q?rrYoS/YaCOH3sGvK0nZtH9qTP8ubaeUUAuS8HAT2pxI7uPPCCXlHCpvdksOu?= =?us-ascii?Q?rmeJPpdWrInpQFh1b+2WblkdHScaUSC1FM8WcyWWAwFad3panki/Fyw5np08?= =?us-ascii?Q?gSEm20nI3uLYfq1/lI3xSYDLq5s1XiabaH+WLst4d25ljwG717kk2Mlnlf6e?= =?us-ascii?Q?Dc4KtNCl/QAdy0I3toGiDRfghSU3oCAnuLY9bSDRnGli6LaNjt5IApEvtzhW?= =?us-ascii?Q?LuIJx1fqbluZXSC7NwLlKRpdMQ9jpgHJkkio2Nyy1GN/Q8VkhcMlE2v8NkGU?= =?us-ascii?Q?KkBhrtRIT//exvx9N1eyGEhsIwMwTcWQauswSf9UEvuIXzqW+hTCYQS8jH7c?= =?us-ascii?Q?y8dn8D4/VIV4ibqNxeHvof7or2M4qhhZdQ2ui9Lky27OkO1+r2ho9EnCGG+2?= =?us-ascii?Q?Zk/ZxCk0qZktv3uxpthFsMwfbJxvGGCYCh+TWqM4aPZXeg8HwQ8iDUbUkjfd?= =?us-ascii?Q?CAUYjQ/ZUmOVJ715fUhIKWar+bL4ZEI2H4jzS1uFXtT2sgFzPe43L2VcXeGr?= =?us-ascii?Q?T85/7do70/U0oigsZuVdXrv9ltP3C0MenLdz2Cr0AIquWOUK4lnbNUAdBvi0?= =?us-ascii?Q?wOc+6DXJfnRhn7Tvfwtsxbhpo5X+8HMka90opCjWl0NKD47sdTBfeLHHWIEk?= =?us-ascii?Q?6gEVJEv/CnQM+frP6LNivL/Xq2kKDqEQfQN9qFhO1pTSCPU62pvimuewgFYG?= =?us-ascii?Q?ZtTOP9i3jYQgV8WREwpmUhd9w9dLh6w7HBB1A9x7fejfQiofNn488uUvuwwq?= =?us-ascii?Q?XbWGoD4cJtXJayxF39oL8e5aDhAbkRflEX5Nl1JzMbJDgPDx881a0XiOEaHx?= =?us-ascii?Q?XEwnxaEKazpEFdVZSfndLDNb03DJqacM7+Win9URBhI6Wy+Vup1qehQ55sfK?= =?us-ascii?Q?VLBky45h8TeGsENVIOWitFTZgyddFsrru2nhUS+dNJC/Cwv9VsreHgx7Dsxw?= =?us-ascii?Q?oCTXh8AI/j6abrBYPGK4yAVXmnAVq7uQoJVwekBXNl56+8MX3gMelIxywC3u?= =?us-ascii?Q?CFEXAXx2LIZtFZaFy4NO4Teca5usLUl4XARl/K3BvJpObmppcj6b7wYm6VCJ?= =?us-ascii?Q?SIU3ZKiLKUcY5UN+GwluhV5GH/VyUbDUDOdgrIpX6k74eD65W?= X-Forefront-PRVS: 0358535363 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY2PR03MB474; 23:+hodKaWdCO/XHqEA+NYBFoPSePNOqfKvwNe0d/CuIV?= =?us-ascii?Q?XFwFqoOGz5J6RxXgukRpB7xb2dpqnJ/LH88sPgR1qD14klSmsJtGSAU8+nPp?= =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lHwfa/qurbJCyZ8qu3RYRddAv?= =?us-ascii?Q?r2USezU9We0U5MP1D/rY3jDCR2Zs+6NTQheY7kA0BCZfzFYESnrvfYjolIq1?= =?us-ascii?Q?bamwSjXNTrS1CpKIPe/9SIpxcbKo1EWq3sNJZYTFq4QWhvuEHnMFct63TgY7?= =?us-ascii?Q?rNBuyFapFyOXFEL9clIQ3EGiHgY7OAl/AUtwsE1dYvOt/3w4lWu/uySKYADx?= =?us-ascii?Q?kzdbNGFi3Ed378WMOWFg/z3P5xo+avKeBuD/L7pfgheqkQzigaDD++m2PjI2?= =?us-ascii?Q?ySAa1VYarHni5khdKFIyl0UTuNEC62zuIeNeUK+G8jHy7x3ArGkG340QTnGy?= =?us-ascii?Q?IYqBcGkuN+BkJ+cG0wTN0=3D?= X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY2PR03MB474; 6:1FesprBLfmOfftkG06dKWFJg5J4xPD/F9DycAY+uVW2?= =?us-ascii?Q?IBKY+wR69/qIoFpCD8zPovoS43ksKlUUg9XMZTkiXEH1gjWVABZ/xEnMIz7i?= =?us-ascii?Q?cY5h3b0ww7cHRJ5foZAKWfXOnIgYWc9YaPnuIsJ7XaYBONkSqYN88qR5aPFm?= =?us-ascii?Q?R9Xoz06ysx1uunSMl0omUTwR4CQeUZrK+sBMXp1vJ1a5qx4M0i2ghscB46js?= =?us-ascii?Q?TS4YyMhohv57JyIi+yKbwMnGASnm6jmXCXw7U3Dil/5abI3Cyep/VtNMsngM?= =?us-ascii?Q?v7t/gb10yoqMBtQUI05ZqTAHaexeR/pnL9QXVYBq+ps5xTcASrzG7LT1zbRM?= =?us-ascii?Q?48nIskOqcZhSJuNdb30tUhS94NEjW/10b08Ra3ZUYELqXkd6BPicu8dfubCm?= =?us-ascii?Q?dn14tmXjqmyTH/T66QPuDq4KwlIeg0d+nnJBLlaTop1NR+wk7jmmZyIdA8Wj?= =?us-ascii?Q?nstum9f5Y5MhQETomHlfV1ZvNAjhQzfgGYx+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pgOZlwsE3u+VmvhcUrC0= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jul 2017 14:36:19.0090 (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.158.2]; Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR03MB474 Subject: [dpdk-dev] [PATCH v2 25/40] net/dpaa: add support for Tx and Rx queue setup 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, 04 Jul 2017 14:36:23 -0000 Signed-off-by: Hemant Agrawal Signed-off-by: Shreyansh Jain --- drivers/net/dpaa/Makefile | 4 + drivers/net/dpaa/dpaa_ethdev.c | 331 ++++++++++++++++++++++++++++++++++++++++- drivers/net/dpaa/dpaa_ethdev.h | 6 + drivers/net/dpaa/dpaa_rxtx.c | 313 ++++++++++++++++++++++++++++++++++++++ drivers/net/dpaa/dpaa_rxtx.h | 61 ++++++++ mk/rte.app.mk | 1 + 6 files changed, 713 insertions(+), 3 deletions(-) create mode 100644 drivers/net/dpaa/dpaa_rxtx.c create mode 100644 drivers/net/dpaa/dpaa_rxtx.h diff --git a/drivers/net/dpaa/Makefile b/drivers/net/dpaa/Makefile index 8fcde26..06b63fc 100644 --- a/drivers/net/dpaa/Makefile +++ b/drivers/net/dpaa/Makefile @@ -44,11 +44,13 @@ else CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) endif +CFLAGS +=-Wno-pointer-arith CFLAGS += -I$(RTE_SDK_DPAA)/ CFLAGS += -I$(RTE_SDK_DPAA)/include CFLAGS += -I$(RTE_SDK)/drivers/bus/dpaa CFLAGS += -I$(RTE_SDK)/drivers/bus/dpaa/include/ +CFLAGS += -I$(RTE_SDK)/drivers/mempool/dpaa CFLAGS += -I$(RTE_SDK)/lib/librte_eal/common/include CFLAGS += -I$(RTE_SDK)/lib/librte_eal/linuxapp/eal/include @@ -58,7 +60,9 @@ LIBABIVER := 1 # Interfaces with DPDK SRCS-$(CONFIG_RTE_LIBRTE_DPAA_PMD) += dpaa_ethdev.c +SRCS-$(CONFIG_RTE_LIBRTE_DPAA_PMD) += dpaa_rxtx.c LDLIBS += -lrte_bus_dpaa +LDLIBS += -lrte_mempool_dpaa include $(RTE_SDK)/mk/rte.lib.mk diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c index 40f6765..372a4b9 100644 --- a/drivers/net/dpaa/dpaa_ethdev.c +++ b/drivers/net/dpaa/dpaa_ethdev.c @@ -62,8 +62,15 @@ #include #include +#include #include +#include + +#include +#include +#include +#include /* Keep track of whether QMAN and BMAN have been globally initialized */ static int is_global_init; @@ -79,20 +86,104 @@ dpaa_eth_dev_configure(struct rte_eth_dev *dev __rte_unused) static int dpaa_eth_dev_start(struct rte_eth_dev *dev) { + struct dpaa_if *dpaa_intf = dev->data->dev_private; + PMD_INIT_FUNC_TRACE(); /* Change tx callback to the real one */ - dev->tx_pkt_burst = NULL; + dev->tx_pkt_burst = dpaa_eth_queue_tx; + fman_if_enable_rx(dpaa_intf->fif); return 0; } static void dpaa_eth_dev_stop(struct rte_eth_dev *dev) { - dev->tx_pkt_burst = NULL; + struct dpaa_if *dpaa_intf = dev->data->dev_private; + + PMD_INIT_FUNC_TRACE(); + + fman_if_disable_rx(dpaa_intf->fif); + dev->tx_pkt_burst = dpaa_eth_tx_drop_all; +} + +static void dpaa_eth_dev_close(struct rte_eth_dev *dev) +{ + PMD_INIT_FUNC_TRACE(); + + dpaa_eth_dev_stop(dev); +} + +static +int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, + uint16_t nb_desc __rte_unused, + unsigned int socket_id __rte_unused, + const struct rte_eth_rxconf *rx_conf __rte_unused, + struct rte_mempool *mp) +{ + struct dpaa_if *dpaa_intf = dev->data->dev_private; + + PMD_INIT_FUNC_TRACE(); + + DPAA_PMD_INFO("Rx queue setup for queue index: %d", queue_idx); + + if (!dpaa_intf->bp_info || dpaa_intf->bp_info->mp != mp) { + struct fman_if_ic_params icp; + uint32_t fd_offset; + uint32_t bp_size; + + if (!mp->pool_data) { + DPAA_PMD_ERR("Not an offloaded buffer pool!"); + return -1; + } + dpaa_intf->bp_info = DPAA_MEMPOOL_TO_POOL_INFO(mp); + + memset(&icp, 0, sizeof(icp)); + /* set ICEOF for to the default value , which is 0*/ + icp.iciof = DEFAULT_ICIOF; + icp.iceof = DEFAULT_RX_ICEOF; + icp.icsz = DEFAULT_ICSZ; + fman_if_set_ic_params(dpaa_intf->fif, &icp); + + fd_offset = RTE_PKTMBUF_HEADROOM + DPAA_HW_BUF_RESERVE; + fman_if_set_fdoff(dpaa_intf->fif, fd_offset); + + /* Buffer pool size should be equal to Dataroom Size*/ + bp_size = rte_pktmbuf_data_room_size(mp); + fman_if_set_bp(dpaa_intf->fif, mp->size, + dpaa_intf->bp_info->bpid, bp_size); + dpaa_intf->valid = 1; + DPAA_PMD_INFO("if =%s - fd_offset = %d offset = %d", + dpaa_intf->name, fd_offset, + fman_if_get_fdoff(dpaa_intf->fif)); + } + dev->data->rx_queues[queue_idx] = &dpaa_intf->rx_queues[queue_idx]; + + return 0; +} + +static +void dpaa_eth_rx_queue_release(void *rxq __rte_unused) +{ + PMD_INIT_FUNC_TRACE(); } -static void dpaa_eth_dev_close(struct rte_eth_dev *dev __rte_unused) +static +int dpaa_eth_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, + uint16_t nb_desc __rte_unused, + unsigned int socket_id __rte_unused, + const struct rte_eth_txconf *tx_conf __rte_unused) +{ + struct dpaa_if *dpaa_intf = dev->data->dev_private; + + PMD_INIT_FUNC_TRACE(); + + DPAA_PMD_INFO("Tx queue setup for queue index: %d", queue_idx); + dev->data->tx_queues[queue_idx] = &dpaa_intf->tx_queues[queue_idx]; + return 0; +} + +static void dpaa_eth_tx_queue_release(void *txq __rte_unused) { PMD_INIT_FUNC_TRACE(); } @@ -102,15 +193,102 @@ static struct eth_dev_ops dpaa_devops = { .dev_start = dpaa_eth_dev_start, .dev_stop = dpaa_eth_dev_stop, .dev_close = dpaa_eth_dev_close, + + .rx_queue_setup = dpaa_eth_rx_queue_setup, + .tx_queue_setup = dpaa_eth_tx_queue_setup, + .rx_queue_release = dpaa_eth_rx_queue_release, + .tx_queue_release = dpaa_eth_tx_queue_release, }; +/* Initialise an Rx FQ */ +static int dpaa_rx_queue_init(struct qman_fq *fq, + uint32_t fqid) +{ + struct qm_mcc_initfq opts; + int ret; + + PMD_INIT_FUNC_TRACE(); + + ret = qman_reserve_fqid(fqid); + if (ret) { + DPAA_PMD_ERR("reserve rx fqid %d failed with ret: %d", + fqid, ret); + return -EINVAL; + } + + DPAA_PMD_DEBUG("creating rx fq %p, fqid %d", fq, fqid); + ret = qman_create_fq(fqid, QMAN_FQ_FLAG_NO_ENQUEUE, fq); + if (ret) { + DPAA_PMD_ERR("create rx fqid %d failed with ret: %d", + fqid, ret); + return ret; + } + + opts.we_mask = QM_INITFQ_WE_DESTWQ | QM_INITFQ_WE_FQCTRL | + QM_INITFQ_WE_CONTEXTA; + + opts.fqd.dest.wq = DPAA_IF_RX_PRIORITY; + opts.fqd.fq_ctrl = QM_FQCTRL_AVOIDBLOCK | QM_FQCTRL_CTXASTASHING | + QM_FQCTRL_PREFERINCACHE; + opts.fqd.context_a.stashing.exclusive = 0; + opts.fqd.context_a.stashing.annotation_cl = DPAA_IF_RX_ANNOTATION_STASH; + opts.fqd.context_a.stashing.data_cl = DPAA_IF_RX_DATA_STASH; + opts.fqd.context_a.stashing.context_cl = DPAA_IF_RX_CONTEXT_STASH; + + /*Enable tail drop */ + opts.we_mask = opts.we_mask | QM_INITFQ_WE_TDTHRESH; + opts.fqd.fq_ctrl = opts.fqd.fq_ctrl | QM_FQCTRL_TDE; + qm_fqd_taildrop_set(&opts.fqd.td, CONG_THRESHOLD_RX_Q, 1); + + ret = qman_init_fq(fq, 0, &opts); + if (ret) + DPAA_PMD_ERR("init rx fqid %d failed with ret: %d", fqid, ret); + return ret; +} + +/* Initialise a Tx FQ */ +static int dpaa_tx_queue_init(struct qman_fq *fq, + struct fman_if *fman_intf) +{ + struct qm_mcc_initfq opts; + int ret; + + PMD_INIT_FUNC_TRACE(); + + ret = qman_create_fq(0, QMAN_FQ_FLAG_DYNAMIC_FQID | + QMAN_FQ_FLAG_TO_DCPORTAL, fq); + if (ret) { + DPAA_PMD_ERR("create tx fq failed with ret: %d", ret); + return ret; + } + opts.we_mask = QM_INITFQ_WE_DESTWQ | QM_INITFQ_WE_FQCTRL | + QM_INITFQ_WE_CONTEXTB | QM_INITFQ_WE_CONTEXTA; + opts.fqd.dest.channel = fman_intf->tx_channel_id; + opts.fqd.dest.wq = DPAA_IF_TX_PRIORITY; + opts.fqd.fq_ctrl = QM_FQCTRL_PREFERINCACHE; + opts.fqd.context_b = 0; + /* no tx-confirmation */ + opts.fqd.context_a.hi = 0x80000000 | fman_dealloc_bufs_mask_hi; + opts.fqd.context_a.lo = 0 | fman_dealloc_bufs_mask_lo; + DPAA_PMD_DEBUG("init tx fq %p, fqid %d", fq, fq->fqid); + ret = qman_init_fq(fq, QMAN_INITFQ_FLAG_SCHED, &opts); + if (ret) + DPAA_PMD_ERR("init tx fqid %d failed %d", fq->fqid, ret); + return ret; +} + /* Initialise a network interface */ static int dpaa_dev_init(struct rte_eth_dev *eth_dev) { + int num_cores, num_rx_fqs, fqid; + int loop, ret = 0; int dev_id; struct rte_dpaa_device *dpaa_device; struct dpaa_if *dpaa_intf; + struct fm_eth_port_cfg *cfg; + struct fman_if *fman_intf; + struct fman_if_bpool *bp, *tmp_bp; PMD_INIT_FUNC_TRACE(); @@ -121,19 +299,149 @@ dpaa_dev_init(struct rte_eth_dev *eth_dev) dpaa_device = DEV_TO_DPAA_DEVICE(eth_dev->device); dev_id = dpaa_device->id.dev_id; dpaa_intf = eth_dev->data->dev_private; + cfg = &dpaa_netcfg->port_cfg[dev_id]; + fman_intf = cfg->fman_if; dpaa_intf->name = dpaa_device->name; + /* save fman_if & cfg in the interface struture */ + dpaa_intf->fif = fman_intf; dpaa_intf->ifid = dev_id; + dpaa_intf->cfg = cfg; + + /* Initialize Rx FQ's */ + if (getenv("DPAA_NUM_RX_QUEUES")) + num_rx_fqs = atoi(getenv("DPAA_NUM_RX_QUEUES")); + else + num_rx_fqs = DPAA_DEFAULT_NUM_PCD_QUEUES; + + /* Each device can not have more than DPAA_PCD_FQID_MULTIPLIER RX queues */ + if (num_rx_fqs <= 0 || num_rx_fqs > DPAA_PCD_FQID_MULTIPLIER) { + DPAA_PMD_ERR("Invalid number of RX queues\n"); + return -EINVAL; + } + dpaa_intf->rx_queues = rte_zmalloc(NULL, + sizeof(struct qman_fq) * num_rx_fqs, MAX_CACHELINE); + for (loop = 0; loop < num_rx_fqs; loop++) { + fqid = DPAA_PCD_FQID_START + dpaa_intf->ifid * + DPAA_PCD_FQID_MULTIPLIER + loop; + ret = dpaa_rx_queue_init(&dpaa_intf->rx_queues[loop], fqid); + if (ret) + return ret; + dpaa_intf->rx_queues[loop].dpaa_intf = dpaa_intf; + } + dpaa_intf->nb_rx_queues = num_rx_fqs; + + /* Initialise Tx FQs. Have as many Tx FQ's as number of cores */ + num_cores = rte_lcore_count(); + dpaa_intf->tx_queues = rte_zmalloc(NULL, sizeof(struct qman_fq) * + num_cores, MAX_CACHELINE); + if (!dpaa_intf->tx_queues) + return -ENOMEM; + + for (loop = 0; loop < num_cores; loop++) { + ret = dpaa_tx_queue_init(&dpaa_intf->tx_queues[loop], + fman_intf); + if (ret) + return ret; + dpaa_intf->tx_queues[loop].dpaa_intf = dpaa_intf; + } + dpaa_intf->nb_tx_queues = num_cores; + + DPAA_PMD_DEBUG("All frame queues created"); + + /* reset bpool list, initialize bpool dynamically */ + list_for_each_entry_safe(bp, tmp_bp, &cfg->fman_if->bpool_list, node) { + list_del(&bp->node); + rte_free(bp); + } + + /* Populate ethdev structure */ eth_dev->dev_ops = &dpaa_devops; + eth_dev->data->nb_rx_queues = dpaa_intf->nb_rx_queues; + eth_dev->data->nb_tx_queues = dpaa_intf->nb_tx_queues; + eth_dev->rx_pkt_burst = dpaa_eth_queue_rx; + eth_dev->tx_pkt_burst = dpaa_eth_tx_drop_all; + + /* Allocate memory for storing MAC addresses */ + eth_dev->data->mac_addrs = rte_zmalloc("mac_addr", + ETHER_ADDR_LEN * DPAA_MAX_MAC_FILTER, 0); + if (eth_dev->data->mac_addrs == NULL) { + DPAA_PMD_ERR("Failed to allocate %d bytes needed to " + "store MAC addresses", + ETHER_ADDR_LEN * DPAA_MAX_MAC_FILTER); + return -ENOMEM; + } + + /* copy the primary mac address */ + memcpy(eth_dev->data->mac_addrs[0].addr_bytes, + fman_intf->mac_addr.addr_bytes, + ETHER_ADDR_LEN); + + DPAA_PMD_DEBUG("interface %s macaddr:", dpaa_device->name); + for (loop = 0; loop < ETHER_ADDR_LEN; loop++) { + if (loop != (ETHER_ADDR_LEN - 1)) + printf("%02x:", fman_intf->mac_addr.addr_bytes[loop]); + else + printf("%02x\n", fman_intf->mac_addr.addr_bytes[loop]); + } + + /* Disable RX mode */ + fman_if_discard_rx_errors(fman_intf); + fman_if_disable_rx(fman_intf); + /* Disable promiscuous mode */ + fman_if_promiscuous_disable(fman_intf); + /* Disable multicast */ + fman_if_reset_mcast_filter_table(fman_intf); + /* Reset interface statistics */ + fman_if_stats_reset(fman_intf); return 0; } +/* Retire, drain, OOS a FQ. (Dynamically-allocated FQIDs will be released.) */ +static void +teardown_fq(struct qman_fq *fq) +{ + u32 flags; + int s = qman_retire_fq(fq, &flags); + if (s == 1) { + /* Retire is non-blocking, poll for completion */ + enum qman_fq_state state; + do { + qman_poll(); + qman_fq_state(fq, &state, &flags); + } while (state != qman_fq_state_retired); + if (flags & QMAN_FQ_STATE_NE) { + /* FQ isn't empty, drain it */ + s = qman_volatile_dequeue(fq, 0, + QM_VDQCR_NUMFRAMES_TILLEMPTY); + if (s) { + DPAA_PMD_ERR("Fail: %s: %d\n", + "qman_volatile_dequeue()", s); + return; + } + /* Poll for completion */ + do { + qman_poll(); + qman_fq_state(fq, &state, &flags); + } while (flags & QMAN_FQ_STATE_VDQCR); + } + } + s = qman_oos_fq(fq); + if (!(fq->flags & QMAN_FQ_FLAG_DYNAMIC_FQID)) + qman_release_fqid(fq->fqid); + if (s) + DPAA_PMD_ERR("Fail: %s: %d\n", "qman_oos_fq()", s); + else + qman_destroy_fq(fq, 0); +} + static int dpaa_dev_uninit(struct rte_eth_dev *dev) { + int i; struct dpaa_if *dpaa_intf = dev->data->dev_private; PMD_INIT_FUNC_TRACE(); @@ -148,6 +456,23 @@ dpaa_dev_uninit(struct rte_eth_dev *dev) dpaa_eth_dev_close(dev); + /* free the all queue memory */ + for (i = 0; i < dpaa_intf->nb_rx_queues; i++) + teardown_fq(&dpaa_intf->rx_queues[i]); + + rte_free(dpaa_intf->rx_queues); + dpaa_intf->rx_queues = NULL; + + for (i = 0; i < dpaa_intf->nb_tx_queues; i++) + teardown_fq(&dpaa_intf->tx_queues[i]); + + rte_free(dpaa_intf->tx_queues); + dpaa_intf->tx_queues = NULL; + + /* free memory for storing MAC addresses */ + rte_free(dev->data->mac_addrs); + dev->data->mac_addrs = NULL; + dev->dev_ops = NULL; dev->rx_pkt_burst = NULL; dev->tx_pkt_burst = NULL; diff --git a/drivers/net/dpaa/dpaa_ethdev.h b/drivers/net/dpaa/dpaa_ethdev.h index 8aeaebf..da7f3be 100644 --- a/drivers/net/dpaa/dpaa_ethdev.h +++ b/drivers/net/dpaa/dpaa_ethdev.h @@ -38,7 +38,13 @@ #include #include +#include +#include +#include +#include +#include +#include #define DPAA_MBUF_HW_ANNOTATION 64 #define DPAA_FD_PTA_SIZE 64 diff --git a/drivers/net/dpaa/dpaa_rxtx.c b/drivers/net/dpaa/dpaa_rxtx.c new file mode 100644 index 0000000..3226614 --- /dev/null +++ b/drivers/net/dpaa/dpaa_rxtx.c @@ -0,0 +1,313 @@ +/*- + * BSD LICENSE + * + * Copyright 2016 Freescale Semiconductor, Inc. All rights reserved. + * Copyright 2017 NXP. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Freescale Semiconductor, Inc nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* System headers */ +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "dpaa_ethdev.h" +#include "dpaa_rxtx.h" +#include +#include + +#include +#include +#include +#include +#include + +#define DPAA_MBUF_TO_CONTIG_FD(_mbuf, _fd, _bpid) \ + do { \ + (_fd)->cmd = 0; \ + (_fd)->opaque_addr = 0; \ + (_fd)->opaque = QM_FD_CONTIG << DPAA_FD_FORMAT_SHIFT; \ + (_fd)->opaque |= ((_mbuf)->data_off) << DPAA_FD_OFFSET_SHIFT; \ + (_fd)->opaque |= (_mbuf)->pkt_len; \ + (_fd)->addr = (_mbuf)->buf_physaddr; \ + (_fd)->bpid = _bpid; \ + } while (0) + +static inline struct rte_mbuf *dpaa_eth_fd_to_mbuf(struct qm_fd *fd, + uint32_t ifid) +{ + struct pool_info_entry *bp_info = DPAA_BPID_TO_POOL_INFO(fd->bpid); + struct rte_mbuf *mbuf; + void *ptr; + uint16_t offset = + (fd->opaque & DPAA_FD_OFFSET_MASK) >> DPAA_FD_OFFSET_SHIFT; + uint32_t length = fd->opaque & DPAA_FD_LENGTH_MASK; + + DPAA_RX_LOG(DEBUG, " FD--->MBUF"); + + /* Ignoring case when format != qm_fd_contig */ + ptr = rte_dpaa_mem_ptov(fd->addr); + /* Ignoring case when ptr would be NULL. That is only possible incase + * of a corrupted packet + */ + + mbuf = (struct rte_mbuf *)((char *)ptr - bp_info->meta_data_size); + /* Prefetch the Parse results and packet data to L1 */ + rte_prefetch0((void *)((uint8_t *)ptr + DEFAULT_RX_ICEOF)); + rte_prefetch0((void *)((uint8_t *)ptr + offset)); + + mbuf->data_off = offset; + mbuf->data_len = length; + mbuf->pkt_len = length; + + mbuf->port = ifid; + mbuf->nb_segs = 1; + mbuf->ol_flags = 0; + mbuf->next = NULL; + rte_mbuf_refcnt_set(mbuf, 1); + + return mbuf; +} + +uint16_t dpaa_eth_queue_rx(void *q, + struct rte_mbuf **bufs, + uint16_t nb_bufs) +{ + struct qman_fq *fq = q; + struct qm_dqrr_entry *dq; + uint32_t num_rx = 0, ifid = ((struct dpaa_if *)fq->dpaa_intf)->ifid; + int ret; + + ret = rte_dpaa_portal_init((void *)0); + if (ret) { + DPAA_PMD_ERR("Failure in affining portal"); + return 0; + } + + ret = qman_set_vdq(fq, (nb_bufs > DPAA_MAX_DEQUEUE_NUM_FRAMES) ? + DPAA_MAX_DEQUEUE_NUM_FRAMES : nb_bufs); + if (ret) + return 0; + + do { + dq = qman_dequeue(fq); + if (!dq) + continue; + bufs[num_rx++] = dpaa_eth_fd_to_mbuf(&dq->fd, ifid); + qman_dqrr_consume(fq, dq); + } while (fq->flags & QMAN_FQ_STATE_VDQCR); + + return num_rx; +} + +static void *dpaa_get_pktbuf(struct pool_info_entry *bp_info) +{ + int ret; + uint64_t buf = 0; + struct bm_buffer bufs; + + ret = bman_acquire(bp_info->bp, &bufs, 1, 0); + if (ret <= 0) { + DPAA_PMD_WARN("Failed to allocate buffers %d", ret); + return (void *)buf; + } + + DPAA_RX_LOG(DEBUG, "got buffer 0x%lx from pool %d", + (uint64_t)bufs.addr, bufs.bpid); + + buf = (uint64_t)rte_dpaa_mem_ptov(bufs.addr) - bp_info->meta_data_size; + if (!buf) + goto out; + +out: + return (void *)buf; +} + +static struct rte_mbuf *dpaa_get_dmable_mbuf(struct rte_mbuf *mbuf, + struct dpaa_if *dpaa_intf) +{ + struct rte_mbuf *dpaa_mbuf; + + /* allocate pktbuffer on bpid for dpaa port */ + dpaa_mbuf = dpaa_get_pktbuf(dpaa_intf->bp_info); + if (!dpaa_mbuf) + return NULL; + + memcpy((uint8_t *)(dpaa_mbuf->buf_addr) + mbuf->data_off, (void *) + ((uint8_t *)(mbuf->buf_addr) + mbuf->data_off), mbuf->pkt_len); + + /* Copy only the required fields */ + dpaa_mbuf->data_off = mbuf->data_off; + dpaa_mbuf->pkt_len = mbuf->pkt_len; + dpaa_mbuf->ol_flags = mbuf->ol_flags; + dpaa_mbuf->packet_type = mbuf->packet_type; + dpaa_mbuf->tx_offload = mbuf->tx_offload; + rte_pktmbuf_free(mbuf); + return dpaa_mbuf; +} + +uint16_t +dpaa_eth_queue_tx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs) +{ + struct rte_mbuf *mbuf, *mi = NULL; + struct rte_mempool *mp; + struct pool_info_entry *bp_info; + struct qm_fd fd_arr[MAX_TX_RING_SLOTS]; + uint32_t frames_to_send, loop, i = 0; + int ret; + + ret = rte_dpaa_portal_init((void *)0); + if (ret) { + DPAA_PMD_ERR("Failure in affining portal"); + return 0; + } + + DPAA_TX_LOG(DEBUG, "Transmitting %d buffers on queue: %p", nb_bufs, q); + + while (nb_bufs) { + frames_to_send = (nb_bufs >> 3) ? MAX_TX_RING_SLOTS : nb_bufs; + for (loop = 0; loop < frames_to_send; loop++, i++) { + mbuf = bufs[i]; + if (RTE_MBUF_DIRECT(mbuf)) { + mp = mbuf->pool; + } else { + mi = rte_mbuf_from_indirect(mbuf); + mp = mi->pool; + } + + bp_info = DPAA_MEMPOOL_TO_POOL_INFO(mp); + if (mp->ops_index == bp_info->dpaa_ops_index) { + DPAA_TX_LOG(DEBUG, "BMAN offloaded buffer, " + "mbuf: %p", mbuf); + if (mbuf->nb_segs == 1) { + if (RTE_MBUF_DIRECT(mbuf)) { + if (rte_mbuf_refcnt_read(mbuf) > 1) { + DPAA_MBUF_TO_CONTIG_FD(mbuf, + &fd_arr[loop], 0xff); + rte_mbuf_refcnt_update(mbuf, -1); + } else { + DPAA_MBUF_TO_CONTIG_FD(mbuf, + &fd_arr[loop], bp_info->bpid); + } + } else { + if (rte_mbuf_refcnt_read(mi) > 1) { + DPAA_MBUF_TO_CONTIG_FD(mbuf, + &fd_arr[loop], 0xff); + } else { + rte_mbuf_refcnt_update(mi, 1); + DPAA_MBUF_TO_CONTIG_FD(mbuf, + &fd_arr[loop], bp_info->bpid); + } + rte_pktmbuf_free(mbuf); + } + } else { + DPAA_PMD_DEBUG("Number of Segments not supported"); + /* Set frames_to_send & nb_bufs so that + * packets are transmitted till + * previous frame. + */ + frames_to_send = loop; + nb_bufs = loop; + goto send_pkts; + } + } else { + struct qman_fq *txq = q; + struct dpaa_if *dpaa_intf = txq->dpaa_intf; + + DPAA_TX_LOG(DEBUG, "Non-BMAN offloaded buffer." + "Allocating an offloaded buffer"); + mbuf = dpaa_get_dmable_mbuf(mbuf, dpaa_intf); + if (!mbuf) { + DPAA_TX_LOG(DEBUG, "no dpaa buffers."); + /* Set frames_to_send & nb_bufs so that + * packets are transmitted till + * previous frame. + */ + frames_to_send = loop; + nb_bufs = loop; + goto send_pkts; + } + + DPAA_MBUF_TO_CONTIG_FD(mbuf, &fd_arr[loop], + dpaa_intf->bp_info->bpid); + } + } + +send_pkts: + loop = 0; + while (loop < frames_to_send) { + loop += qman_enqueue_multi(q, &fd_arr[loop], + frames_to_send - loop); + } + nb_bufs -= frames_to_send; + } + + DPAA_TX_LOG(DEBUG, "Transmitted %d buffers on queue: %p", i, q); + + return i; +} + +uint16_t dpaa_eth_tx_drop_all(void *q __rte_unused, + struct rte_mbuf **bufs __rte_unused, + uint16_t nb_bufs __rte_unused) +{ + DPAA_TX_LOG(DEBUG, "Drop all packets"); + + /* Drop all incoming packets. No need to free packets here + * because the rte_eth f/w frees up the packets through tx_buffer + * callback in case this functions returns count less than nb_bufs + */ + return 0; +} diff --git a/drivers/net/dpaa/dpaa_rxtx.h b/drivers/net/dpaa/dpaa_rxtx.h new file mode 100644 index 0000000..09f1aa4 --- /dev/null +++ b/drivers/net/dpaa/dpaa_rxtx.h @@ -0,0 +1,61 @@ +/*- + * BSD LICENSE + * + * Copyright 2016 Freescale Semiconductor, Inc. All rights reserved. + * Copyright 2017 NXP. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Freescale Semiconductor, Inc nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef __DPDK_RXTX_H__ +#define __DPDK_RXTX_H__ + +/* internal offset from where IC is copied to packet buffer*/ +#define DEFAULT_ICIOF 32 +/* IC transfer size */ +#define DEFAULT_ICSZ 48 + +/* IC offsets from buffer header address */ +#define DEFAULT_RX_ICEOF 16 + +#define DPAA_MAX_DEQUEUE_NUM_FRAMES 63 + /**