From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0056.outbound.protection.outlook.com [104.47.41.56]) by dpdk.org (Postfix) with ESMTP id 49F2B2BC5 for ; Wed, 7 Dec 2016 11:10:42 +0100 (CET) Received: from DM5PR03CA0016.namprd03.prod.outlook.com (10.175.104.26) by MWHPR03MB2477.namprd03.prod.outlook.com (10.169.200.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.761.9; Wed, 7 Dec 2016 10:10:41 +0000 Received: from BY2FFO11FD034.protection.gbl (2a01:111:f400:7c0c::132) by DM5PR03CA0016.outlook.office365.com (2603:10b6:3:118::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.761.9 via Frontend Transport; Wed, 7 Dec 2016 10:10:40 +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;nxp.com; dkim=none (message not signed) header.d=none; 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 BY2FFO11FD034.mail.protection.outlook.com (10.1.14.219) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.734.4 via Frontend Transport; Wed, 7 Dec 2016 10:10:38 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:; UpperCasedChecksum:; SizeAsReceived:983; Count:13 Received: from [10.232.14.87] ([10.232.14.87]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id uB7AAY6w017415; Wed, 7 Dec 2016 03:10:35 -0700 To: Hemant Agrawal , References: <1480875447-23680-1-git-send-email-hemant.agrawal@nxp.com> <1480875447-23680-11-git-send-email-hemant.agrawal@nxp.com> CC: , , "david.marchand@6wind.com" From: Shreyansh Jain Message-ID: <6b58f8fa-4df0-684e-f1d3-4dc4dba4f0dd@nxp.com> Date: Wed, 7 Dec 2016 15:43:23 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <1480875447-23680-11-git-send-email-hemant.agrawal@nxp.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-IncomingHeaderCount: 13 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131255790403857232; (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)(7916002)(2980300002)(1109001)(1110001)(339900001)(336004)(189002)(199003)(377454003)(24454002)(68736007)(6666003)(8676002)(69596002)(356003)(31696002)(575784001)(86362001)(64126003)(54356999)(626004)(76176999)(8666005)(47776003)(305945005)(50986999)(7846002)(2950100002)(65826007)(81156014)(81166006)(36756003)(5660300001)(65806001)(65956001)(229853002)(8936002)(2906002)(4326007)(38730400001)(33646002)(39410400001)(39450400002)(39400400001)(77096006)(39380400001)(39850400001)(39840400001)(31686004)(39860400001)(105606002)(106466001)(23746002)(104016004)(230700001)(83506001)(4001350100001)(50466002)(5001770100001)(97736004)(85426001)(92566002)(189998001)(15395725005)(533714002)(7059030); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR03MB2477; H:az84smr01.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD034; 1:0QXynqhgRN56F8/h8BqHTtyEnnWJ2sYuQNUW0Ooh+mZ57r4QhNtSWUnM8psSzjwi0IcpalOEDP4zDzHK3am5Zldu9xq+ClJUCBYF2MZjBfICzpaMGQxSOn6nT5zI8A9j4tIgkXQeT7TmIFjV2z+irh88bp+RK5WL+nnKw1MVyk5rmp8prKDl+7gX12/5awforr3d8A1GCrLvHOegA+lA9WDRasPZ7u1r5Vvttd3TVo1ykPk+IP+k6vyv5+ZCk8Ki1px8/WYuxquICz//t9MAHUhunlkTiGvoMnYzbZRGwRNLYGZwCf0k8+UIs1g8SR2FKOMlkPMA+JGWf4wxseXEmJT4j4r9WjTlAyifA5U3bxq7oyVF2sY/+Xof8X2PqW2bw+OWgltQoE0ZBAB6+7BYrzgc7VQgt/rH0QBeY7qdlUG9njcCQ8gBwwvtO4Yk/H94sZ2OervSYt4mZu4j7sMzYGlatUukdIovJwl5+wJrlcv4Qp06mBniqGb+k5ItkC00E3k3SP5+PJCGBhFPVvF7a8CEUWDXxrLyEX/WMihQ0SPVk9hT2LLmW2VKEnPllitHaK/l2vg1aUOnRTNSjI3u9wv3x8+Xt+bWEWcAIuM8/TNNJfZ/kPfpahyFmtiKhskH7kTSvxfLXsuV4WDMjxUrx2kzRKqrLSWc2CwY2RWSucDqmQzDSFAlOESdB4VEXZh/VZqBur8wc18l4a8pJtkS4BFC9XkOpNgjV8evXkhm5SS1AcGAd0QuSaWCwsmeCqpv X-MS-Office365-Filtering-Correlation-Id: cc3949ee-1ddd-4ccf-2b50-08d41e894c33 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:MWHPR03MB2477; X-Microsoft-Exchange-Diagnostics: 1; MWHPR03MB2477; 3:fhaw4/GAm3D4NfZ3nBH72Ot25wj5BI++kDtDOVNrZ/vrtwiN8arapkeIBuEvfcKD7Abvf1aRByBeecvSEtKLqWE5zkDPxlAKIK86uqzsar33Q/MF7KVH1Otr7A6r6Kla5/APtFhaWrYYyX+VNH2iN1/UO2/LLAPE8akynvMXUEzjxAFtSZOvomSOom5CIKc5t/s/B0pIAyBTSfLJ13K2iak3MlxaOU8tWL9BzCCZQLs3RtIq+5lgknT+wLVzPWpATQ++S59IgiT6qU/fiHJEeWiVRasZ/Ll6DPnmjBJRjI2itKEiSnrI1+KekSlq68C+D+9AyX3YcV+W+y5wcyPQC0pj4k29qUC9MLd4jiTSJSdHnclipY1qiJb3XcN5SihN X-Microsoft-Exchange-Diagnostics: 1; MWHPR03MB2477; 25:CLLVVbrLCEpNVhPkJW6Q2kb8ZNTO7QduZZewtxSBC4GYjfuQGvTfN/ew+h07ASmnDoaV1wN006nud/mGRdT6Xrhz7X7TrRc+hLNxoiIuYukrMFHSBtBOT8kLbSYvXhouu3cD3r/pBOdsm9Cyv6SAGP3oVE1PkSNJdKfAbfEh2W5mlElC/msH6JIdc9dzINwoS0AES7KnPfiTX9FxJl3wJ0fkiVwmYQUp+4gUkFn1kfI3+i1hbwynV5i+cj0isYRdR0C2AvSYfQu/d50m4+EH0mb84CnIh7c3N4o0dTtXVCV1RHKG3gIBSng2fX6BPmB+yy0orqIQ46qZWKR8B9JFrmpyon1A+E1lbLYa0+i4BqiSSQnLcBEHuCDxIFQEixGWLyM7laOtZ/zqJUSJBHOCxwwf7qmdOd0dz8rN+HmcaVBRuT/ekx7W3wqoayriz9nRffRHf35K4eZuUQu9/lQzBIeHbK3jALLdVJUmyqa0vyMIBg87Vc0qUiaIxYDM0IIxa0/0YF9tlC8zPAXHwxnhUw2Dm4lEYgdus13HGJIY01+L+NMuNpqWqhwrn4Rw7r/N+SlhsSbdD/G/yqAnSf8JMZ0A0jZYCpXjRus64vGpBuzY9bj8NOwcszHoqN4aj+lcBzOj4NS9hV0tg8gnMMpydV34wqAxrp4gtb3mh3wNqul/1gxVJOXLdoj4ciEb+W22LjAULQSM6Vu89jIu0FJkydcu0q0vlWoQzQ2VE0scSbIQlXFx2uc+pmgJxzh8Ssf2t/pqn5fa0DX+RrMaqORytQD2FQz2XFKF9ahClxSnSOi6GX8ZpvSsvug1VOW6Kzt94kxNqCHBq7AWRznsa1vaHw== X-Microsoft-Exchange-Diagnostics: 1; MWHPR03MB2477; 31:pvGKcWTF84KFYZh+0BtPHVQ/kUoF4215c+z7n6IDx1zkAdKyphTMKmOdied0UcQg4DsW0K7OkgvHiKUi57HbuFex4NZC/eGYyGYel37WAEUWzRKK/ZtHQysN5qVkCmE5YfR8+2o6lTIthDXff6/mih3UXKbY/mbV5fLBQF3eWGMs92Yrl/AupXj9xDey/JOA822yt96uwCHMJ9xKmZ1Ef+0fi2kJwtCEh6EjmzuubT324UhnxZv/nttqmE5bHXHR8l2+GCH4HSX3qtn8rFt7dm3oXwkHDqWnK4p2vOvTx5w= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095060)(601004)(2401047)(13023025)(13015025)(13017025)(13024025)(13018025)(5005006)(8121501046)(3002001)(10201501046)(6055026)(6096035)(20161123565025)(20161123563025)(20161123556025)(20161123559025)(20161123561025); SRVR:MWHPR03MB2477; BCL:0; PCL:0; RULEID:(400006); SRVR:MWHPR03MB2477; X-Microsoft-Exchange-Diagnostics: 1; MWHPR03MB2477; 4:h564S3uTCfBF1Kb3TdkqjA0L8Oopm6yLKnsd6PCy/3MfFU6KqeZrpmp7oUB9UbOkU8ay4l6jtw4phiaoKpR2aqJEzOCWVCiAuu/Wxc3FWaXcXpNNtIXSJCc+rWIhORSsP2xOK/3oYtzCFl1AjlKWAuq9mMqntpHiV+jHswU+6E87Chs5+IQZOvDz4WCeDA9+PTet1VlLzPTq38B+XjZ3z4AFfKvVxo7QSGNdk67S2Wicbz93HPdG9IfDSYpmTujyeMOQEVpBaQWk9B2cv2Jf0luKLczLC6UKb7IKJ97ae9xahqH+qCSAsOHOzhqnWOyxUZwmphP1Bd84nXCTfQxgInCUfA2vaWPTxZ+DxY5VkdRCakPRDzQdRvXsGBc7I9hmdemI6ySr+cFyTcj+X8euQ4mJowRgpxFWrJ4rJQ8GaEctQ3vL2WhSV6WoXuRwAd91XodY4/F7gYYrsf4UtIMopS5qKDgntQcrnA25G/Uzdo9S3ouMznNL/2c3NyVq1E+QB1tK/yFj/gjf9RVVcgNaODkGZPy8N7BXmjPTjI20OYGGWp9LilRuCQRkzNps1riODVfQtYNlFGMbz27L56mdueltXxgLnZXBE1R/tN1QrMZu+Peg8Tk0juReJ5RzIgpHd7vVY5b3QULa1TVbNF/emWYVJSJJDJVNnzIZ3cU/kcyMtZefI0kq+HPF86y05yLHwYv0g8zVwQTEx0uzlLZObF8YPjBrlFtgPCawQmsGHzJT0//DIW4jRVdzHSeNLNxo X-Forefront-PRVS: 01494FA7F7 X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1; MWHPR03MB2477; 23:SsEHEIVpXywaUonxOSqAKJzgUYjO7x/OudKWU?= =?Windows-1252?Q?mq8n8eaieZc8Vk3DwjhaAqWbhzbPfjW7nXqvhGZO59tMg39EKBs15UKy?= =?Windows-1252?Q?tIYmZ7v7w3wbZp2eiyW57kBhWIRSJzeyVBtN0eWDSKudnxHapo91U8hP?= =?Windows-1252?Q?/Zj/V3/W1PoTQ/Gv8M8Gcc4X/F1HIl5XrHLjqa1dYtrwoV7KoejVmKjp?= =?Windows-1252?Q?arhVtz0y0PQOF/2oGPcSL95jFAO4BxjkUCpUsI7Sj2QNEmwXoloFbi91?= =?Windows-1252?Q?vsFVYYKnrN8OsWn2Dl4UEgeHM3wZZpBqyIJs+oeKKsExHXAOfxeIOJ4C?= =?Windows-1252?Q?LSsY20JlA9uBRwgmGtXhgELTKpSipZFVzTkZbBo5hv29HqeT4FwITR5D?= =?Windows-1252?Q?FtYlXmBe1+ClIwaaEvpdSOqUHJekFhro9Yb2JsIz9Rl8IzMpI2vWXQjM?= =?Windows-1252?Q?LZtp41OQfXsupNchMBrdqeCnZ1QRtIzjUIWrFnppzqUmGw220p2ZNKy8?= =?Windows-1252?Q?Hety12wl5Wtav46ctOhse2+YgBVHplAnUej/NiryngwzLXe+imXpPnq8?= =?Windows-1252?Q?IZcKrHmujXsT2z4qZIrLYxgSrsXIHFAx3s+GL45a3NpDFe6j1tvPSHyt?= =?Windows-1252?Q?Qg+ncT1IrRDrbfDB/tR6fMBofzNGi6+f2KzV1KFCQRk/e2cNAzRGP+s+?= =?Windows-1252?Q?5XFiofrmKerGjxiVY6vMgeOGCZtRBOLXKdrpDMkDeU+zNfjWo23nynjZ?= =?Windows-1252?Q?233cDqU6u3FJH7LgrQiOOhYniZqYfs1jkYxQ2wUqfoZnHc4rBSndLpTv?= =?Windows-1252?Q?+FiILOviW/80SZ/YGDYD7dldypui+l54+0MWraev6pak9QknOeQjVIfJ?= =?Windows-1252?Q?rPH/3gmoTCqPYy8NrpGmHWfdncl/Z20FALxgwrqQDjKbgrvSMBVVLQjU?= =?Windows-1252?Q?XQur+94GpiBdOhjeO3luD1+cugVRKwgi2Rb8Qqb70ickrqXkRa32vou7?= =?Windows-1252?Q?ynckAzqAfRgI4UpXqxjxChAeFd5wa/NoJ53036zgyrAY7NRVmctZwe7w?= =?Windows-1252?Q?URt66DnKW96qk9vDFJfK/Q4lLkjlFnRdNLkEmOSP8PX6MgegCaTZf1kQ?= =?Windows-1252?Q?Y76xenbJp4EqxO5rqsO6dc9ZSk2L9f0xb82j956ALxoucDwdFYbGOBPI?= =?Windows-1252?Q?MYbKFUodUxKHy22fabCNvCWy517nSKXt6gEWXvdlCKhsWT3bkVtgIgqn?= =?Windows-1252?Q?Z17Ma9iYra/ua6YORwp4yy9lyp28Y99814LD9gyhLtu+Z0Th0fLuTW6h?= =?Windows-1252?Q?viB/qKQaIzwvM6K+w3BR84lyQVWoNIhAxKJRh8Z8DCZc1OHLN61ou9nc?= =?Windows-1252?Q?s2tj5vfSUGA8gSfog9gmhKu+w4u4Gl7cEs0Rg8GgZ4cemV9HLMXgDuEW?= =?Windows-1252?Q?Kt+JtweoNVQqvl88UKLKwAR7rDzMk2JElq/1mlUNzM9mi5U/CuqTUYDp?= =?Windows-1252?Q?utlYPWwcYvKo52bSwky85+B6vhOcZuUnalR7qFS/n80XKqFhKB07Eyef?= =?Windows-1252?Q?btZNixH7uzpEXeIzFakIZ5SeYWyl7bJKBGot/2jqkwJ2AE0IzMfHykfr?= =?Windows-1252?Q?VzPzKBDEtPnXL+d6VTuXVb7WeWYGho9mvTcQrkSSUYTlVZK/iF2R6nVQ?= =?Windows-1252?Q?s7shLuX+D4/Wn0tTJSi8PkR1VrLoJBJVBf20z82Fk2HlBW0VLbFWaWKv?= =?Windows-1252?Q?MoGoyfnnBO8BzhsyA=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; MWHPR03MB2477; 6:S2BfioMceeaiz3KV9yWXPqRhNttc2uunCxbgIX4cn2c0c0aUTITamp+GdvfpocTjpzJhWS7yNbM0ECRwiw3s06reAoXaSswFjU9XX8x1QSG7sfac7jWhNd74bUIsSX8jTBa/I9XV0m5aQCaoF3RqC+PAaaI6K5dkrnPVAqLe9Vy1/82MCF48whBL4rmGJz3GWoQ70B2LSE9VT8avfp+3TqBHyEZ7dhZGO7u5UjT9gInmeZDvPmF+rn1UObs0sUw8VwXMtkpu9/6HyjWUTIWzHG4Ysn8t9TuKPqp26jpgbyeiOMChr4zzrwNU7vqF716cPIcAK+59xfab4v193Vo1Zzjz87vxdJjovn/MyTjo2lthuacg8jrxmgRcxoukTHH9+UftCpXWhUwFBdlbpLwnnAL13tDURiUbKU4WIfdBhSt95j4o5ToLgK/UhV5TO39v; 5:KIruJkrtp15B/7WineXLF3EkdhfvEgAg7VJGSqHZRNXb0fAuF/OXaYSuoxV1qKgMmTz2jmegsTy9A2f1Oi1RPNDj2ReNd2mXyq2ElR5ulju4jU+Z9TtKl/pILWRHwuEnsQmoGBLg04MMK+qVVsoEnrOCT86tOfG+CKLSah26gFUyswA56SyKzoxx2HSLptFR; 24:4z0D8kSBOxcOOtMVou/C9M6bu0XqEoxvIbNo8VD0ib7Q5iPvldjuqaa5bKcDobyjdHwuvKSeqY3b2nkkswgGJq5FTFv9qhek5xA2HHxhOjM= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; MWHPR03MB2477; 7:5MGIPF8fvhle/8xd78/tNXFwODxgZNDeZwksOROHUlUBADCMxg6dxIa+fFUCDqUh+ClxduERaNLsNtiKz0KbbipTDACp3oKLGeoxOJsT2S6C6zmjHny2LIIh6uVnj3s2pf6xFUqqpLxtmkjEU0zc3j/Uhfktldbi+1vRKmJ5k9mT/mUSwTpnQUvLJ4Om39x5nmt0Byyug2JFwQ5dwOeKCryjjJtnTk6cRpRvPzIUBwjIaFadxt3a7oN6hb/xJysB50gZ4QVpW6hzlmoHNgVs2E+/VJ/syh9IF4SIZAA6UaN58GJJMglh5Y9SrWGlVFVy5p6iNMwsruXcuVCoNDcbSR+zhDbZZqknE266vFKZgb5CH1968qYJoiFWkA8oPB6UAk5DK12nAD50E59dzobCSIyIBaE2DfEcGDaDFpgtL3lvsHB7PTm7NMXO5kdM/55hPmW0vcR1cBsTgwXrsjNPQw== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Dec 2016 10:10:38.5449 (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: MWHPR03MB2477 Subject: Re: [dpdk-dev] [PATCH 10/32] net/dpaa2: introducing dpaa2 bus driver for fsl-mc bus 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, 07 Dec 2016 10:10:42 -0000 + CC: David Marchand On Sunday 04 December 2016 11:47 PM, Hemant Agrawal wrote: > The DPAA2 bus driver is a rte_bus driver which scans the fsl-mc bus. > > Signed-off-by: Hemant Agrawal > --- > drivers/net/Makefile | 2 +- > drivers/net/dpaa2/Makefile | 60 ++++++++++++++ > drivers/net/dpaa2/dpaa2_bus.c | 99 +++++++++++++++++++++++ > drivers/net/dpaa2/rte_dpaa2.h | 121 ++++++++++++++++++++++++++++ > drivers/net/dpaa2/rte_pmd_dpaa2_version.map | 4 + > mk/rte.app.mk | 1 + > 6 files changed, 286 insertions(+), 1 deletion(-) > create mode 100644 drivers/net/dpaa2/Makefile > create mode 100644 drivers/net/dpaa2/dpaa2_bus.c > create mode 100644 drivers/net/dpaa2/rte_dpaa2.h > create mode 100644 drivers/net/dpaa2/rte_pmd_dpaa2_version.map > > diff --git a/drivers/net/Makefile b/drivers/net/Makefile > index bc93230..2bcf67b 100644 > --- a/drivers/net/Makefile > +++ b/drivers/net/Makefile > @@ -55,7 +55,7 @@ DIRS-$(CONFIG_RTE_LIBRTE_THUNDERX_NICVF_PMD) += thunderx > DIRS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += virtio > DIRS-$(CONFIG_RTE_LIBRTE_VMXNET3_PMD) += vmxnet3 > DIRS-$(CONFIG_RTE_LIBRTE_PMD_XENVIRT) += xenvirt > - > +DIRS-$(CONFIG_RTE_LIBRTE_DPAA2_PMD) += dpaa2 > ifeq ($(CONFIG_RTE_LIBRTE_VHOST),y) > DIRS-$(CONFIG_RTE_LIBRTE_PMD_VHOST) += vhost > endif # $(CONFIG_RTE_LIBRTE_VHOST) > diff --git a/drivers/net/dpaa2/Makefile b/drivers/net/dpaa2/Makefile > new file mode 100644 > index 0000000..a99ce22 > --- /dev/null > +++ b/drivers/net/dpaa2/Makefile > @@ -0,0 +1,60 @@ > +# BSD LICENSE > +# > +# Copyright (c) 2016 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 NXP 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. > + > +include $(RTE_SDK)/mk/rte.vars.mk > + > +# > +# library name > +# > +LIB = librte_pmd_dpaa2.a > + > +CFLAGS += -O3 > +CFLAGS += $(WERROR_FLAGS) > + > +CFLAGS += -I$(RTE_SDK)/drivers/net/dpaa2 > +CFLAGS += -I$(RTE_SDK)/lib/librte_eal/common/ > +CFLAGS += -I$(RTE_SDK)/lib/librte_eal/linuxapp/eal > + > +# versioning export map > +EXPORT_MAP := rte_pmd_dpaa2_version.map > + > +# library version > +LIBABIVER := 1 > + > + > +# Interfaces with DPDK > +SRCS-$(CONFIG_RTE_LIBRTE_DPAA2_PMD) += dpaa2_bus.c > + > +# library dependencies > +DEPDIRS-y += lib/librte_eal > +DEPDIRS-y += drivers/common/dpaa/mc > +DEPDIRS-y += drivers/common/dpaa/qbman > + > +include $(RTE_SDK)/mk/rte.lib.mk > diff --git a/drivers/net/dpaa2/dpaa2_bus.c b/drivers/net/dpaa2/dpaa2_bus.c > new file mode 100644 > index 0000000..571066c > --- /dev/null > +++ b/drivers/net/dpaa2/dpaa2_bus.c > @@ -0,0 +1,99 @@ > +/*- > + * BSD LICENSE > + * > + * Copyright (c) 2016 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 NXP 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. > + */ > + > +#include > +#include > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include "eal_filesystem.h" > +#include "eal_private.h" > + > +void > +rte_dpaa2_register(struct rte_dpaa2_driver *driver) > +{ > + struct rte_bus *bus; > + > + bus = rte_eal_get_bus("dpaa2"); > + if (!bus) { > + RTE_LOG(ERR, EAL, "DPAA2 bus not registered\n"); > + return; > + } > + > + rte_eal_bus_add_driver(bus, &driver->driver); > +} > + > +void > +rte_dpaa2_unregister(struct rte_dpaa2_driver *driver) > +{ > + struct rte_bus *bus; > + > + bus = driver->driver.bus; > + if (!bus) { > + RTE_LOG(ERR, EAL, "Unable to find bus for device\n"); > + return; > + } > + > + rte_eal_bus_remove_driver(&driver->driver); > +} > + > +int rte_dpaa2_probe(struct rte_driver *driver __rte_unused, > + struct rte_device *device __rte_unused) > +{ > + return 0; > +} > + > +int rte_dpaa2_scan(struct rte_bus *bus_d __rte_unused) > +{ > + return 0; > +} > + > +int rte_dpaa2_match(struct rte_driver *driver __rte_unused, > + struct rte_device *device __rte_unused) > +{ > + return 0; > +} > + > +struct rte_bus dpaa2_bus = { > + .scan = rte_dpaa2_scan, > + .match = rte_dpaa2_match, > + .probe = rte_dpaa2_probe, > +}; > + > +RTE_REGISTER_BUS(dpaa2, dpaa2_bus); > diff --git a/drivers/net/dpaa2/rte_dpaa2.h b/drivers/net/dpaa2/rte_dpaa2.h > new file mode 100644 > index 0000000..b36eed8 > --- /dev/null > +++ b/drivers/net/dpaa2/rte_dpaa2.h > @@ -0,0 +1,121 @@ > +/*- > + * BSD LICENSE > + * > + * Copyright (c) 2016 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 NXP 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 _RTE_DPAA2_H_ > +#define _RTE_DPAA2_H_ > + > +/** > + * @file > + * > + * RTE DPAA2 Interface > + */ > + > +#ifdef __cplusplus > +extern "C" { > +#endif > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include > +#include > +#include > + > + > +struct rte_dpaa2_driver; > +/** > + * A structure describing a DPAA2 device. > + */ > +struct rte_dpaa2_device { > + TAILQ_ENTRY(rte_dpaa2_device) next; /**< Next probed DPAA2 device. */ > + struct rte_device device; /**< Inherit core device */ > + uint16_t dev_type; /**< Device Type */ > + uint16_t object_id; /**< DPAA2 Object ID */ > + struct rte_intr_handle intr_handle; /**< Interrupt handle */ > + struct rte_dpaa2_driver *driver; /**< Associated driver */ > +}; > + > +/** > + * A structure describing a DPAA2 driver. > + */ > +struct rte_dpaa2_driver { > + TAILQ_ENTRY(rte_dpaa2_driver) next; /**< Next in list. */ > + struct rte_driver driver; /**< Inherit core driver. */ > + uint32_t drv_flags; /**< Flags contolling handling of device. */ > +}; > + > +/** > + * Register a DPAA2 driver. > + * > + * @param driver > + * A pointer to a rte_dpaa2_driver structure describing the driver > + * to be registered. > + */ > +void rte_dpaa2_register(struct rte_dpaa2_driver *driver); > + > +/** > + * Unregister a DPAA2 driver. > + * > + * @param driver > + * A pointer to a rte_dpaa2_driver structure describing the driver > + * to be unregistered. > + */ > +void rte_dpaa2_unregister(struct rte_dpaa2_driver *driver); > + > +/** > + * > + */ > +int rte_dpaa2_probe(struct rte_driver *driver, struct rte_device *device); > +int rte_dpaa2_match(struct rte_driver *driver, struct rte_device *device); > +int rte_dpaa2_scan(struct rte_bus *bus); > + > +/** Helper for DPAA2 device registration from driver (eth, crypto) instance */ > +#define RTE_PMD_REGISTER_DPAA2(nm, dpaa2_drv) \ > +RTE_INIT(dpaa2initfn_ ##nm); \ > +static void dpaa2initfn_ ##nm(void) \ > +{\ > + (dpaa2_drv).driver.name = RTE_STR(nm);\ > + rte_dpaa2_register(&dpaa2_drv); \ > +} \ > +RTE_PMD_EXPORT_NAME(nm, __COUNTER__) > + > + > +#ifdef __cplusplus > +} > +#endif > + > +#endif /* _RTE_DPAA2_H_ */ > diff --git a/drivers/net/dpaa2/rte_pmd_dpaa2_version.map b/drivers/net/dpaa2/rte_pmd_dpaa2_version.map > new file mode 100644 > index 0000000..31eca32 > --- /dev/null > +++ b/drivers/net/dpaa2/rte_pmd_dpaa2_version.map > @@ -0,0 +1,4 @@ > +DPDK_17.02 { > + > + local: *; > +}; > diff --git a/mk/rte.app.mk b/mk/rte.app.mk > index f75f0e2..9e1c17c 100644 > --- a/mk/rte.app.mk > +++ b/mk/rte.app.mk > @@ -101,6 +101,7 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_CFGFILE) += -lrte_cfgfile > > _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BOND) += -lrte_pmd_bond > _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_XENVIRT) += -lrte_pmd_xenvirt -lxenstore > +_LDLIBS-$(CONFIG_RTE_LIBRTE_DPAA2_PMD) += -lrte_pmd_dpaa2 -ldpaa2_mc -ldpaa2_qbman > > ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),n) > # plugins (link only if static libraries) > IMO, the way Bus is kept is debatable. - should it be in EAL (lib/librte_eal/linuxapp/eal_pci.c like Bus patches) [1]? - Should it a 'handler/driver' parallel to device drivers? I personally prefer a clean layer for buses with: - RTE_SDK/drivers/net/dpaa2/ - RTE_SDK/drivers/bus - RTE_SDK/drivers/bus/dpaa2/ - RTE_SDK/drivers/bus/dpaa2/dpaa2_bus.c etc. For PCI, which is generic (or for other similar generic buses, like platform), we can keep the implementation within lib/librte_eal/linuxapp/*. What do other think about this? [1] http://dpdk.org/ml/archives/dev/2016-December/051359.html