From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0052.outbound.protection.outlook.com [104.47.37.52]) by dpdk.org (Postfix) with ESMTP id DDECA5678 for ; Sun, 4 Dec 2016 13:44:25 +0100 (CET) Received: from BN6PR03CA0068.namprd03.prod.outlook.com (10.173.137.30) 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; Sun, 4 Dec 2016 12:44:24 +0000 Received: from BY2FFO11FD036.protection.gbl (2a01:111:f400:7c0c::133) by BN6PR03CA0068.outlook.office365.com (2603:10b6:404:4c::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.747.13 via Frontend Transport; Sun, 4 Dec 2016 12:44:23 +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;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.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 BY2FFO11FD036.mail.protection.outlook.com (10.1.14.221) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.734.4 via Frontend Transport; Sun, 4 Dec 2016 12:44:23 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:; UpperCasedChecksum:; SizeAsReceived:714; Count:10 Received: from bf-netperf1.idc ([10.232.134.28]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id uB4ChXbL032240; Sun, 4 Dec 2016 05:44:20 -0700 From: Hemant Agrawal To: CC: , , , Hemant Agrawal Date: Sun, 4 Dec 2016 23:47:13 +0530 Message-ID: <1480875447-23680-19-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1480875447-23680-1-git-send-email-hemant.agrawal@nxp.com> References: <1480875447-23680-1-git-send-email-hemant.agrawal@nxp.com> X-IncomingHeaderCount: 10 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131253290634179086; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(2980300002)(1110001)(1109001)(339900001)(336004)(189002)(199003)(105606002)(106466001)(39450400002)(77096006)(2351001)(38730400001)(39400400001)(97736004)(39380400001)(39410400001)(50466002)(104016004)(8676002)(2906002)(33646002)(4326007)(5003940100001)(48376002)(305945005)(86362001)(8936002)(68736007)(50986999)(76176999)(81156014)(7846002)(8666005)(626004)(356003)(81166006)(50226002)(36756003)(92566002)(85426001)(189998001)(6666003)(6916009)(5660300001)(2950100002)(47776003)(110136003)(7059030); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR03MB2477; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD036; 1:2SYnXZa+TYmi1vbrwX5L0YzgiLjpOHsIQ7X/aoFM8UfpiTGgpuOJsOqNgXgOOh6cNoRt/jkeFqFWb6DWRBdD9BNwtlz2HZNYuGBysG/QMe1jCt+EHKzWcC/w7Ahk+5D1H3WYRn6W4XXfSw/B1w9upztDjMOV7LBWAJTZ02YLk4tZ4Qs21Bg6BVuB9vNdIl4BWNCsHEVY+vmUiRq90uCmbqERkDOpSm5AC8mp+pS8wszzGafNln9OPVGbBC4auzYr8Ph50jUDfIRdnQ5Udrczr4iazAcONEJVXNmfuCGlxdXGh57uDxae4OQ5SkdbQbxk2spCxAjvtoyPFjqkoHbEE0ecm0Bc0lFx8vr17TwRvG9N375gyfkSbg8Aaahw/VUdKBD+7bYqkqnLPBm/jh/6oClHFBldwL8FLBk3FGDt62EacSrtHfAWLtiiEnX69T9bM4qIXNSwZyON0QAzCXkqzEgVvt/TAqVUksWSvEH2D+6rml/dZ6oPwuE2WyKreoFkkB2VLqACA5Ej6l+e+FQmb1ACYv9xr3kxQAq/bScuCFGOmwT9gohQ3qLCTGc5+CD2GmgEyz0XvJhzJs7cDLe8cLHf7K4gFx4NvVHpSBfExyfhohTG8NvJnPXncZiaRy/vUnwKehrNN1FC+a3Qsds8vnRBHhJXFVMbmBBfKDQMDHzEksVRR2Qqk3NXjg+qdbKAxRUxizRmxcK9QeuKbO+bDkrGl9ozrFQh4vvbHewSa0OkW4cebvbdk7bXh6zKL214Oh5ANReoM6QR/4Pvns+LnQ== MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: fdf1decb-38ac-458c-f20e-08d41c434650 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:MWHPR03MB2477; X-Microsoft-Exchange-Diagnostics: 1; MWHPR03MB2477; 3:kesbPaSX+n50bJ8TpcZrO6oME7BcolEGU+0SRXParmi0zUn6y19G2TjT2G/ykxxb5sGRt1RZORnniiRXdBAj3W1Iv2RBtNWvOcudVpyHiIKzI5/GAC2FhzufITXzbQyqaPVSsZlS14ZLDjoBMU4UwFC/6zKMw67cSLu+jRT9Dis4Jspba2VPLoAumG0j1nE1gFrqW8YaykRO7WRVTieGW5pUUVsfwyqWFxvN1ribGYvNhAmraUh7jfWIBFjAq9C0DF2KYGLHMOFy4CKJKr0IrKHgy41EaGzJZaw1p3o3S7zZCpqExE6YC7Me/TL3gZBW1ltkUuE7xpnLT/acDOuwFc2uwG2bIXruUZAOk0NHIGNOK0s8imjHg/JEPw69aSPE X-Microsoft-Exchange-Diagnostics: 1; MWHPR03MB2477; 25:uxkVi7SQhg5eS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Yn0SWtIVcaJf+OhaHs22y0g= 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:w3yQjNWl2PpYykiwxEtyEmLzGr/H4LnPjioFdk6hpKU6H0l7hunBjBEEbcu+I24VN+N38hywtFlpGthJEumVZ+anV7GOXahbkkRtYS4ZYzQkFF239CST308cVJCqUc71DNgJ5ebrh53t3Ov7/s4nvjzhZcXBJuwey4p15y/N4ebzQ27KbEHd2xeGcKwHjgpQUoygyPkVsXpeMX47Vh103HVBaN65lW//OJYxfy8kRaUXHS0n4lc/J74qZigoIT893C5V3rqHdy+KaFLiDT5uvKVeo8hPEBUZf9H8w6ZdCeGPEFjNE/rxgEt0DJydgRyZzhnZrE7vLNcZ7RhffkpflOYg7woP3pfG/n2WVp568tRwmHcXwwhK6U2pr8lzSnZvTURbpGPdTo+zrBuDpCjjXTieYK1gzr61slMKJnyhkAMXEdD3niqtA9wdWaR6kR3qFGX7b46wMAX9C2RtAtCqCtpR0YzREFcA+vkhsyknR4fLpiGn1+pyovgDTzwfnNnh8p+tzKNX1cRRLmQbp0FEdG+earDsdjCVQz3zqjPEeVKZ/03My4vTynQFzy6Z/CUL9Rx69r7Z/LCKxUtLK+2/ArniybI2RW2WmfW7/v7JzyoUif8UMiF5MmI2tJEhnI3qb1gyMNzZ/WMEDdt7D+YuU7vKFFyomlqrrBSvqCTHr7cbG8MV5+Dx0yuzxVVT0JF0Rt4XSpkCwh1+pQGUV9Lnk1qDY6TvFPN8rSq+h0x1m6rc94QPdFBH3v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yb23z3zh68qW6WIMuWqe2jWFTD0rpcA84Qe4TJ6EKarb1U2Eclo38u5ks9kItmO6tj4vuh+7JwWXE/NRmRMLmuxq4hrEc0QKnTHsdEdocTd8xJnHmhSjYoO1/EZ0EhIU6EQIlZ9Yc8JWJoUwM+o; 24:kmIPDlWoR4gnWNEFQVDovyyz/hNlH8J2SEoMGH9fId44soilvxSEJ/BJK2qjzii4iHEF9ayT7jIo/TwVDIDD0kIogkdKNiDridyaoqQ8yX8= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; MWHPR03MB2477; 7:9+KSZN0bWII7/N+avuMdg3yAMQN42RDzpd0aclI+8yCGMMOGRizhEVuHuPiwIujre2Xr3W+Pb55mz3yHEyh9ZUeMj/beRWt+46nwB9HrNdoojUAh4yQCaS8TDxURuuyripJJ6gwMAbFucWJD+8yisWLqdSeo/vyxwRO6zs1mvnMgdOukXJR5885CmEnwZ/joRqd7uN/woxvdgsWUO2R04IiZryk6RlouevZoFJbW62Tf6JWikNI2r3zk0qT3h0WSl9CGNrsvN5yzBtoJZqvj1Nrfpd3lL3gRS9gTIRJ8/vM/w6N/M6aTIfIe/f1khSOLEwJ1hIzIO6xwjzeCFCDbiT4UGFtK4ga0VymUUxmDNNThqMgJA3oWvbMqYJYSaYQj3IuVR2CNtYgMs/Ihwo6SK+7Ou30hbGy6iwKPaoRtnmqOZDrPKYzZWNWnsI5obur+YtJb1ZPxuWAPDQomMuA8tA== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Dec 2016 12:44:23.2151 (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: MWHPR03MB2477 Subject: [dpdk-dev] [PATCH 18/32] net/dpaa2: introducing dpaa2 pmd driver 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: Sun, 04 Dec 2016 12:44:26 -0000 add support for dpaa2 architucture fsl-mc bus based dpaa2 pmd driver. Signed-off-by: Hemant Agrawal --- drivers/net/dpaa2/Makefile | 1 + drivers/net/dpaa2/dpaa2_bus.c | 64 ++++++++++++++++++++++++++++++++++++++-- drivers/net/dpaa2/dpaa2_ethdev.c | 54 +++++++++++++++++++++++++++++++++ drivers/net/dpaa2/dpaa2_ethdev.h | 39 ++++++++++++++++++++++++ 4 files changed, 155 insertions(+), 3 deletions(-) create mode 100644 drivers/net/dpaa2/dpaa2_ethdev.c create mode 100644 drivers/net/dpaa2/dpaa2_ethdev.h diff --git a/drivers/net/dpaa2/Makefile b/drivers/net/dpaa2/Makefile index c4981b2..45e28d2 100644 --- a/drivers/net/dpaa2/Makefile +++ b/drivers/net/dpaa2/Makefile @@ -61,6 +61,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_DPAA2_PMD) += base/dpaa2_hw_dpbp.c SRCS-$(CONFIG_RTE_LIBRTE_DPAA2_PMD) += dpaa2_vfio.c # Interfaces with DPDK SRCS-$(CONFIG_RTE_LIBRTE_DPAA2_PMD) += dpaa2_bus.c +SRCS-$(CONFIG_RTE_LIBRTE_DPAA2_PMD) += dpaa2_ethdev.c # library dependencies DEPDIRS-y += lib/librte_eal diff --git a/drivers/net/dpaa2/dpaa2_bus.c b/drivers/net/dpaa2/dpaa2_bus.c index fa88599..81eaca8 100644 --- a/drivers/net/dpaa2/dpaa2_bus.c +++ b/drivers/net/dpaa2/dpaa2_bus.c @@ -44,6 +44,7 @@ #include "eal_filesystem.h" #include "eal_private.h" +#include "dpaa2_ethdev.h" #include "dpaa2_vfio.h" #define DPAA2_BUS_LOG(level, fmt, args...) \ @@ -77,10 +78,67 @@ rte_eal_bus_remove_driver(&driver->driver); } -int rte_dpaa2_probe(struct rte_driver *driver __rte_unused, - struct rte_device *device __rte_unused) +static void +dpaa2_device_name(struct rte_dpaa2_device *dev __rte_unused, char *ethdev_name, + unsigned int len) { - return 0; + /* Fill the name of the ethernet device based on the device info + */ + /* TODO This is dummy */ + strncpy(ethdev_name, "dpaa2_device", len); +} + +int rte_dpaa2_probe(struct rte_driver *drv, struct rte_device *dev) +{ + struct eth_driver *eth_drv; + struct rte_eth_dev *eth_dev; + struct rte_dpaa2_driver *dpaa2_drv; + struct rte_dpaa2_device *dpaa2_dev; + char ethdev_name[RTE_ETH_NAME_MAX_LEN]; + + int diag; + + dpaa2_drv = container_of(drv, struct rte_dpaa2_driver, driver); + dpaa2_dev = container_of(dev, struct rte_dpaa2_device, device); + + eth_drv = (struct eth_driver *)dpaa2_drv; + + dpaa2_device_name(dpaa2_dev, ethdev_name, sizeof(ethdev_name)); + + 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", + eth_drv->dev_private_size, + RTE_CACHE_LINE_SIZE); + if (eth_dev->data->dev_private == NULL) + rte_panic("Cannot allocate memzone for private port" + " data\n"); + } + eth_dev->device = &dpaa2_dev->device; + eth_dev->driver = eth_drv; + eth_dev->data->rx_mbuf_alloc_failed = 0; + + /* init user callbacks */ + TAILQ_INIT(ð_dev->link_intr_cbs); + + /* + * Set the default MTU. + */ + eth_dev->data->mtu = ETHER_MTU; + + /* Invoke PMD device initialization function */ + diag = dpaa2_dev_init(eth_dev); + if (diag == 0) + return 0; + + if (rte_eal_process_type() == RTE_PROC_PRIMARY) + rte_free(eth_dev->data->dev_private); + rte_eth_dev_release_port(eth_dev); + return diag; } int rte_dpaa2_scan(struct rte_bus *bus_d) diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c new file mode 100644 index 0000000..17dfff6 --- /dev/null +++ b/drivers/net/dpaa2/dpaa2_ethdev.c @@ -0,0 +1,54 @@ +/*- + * BSD LICENSE + * + * Copyright (c) 2015-2016 Freescale Semiconductor, Inc. All rights reserved. + * 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 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 +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* DPDK Interfaces */ +#include + +int +dpaa2_dev_init(struct rte_eth_dev *eth_dev __rte_unused) +{ + return 0; +} diff --git a/drivers/net/dpaa2/dpaa2_ethdev.h b/drivers/net/dpaa2/dpaa2_ethdev.h new file mode 100644 index 0000000..0295868 --- /dev/null +++ b/drivers/net/dpaa2/dpaa2_ethdev.h @@ -0,0 +1,39 @@ +/*- + * BSD LICENSE + * + * Copyright (c) 2015-2016 Freescale Semiconductor, Inc. All rights reserved. + * 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 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 _DPAA2_ETHDEV_H +#define _DPAA2_ETHDEV_H + +int dpaa2_dev_init(struct rte_eth_dev *eth_dev); + +#endif /* _DPAA2_ETHDEV_H */ -- 1.9.1