From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0056.outbound.protection.outlook.com [104.47.42.56]) by dpdk.org (Postfix) with ESMTP id C25761B642 for ; Fri, 13 Oct 2017 13:55:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=RWA1OBQUFlDI8gb1kjTaZRnDyJzz2LEQiTqgGTv3/h8=; b=SKTwZM2WJp4GaGpTk92vlXavYcMXlCUvAJLKpD7cytFlPgCGgWhquZOb39M46aJPBJeMHzj+n9IKBXFikhhMXxnb9A1SdUH1745Jwsq2GlxIZfXuvOf383ITRDbdfXq7B3G6ekMfdBS2nAofT4vsHGSPnGg1DE6kbZiByvsMS/0= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Santosh.Shukla@cavium.com; Received: from localhost.localdomain (111.93.218.67) by DM5PR07MB3098.namprd07.prod.outlook.com (10.172.85.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Fri, 13 Oct 2017 11:55:39 +0000 From: Santosh Shukla To: dev@dpdk.org Cc: thomas@monjalon.net, jerin.jacob@caviumnetworks.com, maxime.coquelin@redhat.com, Santosh Shukla Date: Fri, 13 Oct 2017 11:55:01 +0000 Message-Id: <20171013115501.1345-1-santosh.shukla@caviumnetworks.com> X-Mailer: git-send-email 2.13.0 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: MWHPR12CA0064.namprd12.prod.outlook.com (10.175.47.154) To DM5PR07MB3098.namprd07.prod.outlook.com (10.172.85.8) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9c4f1442-86ad-4c03-f12d-08d5123153ac X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR:DM5PR07MB3098; X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3098; 3:Dx0xeXBmAoi71/gCjwDiZaScA/INEyULZ+YWAGXgS2q5/ykA0ZzrgeBdVV5yoDkz/klCE0Dzv/zwJbto1bjzC85T9VV/jcG4Kf9WKWkJnR519McPeSN1HktpRvYxNh+Jhly76htaKIakvkOsLqdzzkcxg/AuIHwdxeywBy2NXCgrBBevjiXCOonPetImXTKbJVGobIJlFlwQRcXTc86qPeXNoPmeqfiRcUjdUcWUieL63qsrm9IzRiVAHqMlbeF7; 25:gkwMshG0Yy8ipFK6bolYDUYN9pSFL1+/XnIBIZ7QRQ+Y1E8Rtd4WogCjzkGQRa/Cw8SCt4vVmWBQ3hvnqVeJS/Dwu0DxMsQW4O/wAQgMEYIr1CotLI/zrXD7VWPMgWxZ4u7kbZU9nRa4PtjMNqxfuINHBNe5EdkG+C2k8tvWoj1BvMKQcN0PKNz5KCga39T2G/CNA1E4SFajdBWlgdkOtAJtBkwXwZG/VcNqmi/qEYvAH+KqVl+yFu0sJ5GQApK6BOhZG1Z29IvgNtXV6hgH/WtwAJdLxhuhqtbdJxKVVSslrkAptua3K6pMjGdIk3rqf0gBzLzk6HGYiMvByVv63g==; 31:7IWc004Y6YQbd7Y+xlLQXxWTMLxrlN3iby/97Sa2iOmnW0DYmkuDT2nwjpSStg0hEIcc/jkFkMscUeubNtdCPHD6vf+AYWKkpD747dZLTLMBRutdEc3MNT2uN7rHWFiRBJmNMmUoxAZyxTApU9Az6l5I7CIDoCgJqcHa3GeyfMge96EvtQrXFX797vgcFHVz+GM0eRMMlrcn0BdZZZl4lEmNw/Sn6v9UdP8Aq3c5yUs= X-MS-TrafficTypeDiagnostic: DM5PR07MB3098: X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3098; 20:d/7I2GfKdY/Q3IJBRxprlW0qJtRcsA158hDQFvj1P7eVvoSQcQY+YhDjdpT33Yx0vj5qdGwB7o0FX+UY8Icl8Nm/KJCrwd5lqezrjSv57lATHW7Lcvk86xemqKj3OPg89O94UCEocrAgiCu37Br/uwqGyBMfKqXJb5jHmIia2IgVQzuixemMbIMMYrw/kg+wfjw/dgo9r1+LxJDCNbMQGlkExK+9Ea5JFbaks4pIacX02uEypLrWxrkg7MW+6EesIV9MDAhVEnwVFgOAl8pdbgoWMfgfjXgZkfyJB3Xkg0ElwTdh6YuEXGwlr6gEcq4/+OBoji0xpXW0sOsM1K/e1vPsFYARDPgrEcnnFQVf+ZvWPtduTNLEadtzDrgEEthvju1d6oiJaikfEQU83udE58ulRI+xOfeDnqw+gt8W+rLIGx/M/DKA+JYwtcXw/iTd1210+zYL4A4seUniWSo4rqGgx/6aa07p6iWWX5i8OlYv9xClzDzBFk9w7zLSDNShsYuSjzjQCyBE/+8pCULNKmJ7JL/ZdZEnkaRe9GnBnG/WPxQ/FZtJnnJmQFcC77YH/eNuY4SZxANjTcyM1LBsedzmlX3xSwQSvKhwIvQ7p3k=; 4:z5NxDYh5JObsk9uCiXHJl3WuZvbBBVP4yJnUAQZ0uw8r9NjOBoKWz4kmsu0EoW9i4I1MrvKf9LbY3x554yuAMdOtE1JiLav6SBxIVYzmMSEliFeZpF+zpLj64GyDR7rr80lq1sNIeHpRI0aTypsfcAIHfl7Am7YNuTfgjo3Sjn8+y+yC0SXgxrXjntMuRMvlhxhwbMFo6RxUCBeH8rC1lZXl6qYRlPdL1ilBidg/jYQpo+HdLip4P0+sSzDDVVU6 X-Exchange-Antispam-Report-Test: UriScan:; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(93006095)(10201501046)(100000703101)(100105400095)(3002001)(6041248)(20161123562025)(20161123558100)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123555025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DM5PR07MB3098; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DM5PR07MB3098; X-Forefront-PRVS: 04599F3534 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(979002)(6069001)(6009001)(376002)(346002)(189002)(199003)(107886003)(6916009)(106356001)(6116002)(6512007)(478600001)(1076002)(3846002)(101416001)(5009440100003)(81166006)(2361001)(42882006)(2351001)(105586002)(81156014)(72206003)(4326008)(6666003)(2906002)(68736007)(5660300001)(8936002)(33646002)(189998001)(5003940100001)(50986999)(97736004)(66066001)(47776003)(6486002)(305945005)(36756003)(48376002)(50226002)(50466002)(25786009)(53936002)(8676002)(316002)(16586007)(16526018)(6506006)(7736002)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR07MB3098; H:localhost.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM5PR07MB3098; 23:c5q5W4RcO5dZ94KchDufmukqzqHm7/XKouNFDGB4X?= =?us-ascii?Q?yUykXL4Q9rXIkvgmiR6VvqIMLFOa9Fp0JHvzU1wkJVaiOipH8sTuw9EX5GRn?= =?us-ascii?Q?MzZL01shT8p/8ew922n6ACY+suG3lOjTblhAPjU9MX8sNA1KgkltKNFubfZ0?= =?us-ascii?Q?kYbRgU1jSYhJ+WDvz/2G1oCK9+szam/JSDUZoThb8chmdd2u20oSAkVnoC5/?= =?us-ascii?Q?AtlDFxCxFQjqeRkMGN/q/its91P/5wuqRBOSPN2/i0msHTsVvW58mKrwhX3N?= =?us-ascii?Q?Zr12Byiys2rvL3WhtJLAHzbKKkXzShTX8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-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Oct 2017 11:55:39.0794 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR07MB3098 Subject: [dpdk-dev] [PATCH] eal: call plugin init before device parse 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, 13 Oct 2017 11:55:44 -0000 Default eal_init code calls 0. eal_plugins_init 1. eal_option_device_parse 2. rte_bus_scan IOVA commit:cf408c224 missed on calling eal_plugins_init before eal_option_device_parse, rte_bus_scan and that introduced below regression for shared mode: with CONFIG_RTE_BUILD_SHARED_LIB=y: 'net_vhost0,iface=/tmp/vhost-user2' -d ./install/lib/librte_pmd_vhost.so -- --portmask=1 --disable-hw-vlan -i --rxq=1 --txq=1 --nb-cores=1 --eth-peer=0,52:54:00:11:22:12 EAL: Detected 4 lcore(s) ERROR: failed to parse device "net_vhost0" EAL: Unable to parse device 'net_vhost0,iface=/tmp/vhost-user2' PANIC in main(): Cannot init EAL Fixes: cf408c224 ("eal: auto detect IOVA mode") Reported-by: Maxime Coquelin Signed-off-by: Santosh Shukla --- lib/librte_eal/bsdapp/eal/eal.c | 10 +++++++--- lib/librte_eal/linuxapp/eal/eal.c | 10 +++++++--- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/lib/librte_eal/bsdapp/eal/eal.c b/lib/librte_eal/bsdapp/eal/eal.c index 30d3bd5b5..e981721aa 100644 --- a/lib/librte_eal/bsdapp/eal/eal.c +++ b/lib/librte_eal/bsdapp/eal/eal.c @@ -551,6 +551,13 @@ rte_eal_init(int argc, char **argv) return -1; } + if (eal_plugins_init() < 0) { + rte_eal_init_alert("Cannot init plugins\n"); + rte_errno = EINVAL; + rte_atomic32_clear(&run_once); + return -1; + } + if (eal_option_device_parse()) { rte_errno = ENODEV; rte_atomic32_clear(&run_once); @@ -635,9 +642,6 @@ rte_eal_init(int argc, char **argv) eal_check_mem_on_local_socket(); - if (eal_plugins_init() < 0) - rte_eal_init_alert("Cannot init plugins\n"); - eal_thread_init_master(rte_config.master_lcore); ret = eal_thread_dump_affinity(cpuset, RTE_CPU_AFFINITY_STR_LEN); diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c index ec37c52c0..ad7278989 100644 --- a/lib/librte_eal/linuxapp/eal/eal.c +++ b/lib/librte_eal/linuxapp/eal/eal.c @@ -786,6 +786,13 @@ rte_eal_init(int argc, char **argv) return -1; } + if (eal_plugins_init() < 0) { + rte_eal_init_alert("Cannot init plugins\n"); + rte_errno = EINVAL; + rte_atomic32_clear(&run_once); + return -1; + } + if (eal_option_device_parse()) { rte_errno = ENODEV; rte_atomic32_clear(&run_once); @@ -882,9 +889,6 @@ rte_eal_init(int argc, char **argv) eal_check_mem_on_local_socket(); - if (eal_plugins_init() < 0) - rte_eal_init_alert("Cannot init plugins\n"); - eal_thread_init_master(rte_config.master_lcore); ret = eal_thread_dump_affinity(cpuset, RTE_CPU_AFFINITY_STR_LEN); -- 2.13.0