From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0061.outbound.protection.outlook.com [104.47.36.61]) by dpdk.org (Postfix) with ESMTP id 4EAFE2030 for ; Wed, 13 Dec 2017 15:13:12 +0100 (CET) Received: from CY4PR03CA0108.namprd03.prod.outlook.com (2603:10b6:910:4d::49) by SN2PR03MB2365.namprd03.prod.outlook.com (2603:10b6:804:e::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.302.9; Wed, 13 Dec 2017 14:13:10 +0000 Received: from BN1AFFO11FD030.protection.gbl (2a01:111:f400:7c10::181) by CY4PR03CA0108.outlook.office365.com (2603:10b6:910:4d::49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.302.9 via Frontend Transport; Wed, 13 Dec 2017 14:13:09 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; 6wind.com; dkim=none (message not signed) header.d=none;6wind.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 BN1AFFO11FD030.mail.protection.outlook.com (10.58.52.168) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.282.5 via Frontend Transport; Wed, 13 Dec 2017 14:13:02 +0000 Received: from [10.232.14.39] ([10.232.14.39]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id vBDED6vU004953; Wed, 13 Dec 2017 07:13:07 -0700 To: Gaetan Rivet References: CC: From: Shreyansh Jain Message-ID: Date: Wed, 13 Dec 2017 19:56:42 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-Matching-Connectors: 131576479825657038; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(336005)(7966004)(346002)(376002)(39860400002)(39380400002)(2980300002)(1109001)(1110001)(339900001)(199004)(189003)(24454002)(81166006)(81156014)(229853002)(8676002)(50466002)(316002)(65826007)(4326008)(85426001)(58126008)(64126003)(97736004)(104016004)(498600001)(68736007)(5660300001)(86362001)(105606002)(77096006)(106466001)(23676004)(31696002)(2486003)(65806001)(2906002)(31686004)(36756003)(6246003)(356003)(47776003)(305945005)(67846002)(76176011)(230700001)(6916009)(8936002)(2950100002)(53936002)(83506002)(6666003)(65956001)(41533002); DIR:OUT; SFP:1101; SCL:1; SRVR:SN2PR03MB2365; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD030; 1:jXFd6eyyVMqbMROWW1Bv+XrgltLp5wBz1sjFGxoF8SgiEueoQM/uyIhzoEJcaJFmfQrfZcNCEtSUewGBAeGqqIL7AOSeSad549K+0rwYCPd5QsH9lQQFDLgdyCw5OPnU X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2e5bab0e-f350-420f-fcce-08d542339f44 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(5600026)(4604075)(4534020)(4628075)(201703131517081)(2017052603307); SRVR:SN2PR03MB2365; X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB2365; 3:3dLYMCf/BQDn5m1Zg8DAWwRNYeIFp5WgI/iQbdxvjTkS8cWy2Zrpkg7TeCwImJnRaAIMA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++7mYLlkpFxnqb+jztLugf3Vugqb+3R9p69eouCDZUkCi0UEm1xjfQIyr0szc+sSL1i0E6FZ/JRisk1PtSPCMg6T+IpI4JBYqep3ASxdawVQrn6BWxLQlySZZBSOg9G4RlewXQMi+a8qcN1kABXhAzMM5ATUg== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(2401047)(5005006)(8121501046)(3231023)(93006095)(93001095)(10201501046)(3002001)(6055026)(6096035)(201703131430075)(201703131433075)(201703131441075)(201703131448075)(201703161259150)(20161123563025)(20161123556025)(20161123561025)(20161123565025)(20161123559100)(201708071742011); SRVR:SN2PR03MB2365; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:SN2PR03MB2365; X-Forefront-PRVS: 052017CAF1 X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtTTjJQUjAzTUIyMzY1OzIzOk90bVBUK1dZTWV5aTZ3bGRwT1AzM2NMaFNv?= =?utf-8?B?VlQ0QXNBYzYyNjJMZFJXSWhCMjlnK0NudTJ2YWY2N3RsaG1Fd2J0UVFBYUpa?= =?utf-8?B?S1ZVTEVMbHlGRkkwOVd4UjBXWkVNVmVFeG4rTjBNM1lDemhNSVhkM0FkT1F4?= =?utf-8?B?TDkxd0VvVDZTRmsvRTJVWGtrVXVROE5hRTNjZS85YVhBcWV0c29xTGZOTXlv?= =?utf-8?B?NmdvdE84QUZGMDBCRGQ1b0dOWXFKcllpYThTZ2VDOGVoUVc5OFl3ekxRbWpl?= =?utf-8?B?UEtpMzNsSXY0elFmSDJRa3M4bzk0cE9YWERpenZFdGtOWnp5V25XN1V5QmpM?= =?utf-8?B?bkpWY1BYSVJtN1VPOFN3RzBLRW1IOFZWdnVMQVdDTzkwUkFraitHK0pqNGNw?= =?utf-8?B?bGt1UlArOVZHVGRSdzh4QlFmK2hvbmpRenhjTlpFVXQ5MEljSTdwKzA5L3hj?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GX1giPaE4Tft93iAF0=; 24:DNGC3x0fi0v5mQ6Iu/C8zXML9ktKEojcL4pgmbuIHnavBGdGCkuiOAeK6E7g2UqJnrtMamSRnJcuKKR2so+6IhNyUKRuBbhMoZPW4mE+NU0=; 7:mYUMvobdTtqTnD4M2b902n1skPDC/i3M8J6cCVC4ykxQEWbHJHn43JuYEsO5Wba/7XkVmUWNJFjmb03cKJb/1YbOqksYYKyThwBq09Y1YZ2h+cPho6vubOwZZDUg60k70Oln/Ra0k15T4UuyenoTeMabpYuLv4ykl+GZSqnMxvMZLiwxm/ZdYpyJIR2IgzQZWsgXHg2cozBx1V0rNPr2hOO1ZhdbS1Lyy7O+KjxUo77lZ3gK8h223QHpOoanryjc SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Dec 2017 14:13:02.3941 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2e5bab0e-f350-420f-fcce-08d542339f44 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: SN2PR03MB2365 Subject: Re: [dpdk-dev] [PATCH v2 12/18] eal: add generic device declaration parameter 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, 13 Dec 2017 14:13:12 -0000 On Thursday 12 October 2017 01:51 PM, Gaetan Rivet wrote: > Add a new generic device declaration parameter: > > --dev= > [...] > > diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c > index 603df27..b7591fd 100644 > --- a/lib/librte_eal/common/eal_common_options.c > +++ b/lib/librte_eal/common/eal_common_options.c > @@ -95,6 +95,7 @@ eal_long_options[] = { > {OPT_PROC_TYPE, 1, NULL, OPT_PROC_TYPE_NUM }, > {OPT_SOCKET_MEM, 1, NULL, OPT_SOCKET_MEM_NUM }, > {OPT_SYSLOG, 1, NULL, OPT_SYSLOG_NUM }, > + {OPT_DEV, 1, NULL, OPT_DEV_NUM }, > {OPT_VDEV, 1, NULL, OPT_VDEV_NUM }, > {OPT_VFIO_INTR, 1, NULL, OPT_VFIO_INTR_NUM }, > {OPT_VMWARE_TSC_MAP, 0, NULL, OPT_VMWARE_TSC_MAP_NUM }, > @@ -1120,6 +1121,21 @@ eal_parse_common_option(int opt, const char *optarg, > } > break; > > + case OPT_DEV_NUM: { > + struct rte_devargs da; > + int ret; > + > + if (rte_eal_devargs_parse(&da, optarg) < 0) > + return -1; > + ret = rte_bus_probe_mode_set(da.bus->name, > + RTE_BUS_PROBE_WHITELIST); > + if (ret < 0 && ret != -ENOTSUP) > + return -1; > + if (eal_option_device_add(NULL, optarg) < 0) > + return -1; > + } Might be a naive question: Any specific reason why we don't add the devices directly into devargs_list here (eal_parse_args -> eal_parse_common_option -> OPT_DEV ->) rather than wait for eal to call eal_option_device_parse again? Is it to allow eal_plugins_init() to finish? > + break; > + > case OPT_VDEV_NUM: > if (eal_option_device_add("vdev", optarg) < 0) > return -1; [...]