From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0043.outbound.protection.outlook.com [104.47.33.43]) by dpdk.org (Postfix) with ESMTP id 0EA2E7D14 for ; Fri, 16 Jun 2017 07:33:10 +0200 (CEST) Received: from MWHPR03CA0049.namprd03.prod.outlook.com (10.174.173.166) by BN3PR0301MB1186.namprd03.prod.outlook.com (10.160.156.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1178.14; Fri, 16 Jun 2017 05:33:08 +0000 Received: from BN1BFFO11FD008.protection.gbl (2a01:111:f400:7c10::1:175) by MWHPR03CA0049.outlook.office365.com (2603:10b6:301:3b::38) 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; Fri, 16 Jun 2017 05:33:07 +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 BN1BFFO11FD008.mail.protection.outlook.com (10.58.144.71) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1157.12 via Frontend Transport; Fri, 16 Jun 2017 05:33:07 +0000 Received: from Tophie.ap.freescale.net ([10.232.14.39]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v5G5WNFL001003; Thu, 15 Jun 2017 22:33:05 -0700 From: Shreyansh Jain To: CC: , Date: Fri, 16 Jun 2017 11:10:52 +0530 Message-ID: <1497591668-3320-23-git-send-email-shreyansh.jain@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1497591668-3320-1-git-send-email-shreyansh.jain@nxp.com> References: <1497591668-3320-1-git-send-email-shreyansh.jain@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131420647877290861; (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)(39840400002)(39410400002)(39400400002)(39850400002)(39860400002)(39380400002)(39450400003)(2980300002)(1109001)(1110001)(339900001)(199003)(189002)(9170700003)(85426001)(6916009)(48376002)(36756003)(33646002)(5660300001)(2950100002)(2906002)(104016004)(356003)(5003940100001)(6666003)(38730400002)(105606002)(8936002)(4326008)(86362001)(81166006)(106466001)(189998001)(50226002)(77096006)(50986999)(110136004)(76176999)(47776003)(2351001)(8676002)(54906002)(50466002)(53936002)(305945005)(498600001)(8656002)(217873001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR0301MB1186; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; MLV:ovrnspm; A:1; MX:1; PTR:InfoDomainNonexistent; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD008; 1:zqUbJgD4E/1AyyM+JT8j2XPTt/Heigu4g3OWJSOVCSddtSqdog9iLZo9jUNWWBZFoo9U/uL+pXuBVghMLdWznsB1sPYahmbieKTxCff2lamQMLaL433XvudxezN3aJ8Ld1iG2RM69VPJZaj8yAhmaeTXeMmcE4XjXVxVbHeJ4+EAmdQ5aT9GV2OivJ12DChtbyNb52dqzAuxJZ7A6gZMrioGmGTcUaFGpaBfSY4cn4Cz/TduaR13R2ASKvbJSOUaEkkyGyf5MZYT2AE0p/Y6Om8kjcc7enf12CV8CGsq+O48340BuETR35p4SVAmIG3mj47Lr8rfrjMz13hma9IKLYJuBqw+kk/92pm7ZuQnNc5dUFRze7ywKcI+OSlh03EXtXY+Hbnx/JKBN3rcYPv8wofdf5hT8LNYZ04n/lj9yBbqq4c5J8WAmEu65FDRbPgWikWclY6idglk4TR9juiIXgftNJdjt1x4w+r5ATkGsioLrXIc6fvdUunUTCeneFOX2+6+8CsqofwZClGe2Q5m8rN0nwmjkO8uNBFWAqmJOWJEl7t/IoaG/puzU0gkulsoUlkN/idc9k9r4h6E2akDmad66tUx38p1ZZzlvpZcDiLBUQOcTZ1iop5Cw9G1NQa3+Q39o1ext9bu9fZBuafTTZeHpHLEoZsc0xGVsnn557nQggpO1E5M7NxXBCCsbD5rTB8GAucgE/Q9qXTan2A6d9Pi2ZbZStfZ4A3oKO9zn1k= MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0cd03357-889f-45fc-a065-08d4b4792b44 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131430075)(201703131517081); SRVR:BN3PR0301MB1186; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0301MB1186; 3:uNNPPdhq3BUAv5dHyQp521YStm4p400mS7rKgwaFMSKe88I3p8KFI0DiPdL69dqZ1siIw6gzaTSGiojRoC2KVJ6VWPbZoC37ufV3N0kUwOAOzhiO4GqQdF8FFU/Ezr2YeBA9hu1Ek5qYLcchkHKXYL40Mwmwyblkr97DNY0e/nx7vi+VUIwPuKI3HJM09CF6UNonXfWPvWN/HUYwdcqvIMbx+oE/dP3pzdQQv8XbWKrsGPCn2N6oNx+zQ5MUMSe1aKPB14I5vAsPZJ+MbZskFBwJqR3tlrSug3H4S7jPdrPnijZlSP5IRDvydForssKIXHi7tgHGPPYYogHz33mI0t3XaZTi2ktI5VRkkL+bl1+Oyx5fHX3iMrldIFeqqdNOIoV/8HIfn3OIhFHuNZ+BQtpCt3h8irtOrWChdqy5jzfYww90v0qFDEFpbxht8oXN; 25:HTvymcgu1Q9j7P1Q1IllZOfv9NSpeH1Xj6hOf3KzEJFhW/kebEBj2Xm9O26pfFoG2eiruTJVXzl74TgU9E6owDR+lteX0C+luyigoRe8UW9Uz79fjn4PU7D52qHJfPAikZEVMS5lhzwcdXauJL+VMmXNWSxlqFECmBFWnFLM9AHGWRbrivc7cxEylflH6pUBdLXzinJweBIbgvZMrB3vEooF7duhOJzGlV7pVGrhBp1+Niggjp7vZt66QERNezNVTwn+Ks8/8HvPsTp2fjxKVXwi9PeSst/zQraHmQ3mADruZlXRdwn7CwFZ01sFi4nC4O22l3PgsXCCuc4LCDimCcBbTVOOXCi+/BjgB4NVQFDT/9MdbOcu4KrYuzaWf3seydmQak3HpjTR2ckTwJZuenZfUurYTNyE8A2Bbvz7Dg7TyPwILi3N350lJ/+5mPz5owRLHr15QLJk6b7CbEqb2aHXfjVT5OL48yNhN9jhKhE= X-MS-TrafficTypeDiagnostic: BN3PR0301MB1186: X-Microsoft-Exchange-Diagnostics: 1; BN3PR0301MB1186; 31:+GdPvFix0ZciV0XjSmNZejfcZ6InWy/CD7l7DpOSi0RsRLsiR0WgqzQBqSaP6s53yRJYVc4ykv/a1S5AbnDh5Pbbmjk6jwa9jogfzdO3Ve2edbOPw5T7p/BaesPyV/a/91lo7SwFcaPve8QGebX1V9H/jmv7pbdCTWnKxkodP//7A4kDJ9tWtVhhM6/hjVDLXvM8RZgNayRm+4bL6sf6oXIxRG+Kv4ELPlQxpfPcX1nMPyz+sOluOTNcZWNAw8L8iTnjF2ljiGd0Oo8lANLjQA== 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)(20161123565025)(20161123556025)(20161123559100)(20161123563025)(201703131430075)(201703131448075)(201703131433075)(201703161259150)(201703151042153)(20161123561025)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BN3PR0301MB1186; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BN3PR0301MB1186; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR0301MB1186; 4:kQkBGV4aL2A1EllwWAnCKc6iuTj8xhTXUaXOl1jo?= =?us-ascii?Q?8y+pp3iX85w7WXZdGkZ3c34EtPv91g+Vdh/0d9j7tvgMGC8OxZZvecpBE8sL?= =?us-ascii?Q?7k+pWUgEdnCytfUD/2kbfKwmezoWW67cefLn2w5xIK3TxXTem4dogE2U0PJD?= =?us-ascii?Q?mPVkKKVpkh+7NhJn5ZBixvo47RGDNpy7V4lx8uZCQgXjMi/livXqHtQr70bm?= =?us-ascii?Q?2N0dOcfBfDQ84wuQz8P/Ms7yY4ClNYg96Js6xrq4XR9RHmj31R5eSlf3CrMH?= =?us-ascii?Q?4FMDOEZ0r54Dq3C2wfz9QckwMmZBtRdzigr69G5qMqqdDhxKSGRMOnzP7dWa?= =?us-ascii?Q?xiZ59iZQ62JB1RhTy5PNaFehr+A6jzZcdWsCrNISmK86BWYFaGpWEhPOpbhY?= =?us-ascii?Q?DOqcbEi0rbrok0dONX65Mk2BXhHdPFLVPWH9nLu1E1n9nRBWAC+Sf7wouXN8?= =?us-ascii?Q?z6uxtD4I4frJDAqro0ZenlqilFuEZYjzI5b4fkTrJFopvNQurh3+kyCcSIYq?= =?us-ascii?Q?qVYjfPxqA3GeaRicGZ+QXvjjmlvuewcTc9nWpOrAgLkxK74za0ERYxHch2F2?= =?us-ascii?Q?b9wJg92i8wI0dw083zkzcwp8OsEMWYeDq0s0vFqr8UrC4MBVHmI1VBkpf8Rp?= =?us-ascii?Q?DfxHZb0Nm/zMMd6chhHVaXLcvxspbBiQMGCWXH8UOAPHbYzlQztfjXwgMpRO?= =?us-ascii?Q?3WnIxBemGiVDXoDg+11ecLaKKSJbhdyKKB5A00lzk+2sKo0+VkupGu6mSRTE?= =?us-ascii?Q?4lhtt4NGy/hHExdMMKaaCH16xW/NPQ2fvJ0BHpdm5M1KxJCvwmpacONWUIJU?= =?us-ascii?Q?ANcGdQ7tg8emXlvvZTOdpYa8b8fBz5p6TnDLWy9m0P54IeykSqndn/n1Wz1d?= =?us-ascii?Q?Zu1bJTUyoM8o36dP83ZtAVPIAMHqe6sXr+ii4Hxpsq8yKtUdYKhs8+U394uR?= =?us-ascii?Q?uWH3273+sXciKRmqlaQWbMrXUnM3jKb98OMczFZyI/6l/RePiphQ3bf0IN1D?= =?us-ascii?Q?i7/R0qpiuwxCLsaUFe35QtiuweroH5TXJQc/5+wjAnTXICIDdmy2Qnful0u0?= =?us-ascii?Q?9Pd2bbY3Nfz5mS/0oJU4Hank3noh+7fXY9oSFdMZ6IyeuvADHs4fqHFxiARc?= =?us-ascii?Q?56RpGvUA1bbJnzxMKiiCVFTn5MNVFRuaGcwNBz04RzxNsLClprnUJjFqXbFt?= =?us-ascii?Q?L39B0NWeBae2wHqKXtDvy3DdyNipzRBEm1vDIkn/kDXc0kojdVsVEiIks6gA?= =?us-ascii?Q?2czmB6JrLLTpTNVe/y42K0+ll6sB/pLiaT0Dv5fTn9bwtGjhOaqocASHfixB?= =?us-ascii?Q?uw=3D=3D?= X-Forefront-PRVS: 0340850FCD X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR0301MB1186; 23:lpFrEdH4HrX5hZ7yR+VCmxJ3HM3vqKAgVxo2pCc?= =?us-ascii?Q?xvyF3QSExO3gjxiYjpyyEloyggPXFzj21Pngam0fp2Kqeg1Wgi6ilm4b6DnR?= =?us-ascii?Q?CpN3jvjFnHCxmujIeFezCM8ZhkkOQk05Bs5xm57aJatvJ/Ko58sagEhVYL0e?= =?us-ascii?Q?9NlprZ8qoLRuHNmnh63DbTft9bS76nMQq4yKyq8ApTpW8/9AoOYc8WhEqeW5?= =?us-ascii?Q?ywxBhYSfudF5fImJDWlE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d1glaak/tWeziPs+cVgoajKMDhPaSIauDnOK0Cm3yZRnH5hPHBbM/65Yo+vi4bbGeHBko7nB6/thvl1o3rKcqtVmfNR+luJbS3akdO+dGRfX4v14tLFqV+HdgAZ8SvQDkPuO7UpKt94TvC5KcrRulW5qMKaEG0woDtHiwdl93Iq07ZmSfzyxC+654P3q/0g/IAgLRIatw8unlYUGGrBiWXSY02wI4+eWT2hCc+xdpNa/nQkbdZo8Eh3H8eU42XX4UCWj2+ri/A6919tBz4xzhQ==; 24:C5Fx2c4haxEjyl2QBUWPgJC5rQ6tmRchZ6DvaLwP+kEbZjJwRS9nbOW8Dv1SQV2Pbna8uMk7TofzXqEei7DmKnxhBOcVm+3D286LU8iqdO0= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN3PR0301MB1186; 7:JRyeROyNh4jc/Av2jk2pJ+f4kghrHwQMWDdFZmZ0YcZk4LcCjKWmf8KWqOc58Nhata5r46r2JPLt18qx8oOdNnnyioYZXO6xoVP6cWNZmxskF/dtaLtHPNzZOhO9ZM02vNqLPK/H/RCCi/ybnvmniRRAMFf+HEgjMb3uqNI7cXEE8HpLv3QA9oBtFgW9vL5MvIZ9PJMcmeqX0WTGtxO/MDTOwMxzFiS5vcv4idvaA0qBskBrYbf7t5q7UrwYbdmb1hkMzFJ1lcBpF7BAZRXACkMg2gXbKj6+9GCSa3pwnTlyuNG9XY1T5VfDya/ciK2Du0qmxaFhtVUwjQ0GJ7uj8g== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jun 2017 05:33:07.4170 (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: BN3PR0301MB1186 Subject: [dpdk-dev] [PATCH 22/38] net/dpaa: add NXP DPAA PMD driver skeleton 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: Fri, 16 Jun 2017 05:33:10 -0000 A skeleton which would be called after bus device scan. It currently fails to identify the device. Signed-off-by: Hemant Agrawal Signed-off-by: Shreyansh Jain --- MAINTAINERS | 1 + drivers/net/dpaa/Makefile | 64 +++++++++ drivers/net/dpaa/dpaa_ethdev.c | 222 ++++++++++++++++++++++++++++++ drivers/net/dpaa/dpaa_ethdev.h | 128 +++++++++++++++++ drivers/net/dpaa/rte_pmd_dpaa_version.map | 4 + 5 files changed, 419 insertions(+) create mode 100644 drivers/net/dpaa/Makefile create mode 100644 drivers/net/dpaa/dpaa_ethdev.c create mode 100644 drivers/net/dpaa/dpaa_ethdev.h create mode 100644 drivers/net/dpaa/rte_pmd_dpaa_version.map diff --git a/MAINTAINERS b/MAINTAINERS index ec5eb00..02cc4c0 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -393,6 +393,7 @@ M: Hemant Agrawal M: Shreyansh Jain F: drivers/bus/dpaa/ F: drivers/mempool/dpaa/ +F: drivers/net/dpaa/ F: doc/guides/nics/dpaa.rst F: doc/guides/nics/features/dpaa.ini diff --git a/drivers/net/dpaa/Makefile b/drivers/net/dpaa/Makefile new file mode 100644 index 0000000..8fcde26 --- /dev/null +++ b/drivers/net/dpaa/Makefile @@ -0,0 +1,64 @@ +# BSD LICENSE +# +# 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. + +include $(RTE_SDK)/mk/rte.vars.mk +RTE_SDK_DPAA=$(RTE_SDK)/drivers/net/dpaa + +# +# library name +# +LIB = librte_pmd_dpaa.a + +ifeq ($(CONFIG_RTE_LIBRTE_DPAA_DEBUG_INIT),y) +CFLAGS += -O0 -g +CFLAGS += "-Wno-error" +else +CFLAGS += -O3 +CFLAGS += $(WERROR_FLAGS) +endif + +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)/lib/librte_eal/common/include +CFLAGS += -I$(RTE_SDK)/lib/librte_eal/linuxapp/eal/include + +EXPORT_MAP := rte_pmd_dpaa_version.map + +LIBABIVER := 1 + +# Interfaces with DPDK +SRCS-$(CONFIG_RTE_LIBRTE_DPAA_PMD) += dpaa_ethdev.c + +LDLIBS += -lrte_bus_dpaa + +include $(RTE_SDK)/mk/rte.lib.mk diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c new file mode 100644 index 0000000..2401058 --- /dev/null +++ b/drivers/net/dpaa/dpaa_ethdev.c @@ -0,0 +1,222 @@ +/*- + * 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 + +/* Keep track of whether QMAN and BMAN have been globally initialized */ +static int is_global_init; + +static int +dpaa_eth_dev_configure(struct rte_eth_dev *dev __rte_unused) +{ + PMD_INIT_FUNC_TRACE(); + + return 0; +} + + +static int dpaa_eth_dev_start(struct rte_eth_dev *dev) +{ + PMD_INIT_FUNC_TRACE(); + + /* Change tx callback to the real one */ + dev->tx_pkt_burst = NULL; + + return 0; +} + +static void dpaa_eth_dev_stop(struct rte_eth_dev *dev) +{ + dev->tx_pkt_burst = NULL; +} + +static void dpaa_eth_dev_close(struct rte_eth_dev *dev __rte_unused) +{ + PMD_INIT_FUNC_TRACE(); +} + +static struct eth_dev_ops dpaa_devops = { + .dev_configure = dpaa_eth_dev_configure, + .dev_start = dpaa_eth_dev_start, + .dev_stop = dpaa_eth_dev_stop, + .dev_close = dpaa_eth_dev_close, +}; + +/* Initialise a network interface */ +static int dpaa_eth_dev_init(struct rte_eth_dev *eth_dev __rte_unused) +{ + int dev_id; + struct rte_dpaa_device *dpaa_device; + struct dpaa_if *dpaa_intf; + + PMD_INIT_FUNC_TRACE(); + + dpaa_device = DEV_TO_DPAA_DEVICE(eth_dev->device); + dev_id = dpaa_device->id.dev_id; + dpaa_intf = eth_dev->data->dev_private; + + dpaa_intf->name = dpaa_device->name; + + dpaa_intf->ifid = dev_id; + + eth_dev->dev_ops = &dpaa_devops; + + return -1; +} + +static int +rte_dpaa_probe(struct rte_dpaa_driver *dpaa_drv __rte_unused, + struct rte_dpaa_device *dpaa_dev) +{ + int diag; + int ret; + struct rte_eth_dev *eth_dev; + char ethdev_name[RTE_ETH_NAME_MAX_LEN]; + + PMD_INIT_FUNC_TRACE(); + + if (!is_global_init) { + /* One time load of Qman/Bman drivers */ + ret = qman_global_init(); + if (ret) { + PMD_DRV_LOG(ERR, "QMAN initialization failed: %d", + ret); + return ret; + } + ret = bman_global_init(); + if (ret) { + PMD_DRV_LOG(ERR, "BMAN initialization failed: %d", + ret); + return ret; + } + + is_global_init = 1; + } + + sprintf(ethdev_name, "%s", dpaa_dev->name); + + ret = rte_dpaa_portal_init((void *)1); + if (ret) { + PMD_DRV_LOG(ERR, "Unable to initialize portal"); + return ret; + } + + eth_dev = rte_eth_dev_allocate(ethdev_name); + if (eth_dev == NULL) + return -ENOMEM; + + if (rte_eal_process_type() == RTE_PROC_PRIMARY) { + eth_dev->data->dev_private = rte_zmalloc( + "ethdev private structure", + sizeof(struct dpaa_if), + RTE_CACHE_LINE_SIZE); + if (!eth_dev->data->dev_private) { + PMD_INIT_LOG(CRIT, "Cannot allocate memzone for" + " private port data\n"); + rte_eth_dev_release_port(eth_dev); + return -ENOMEM; + } + } + + eth_dev->device = &dpaa_dev->device; + dpaa_dev->eth_dev = eth_dev; + eth_dev->data->rx_mbuf_alloc_failed = 0; + + /* Invoke PMD device initialization function */ + diag = dpaa_eth_dev_init(eth_dev); + if (diag) { + PMD_DRV_LOG(ERR, "Eth dev initialization failed: %d", ret); + return diag; + } + + PMD_DRV_LOG(DEBUG, "Eth dev initialized: %d\n", diag); + + return 0; +} + +static int +rte_dpaa_remove(struct rte_dpaa_device *dpaa_dev) +{ + struct rte_eth_dev *eth_dev; + + PMD_INIT_FUNC_TRACE(); + + eth_dev = dpaa_dev->eth_dev; + + if (rte_eal_process_type() == RTE_PROC_PRIMARY) + rte_free(eth_dev->data->dev_private); + + rte_eth_dev_release_port(eth_dev); + + return 0; +} + +static struct rte_dpaa_driver rte_dpaa_pmd = { + .driver_type = FSL_DPAA_ETH, + .probe = rte_dpaa_probe, + .remove = rte_dpaa_remove, +}; + +RTE_PMD_REGISTER_DPAA(net_dpaa, rte_dpaa_pmd); diff --git a/drivers/net/dpaa/dpaa_ethdev.h b/drivers/net/dpaa/dpaa_ethdev.h new file mode 100644 index 0000000..8aeaebf --- /dev/null +++ b/drivers/net/dpaa/dpaa_ethdev.h @@ -0,0 +1,128 @@ +/*- + * BSD LICENSE + * + * Copyright (c) 2014-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 __DPAA_ETHDEV_H__ +#define __DPAA_ETHDEV_H__ + +/* System headers */ +#include +#include + +#include + + +#define DPAA_MBUF_HW_ANNOTATION 64 +#define DPAA_FD_PTA_SIZE 64 + +#if (DPAA_MBUF_HW_ANNOTATION + DPAA_FD_PTA_SIZE) > RTE_PKTMBUF_HEADROOM +#error "Annotation requirement is more than RTE_PKTMBUF_HEADROOM" +#endif + +/* we will re-use the HEADROOM for annotation in RX */ +#define DPAA_HW_BUF_RESERVE 0 +#define DPAA_PACKET_LAYOUT_ALIGN 64 + +/* Alignment to use for cpu-local structs to avoid coherency problems. */ +#define MAX_CACHELINE 64 + +#define DPAA_MIN_RX_BUF_SIZE 512 +#define DPAA_MAX_RX_PKT_LEN 10240 + +/* RX queue tail drop threshold + * currently considering 32 KB packets. + */ +#define CONG_THRESHOLD_RX_Q (32 * 1024) + +/*max mac filter for memac(8) including primary mac addr*/ +#define DPAA_MAX_MAC_FILTER (MEMAC_NUM_OF_PADDRS + 1) + +/*Maximum number of slots available in TX ring*/ +#define MAX_TX_RING_SLOTS 8 + +/* PCD frame queues */ +#define DPAA_PCD_FQID_START 0x400 +#define DPAA_PCD_FQID_MULTIPLIER 0x100 +#define DPAA_DEFAULT_NUM_PCD_QUEUES 1 + +#define DPAA_IF_TX_PRIORITY 3 +#define DPAA_IF_RX_PRIORITY 4 +#define DPAA_IF_DEBUG_PRIORITY 7 + +#define DPAA_IF_RX_ANNOTATION_STASH 1 +#define DPAA_IF_RX_DATA_STASH 1 +#define DPAA_IF_RX_CONTEXT_STASH 0 + +/* Each "debug" FQ is represented by one of these */ +#define DPAA_DEBUG_FQ_RX_ERROR 0 +#define DPAA_DEBUG_FQ_TX_ERROR 1 + +#define DPAA_TX_CKSUM_OFFLOAD_MASK ( \ + PKT_TX_IP_CKSUM | \ + PKT_TX_TCP_CKSUM | \ + PKT_TX_UDP_CKSUM) + + +/* DPAA Frame descriptor macros */ + +#define DPAA_FD_CMD_FCO 0x80000000 +/**< Frame queue Context Override */ +#define DPAA_FD_CMD_RPD 0x40000000 +/**< Read Prepended Data */ +#define DPAA_FD_CMD_UPD 0x20000000 +/**< Update Prepended Data */ +#define DPAA_FD_CMD_DTC 0x10000000 +/**< Do IP/TCP/UDP Checksum */ +#define DPAA_FD_CMD_DCL4C 0x10000000 +/**< Didn't calculate L4 Checksum */ +#define DPAA_FD_CMD_CFQ 0x00ffffff +/**< Confirmation Frame Queue */ + +/* Configuration variables exported from DPAA bus */ +extern struct netcfg_info *dpaa_netcfg; + +/* Each network interface is represented by one of these */ +struct dpaa_if { + int valid; + char *name; + const struct fm_eth_port_cfg *cfg; + struct qman_fq *rx_queues; + struct qman_fq *tx_queues; + struct qman_fq debug_queues[2]; + uint16_t nb_rx_queues; + uint16_t nb_tx_queues; + uint32_t ifid; + struct fman_if *fif; + struct pool_info_entry *bp_info; + struct rte_eth_fc_conf *fc_conf; +}; + +#endif diff --git a/drivers/net/dpaa/rte_pmd_dpaa_version.map b/drivers/net/dpaa/rte_pmd_dpaa_version.map new file mode 100644 index 0000000..b6d2840 --- /dev/null +++ b/drivers/net/dpaa/rte_pmd_dpaa_version.map @@ -0,0 +1,4 @@ +DPDK_17.08 { + + local: *; +}; -- 2.7.4