From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0057.outbound.protection.outlook.com [104.47.40.57]) by dpdk.org (Postfix) with ESMTP id 83211BB30 for ; Thu, 27 Oct 2016 17:17:49 +0200 (CEST) Received: from BLUPR0301CA0034.namprd03.prod.outlook.com (10.162.113.172) by CY1PR03MB2378.namprd03.prod.outlook.com (10.166.207.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.679.12; Thu, 27 Oct 2016 15:17:48 +0000 Received: from BN1AFFO11FD053.protection.gbl (2a01:111:f400:7c10::144) by BLUPR0301CA0034.outlook.office365.com (2a01:111:e400:5259::44) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.679.12 via Frontend Transport; Thu, 27 Oct 2016 15:17:47 +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 BN1AFFO11FD053.mail.protection.outlook.com (10.58.53.68) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.679.5 via Frontend Transport; Thu, 27 Oct 2016 15:17:47 +0000 Received: from Tophie.ap.freescale.net ([10.232.14.87]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id u9RFGIfe027183; Thu, 27 Oct 2016 08:17:45 -0700 From: Shreyansh Jain To: Date: Thu, 27 Oct 2016 20:47:36 +0530 Message-ID: <1477581467-12588-11-git-send-email-shreyansh.jain@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1477581467-12588-1-git-send-email-shreyansh.jain@nxp.com> References: <1477310380-17944-1-git-send-email-shreyansh.jain@nxp.com> <1477581467-12588-1-git-send-email-shreyansh.jain@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131220550680692138; (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)(199003)(189002)(76176999)(36756003)(2950100002)(97736004)(356003)(77096005)(50986999)(104016004)(189998001)(6916009)(92566002)(5003940100001)(7846002)(87936001)(2906002)(305945005)(47776003)(8666005)(85426001)(586003)(4326007)(2351001)(105606002)(106466001)(229853001)(86362001)(33646002)(8676002)(48376002)(6666003)(8936002)(19580405001)(68736007)(19580395003)(50226002)(110136003)(81166006)(11100500001)(81156014)(5660300001)(50466002)(626004)(7059030); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR03MB2378; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD053; 1:oVCVa1E+mJEiPT9jbhuRBCsXtPxutgdOpCzeCImwsWlJA8wol8tg9PQkP2DOolIp7NdygjEjZu2mqFIZT1+Sbip0fKgY9cAUYqR8JI9xAZ32ib12Tg7TrZSPUzJeSJPDqT5EimcchAsx/qsuzjzKXsYtBAVa1RDnapcGds92v1n+Mh8ye9MANp7cY7eX05/VpU9HCsZ8TTduTD9kTQstaTIVor4inMWesWq1AvtVxts4Y3h3KgAZucrb4shxFO8Lj4VgEX5Fc3BpEFiVCmfS6dDZ3tpJPquMutfP9VFrkl20tJ7rcyg6DRdd9qi6qz1k+sDG0Nmg7DW9EW23tlxlegVoWdv9ilku1LXeso0GQcPNwClI0wOQWwclX7COmb+2Itjr5QHSm45NrRGXJwjxQdTwoSJTWbp2O3Z7h8DetheCJm1mP7hsAbu78goPJvZTbFBVZBO55ftc6AIonskUdgznJb/Jegma3TpXy5O+RWrIgK+rcxXZC2spA2Tn4n73KtewGyNrWdB7zskzgfQfRDGVvY88ExXXe6eYDRjw9o8KHcss8B6ktPhJNI6feJaJ3vAuFzCRf+aXqRV8MQPqYX+3AE+Jsm7axCO33mbiOG13odie3G2GPAEH0ibVqZbgudDE3OwGgpHbBDAYjlKsmhaAU7IntcHhuTHeAVMAZ39QLNz2tTqNjUUy/YMbHF70ym9CHgkqTO71m/qocsoVC4kW46caYL9lnx52SLvEUqs= MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: a777d834-6325-4c5d-644d-08d3fe7c6902 X-Microsoft-Exchange-Diagnostics: 1; CY1PR03MB2378; 2:3b9x6Gn+2QMiaE2EeCnkW6T+KKrqShcrOWMJPfzLLpZ4uhY4S9SLVHjVz0CNmXq8zTF/z1xO16+ifMkSw7MXGaC6zfdhqzp9XgIMWvQ8/VoddNlnOa0WcHHKMgNy/3LmTST9Un6+0D1WUXKC9iT1+ulqB3FqtdYvhxYFdRAxdV1vbMIoF3ecFVgQXYjmIjzt2ORaAIOIUbtm2Q++SYs/GQ==; 3:ypNccJnT8lev/PkjVyjECVvvoN57yZdD2LQc5R11I6pvpiZk3XS1poSbqBcGao66M/2gYzb6OtjBRFj8k7Smf1AxFy3N+oktBNLVToKCYaFhuxig1xphbyFNu/2ep4QBxAht90RBR+aI9SiokDeSwXIDMJS8LaZQ+M9K9zyrAN79KjP/shrMxpHU/zZCScRygdXIU6ZRZ5sb+u+CnoHyBmv5B/Vo7v2qyGbOoxitGO4nOssmhL8FTfpw1ztq8kgC; 25:BaJuT8FBw9yn9BhaNzJ4AliKjgLj4L+5wGuq3Zg9cLkzGtPhJifocfuuDIMbefIFlcxxM4g7A5l1ReVmSltZ8DXJ/QZHVlmKqo+nd2je9IIf8kJAY+7oA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xj6HYVIEtIvrZItVWa+G6HApz20ZMSQpNetat0TrUj38IoVdTwvoMjtyYC2Depv2pjBtOY2mxbZuib7BbuX/XgACOfGyfvcwkveiBpUT9WFP9gN50zAnH66eyUx7/YmFuh3f86stlZ32OcfB/Ry77GGpPBUHuY7b49EzrDyw1sJWbhC/7mqmUbC1st1xjxiBU7tl+021EEsJ9+C3Dl4kizBsml5V2vjra8vVeO3SO X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(13023025)(13024025)(5005006)(13018025)(13017025)(13015025)(8121501046)(3002001)(10201501046)(6055026); SRVR:CY1PR03MB2378; BCL:0; PCL:0; RULEID:(400006); SRVR:CY1PR03MB2378; X-Forefront-PRVS: 0108A997B2 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR03MB2378; 23:Iha/x7xX7BRjUs2jdD2pZCO4U3GaQPkOml8wPRRjy?= =?us-ascii?Q?vr+ng8bAG5bssroxoM8w13bDTLTo050OEzdni3SYUYcnMlVlgJR8N4CjvUPe?= =?us-ascii?Q?TUHWphMmsMA8CGiDRm5M31G0ysUJQO3naB+qHaQ609Py2xJxKqrQWvcWjVLn?= =?us-ascii?Q?V7G2xOog9yZRFX3vuYiybsNxfUE9ylkm05NWkCe17AY8cxeYd/DZAYnhpzjs?= =?us-ascii?Q?5uOE3uz3sM7tIIN3bEuZcqw4mJ9rzRfrrHqgXGcp35s/NrE1/LYAitULhXI+?= =?us-ascii?Q?T3KyPD6WTBJYLNEWLc3pqpGzgDImu9jSNE35VI1e0tewfHfOXQsFwPTqoDL0?= =?us-ascii?Q?fw4tE8OSoeXjA7mlJtLFUbF09o1fuHF9QIwFkiBOU4nigrJxBIBDE+7h126M?= =?us-ascii?Q?/NVQqMGLLgeDI/oBIuaMUbF6WJK/1cc1ONC2ul35yrcMom8JQcWhRs8uZYoV?= =?us-ascii?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MKFDT1fdxgzjb1AkmGI10VHp7t6cv40Zf27ljf8Pg0VvbyqQE6SpjEffCnmkvFT7po1Y3O1hOPMNoYJ7o+KAFe6x3jBKrvQFqZDSvSAOoRCLM48RvrIRo7YLtNfh3izpvTSB8QBLKnlRxY2JxyNNVQfl+vCVaDYYy3oOP/7sQukyoGGDSrmWqSj+XeDOg7D+dDNILwnBrQsu; 5:Q+K4E/Bia5fuLJYR3aOSck7pC1CbqqDOB5Z9BzpWFraJxGgw3wa3ZgdYzTc4F/OKYn4bafJWql4eh5bXefVyiD0c7Cbk6VtNSrXuLLtM/6goaBop12nljPtOjRZRo/zicjGcs0ih3VDqhsdA2ZvURjlEuemTEplJdTwn1QM7lniF92LosbIcb+o34LXLvhTc; 24:5hEtjNAVvB+NLmVm+pW44xnwhYmXax41F9tDnbw5sNXcQPAyjAMfoD+RexsHxuQ0MKEns/WrmsKtXGTd9k2q9Tto8xP2tGTO71a3t+w8EI8= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR03MB2378; 7:Mna2ip2qy/1A0EjD/WiPuYnRYEVUhO0m4D5eRkmJJ4w/5cX/OJu/HmdbFrH/afRPvMrLTnAI9QPB8aDZuD0ig7KdtevG/ep7xUcvDaPVy+ftp2ZVGgN58Q0qnCORN+Dx/PNNJ7PAmGG7I4nXTr+uDePj1xfeYUuB60COl9BAPolj0mxB9x5JIe97L+fONhfHh5fcPI6uAF68IROTKP2Gl0SdAKH20DrTBJUTYb+DaIM8RnYNkcDQW6soxcsXE5G/UcDbhM1jF8qKDilkgToSijR5dQ9UeA9Tz0reNZvbJUdtEQUI7Q+Z/9j8Ts/ZGlxF1rjzMfXhbtEaVTBD4WMClObAIkGU034c5z9flRQ7wrg= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Oct 2016 15:17:47.8664 (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: CY1PR03MB2378 Cc: Shreyansh Jain , thomas.monjalon@6wind.com, viktorin@rehivetech.com Subject: [dpdk-dev] [PATCH v6 10/21] eal/soc: init SoC infra from EAL X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Oct 2016 15:17:50 -0000 From: Jan Viktorin Signed-off-by: Jan Viktorin Signed-off-by: Shreyansh Jain Signed-off-by: Hemant Agrawal --- lib/librte_eal/bsdapp/eal/Makefile | 1 + lib/librte_eal/bsdapp/eal/eal.c | 4 +++ lib/librte_eal/bsdapp/eal/eal_soc.c | 46 ++++++++++++++++++++++++++++ lib/librte_eal/common/eal_private.h | 10 +++++++ lib/librte_eal/linuxapp/eal/Makefile | 1 + lib/librte_eal/linuxapp/eal/eal.c | 3 ++ lib/librte_eal/linuxapp/eal/eal_soc.c | 56 +++++++++++++++++++++++++++++++++++ 7 files changed, 121 insertions(+) create mode 100644 lib/librte_eal/bsdapp/eal/eal_soc.c create mode 100644 lib/librte_eal/linuxapp/eal/eal_soc.c diff --git a/lib/librte_eal/bsdapp/eal/Makefile b/lib/librte_eal/bsdapp/eal/Makefile index a15b762..42b3a2b 100644 --- a/lib/librte_eal/bsdapp/eal/Makefile +++ b/lib/librte_eal/bsdapp/eal/Makefile @@ -56,6 +56,7 @@ SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_memory.c SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_hugepage_info.c SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_thread.c SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_pci.c +SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_soc.c SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_debug.c SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_lcore.c SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_timer.c diff --git a/lib/librte_eal/bsdapp/eal/eal.c b/lib/librte_eal/bsdapp/eal/eal.c index 9b93da3..2d62b9d 100644 --- a/lib/librte_eal/bsdapp/eal/eal.c +++ b/lib/librte_eal/bsdapp/eal/eal.c @@ -64,6 +64,7 @@ #include #include #include +#include #include #include #include @@ -564,6 +565,9 @@ rte_eal_init(int argc, char **argv) if (rte_eal_pci_init() < 0) rte_panic("Cannot init PCI\n"); + if (rte_eal_soc_init() < 0) + rte_panic("Cannot init SoC\n"); + eal_check_mem_on_local_socket(); if (eal_plugins_init() < 0) diff --git a/lib/librte_eal/bsdapp/eal/eal_soc.c b/lib/librte_eal/bsdapp/eal/eal_soc.c new file mode 100644 index 0000000..cb297ff --- /dev/null +++ b/lib/librte_eal/bsdapp/eal/eal_soc.c @@ -0,0 +1,46 @@ +/*- + * BSD LICENSE + * + * Copyright(c) 2016 RehiveTech. All rights reserved. + * 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 RehiveTech 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 + +/* Init the SoC EAL subsystem */ +int +rte_eal_soc_init(void) +{ + return 0; +} diff --git a/lib/librte_eal/common/eal_private.h b/lib/librte_eal/common/eal_private.h index 0e8d6f7..d810f9f 100644 --- a/lib/librte_eal/common/eal_private.h +++ b/lib/librte_eal/common/eal_private.h @@ -122,6 +122,16 @@ int rte_eal_pci_init(void); struct rte_soc_driver; struct rte_soc_device; +/** + * Init the SoC infra. + * + * This function is private to EAL. + * + * @return + * 0 on success, negative on error + */ +int rte_eal_soc_init(void); + struct rte_pci_driver; struct rte_pci_device; diff --git a/lib/librte_eal/linuxapp/eal/Makefile b/lib/librte_eal/linuxapp/eal/Makefile index a520477..59e30fa 100644 --- a/lib/librte_eal/linuxapp/eal/Makefile +++ b/lib/librte_eal/linuxapp/eal/Makefile @@ -65,6 +65,7 @@ SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += eal_vfio_mp_sync.c SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += eal_pci.c SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += eal_pci_uio.c SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += eal_pci_vfio.c +SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += eal_soc.c SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += eal_debug.c SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += eal_lcore.c SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += eal_timer.c diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c index 00af21c..098ba02 100644 --- a/lib/librte_eal/linuxapp/eal/eal.c +++ b/lib/librte_eal/linuxapp/eal/eal.c @@ -810,6 +810,9 @@ rte_eal_init(int argc, char **argv) rte_panic("Cannot init VFIO\n"); #endif + if (rte_eal_soc_init() < 0) + rte_panic("Cannot init SoC\n"); + if (rte_eal_memory_init() < 0) rte_panic("Cannot init memory\n"); diff --git a/lib/librte_eal/linuxapp/eal/eal_soc.c b/lib/librte_eal/linuxapp/eal/eal_soc.c new file mode 100644 index 0000000..04848b9 --- /dev/null +++ b/lib/librte_eal/linuxapp/eal/eal_soc.c @@ -0,0 +1,56 @@ +/*- + * BSD LICENSE + * + * Copyright(c) 2016 RehiveTech. All rights reserved. + * 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 RehiveTech 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 + +#include "eal_internal_cfg.h" +#include "eal_filesystem.h" +#include "eal_private.h" + +/* Init the SoC EAL subsystem */ +int +rte_eal_soc_init(void) +{ + return 0; +} -- 2.7.4