From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0046.outbound.protection.outlook.com [104.47.32.46]) by dpdk.org (Postfix) with ESMTP id 72FDA1B33C for ; Fri, 22 Dec 2017 07:47:11 +0100 (CET) Received: from BN6PR03CA0051.namprd03.prod.outlook.com (10.173.137.13) by CO2PR03MB2360.namprd03.prod.outlook.com (10.166.93.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.345.14; Fri, 22 Dec 2017 06:47:09 +0000 Received: from BY2FFO11FD036.protection.gbl (2a01:111:f400:7c0c::135) by BN6PR03CA0051.outlook.office365.com (2603:10b6:404:4c::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.345.14 via Frontend Transport; Fri, 22 Dec 2017 06:47:08 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; monjalon.net; dkim=none (message not signed) header.d=none;monjalon.net; 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 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.20.302.6 via Frontend Transport; Fri, 22 Dec 2017 06:46:54 +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 vBM6l4MX019437; Thu, 21 Dec 2017 23:47:05 -0700 To: Thomas Monjalon , CC: Yuanhan Liu , Adrien Mazarguil , Ciara Loftus , Kevin Traynor , , References: <1512027330-30030-1-git-send-email-yliu@fridaylinux.org> <1743809.pZtjZi6UOT@xps> <7044959.u7szEIarlR@xps> From: Shreyansh Jain Message-ID: <023a90af-bfcd-328d-4ed9-783ee76203fd@nxp.com> Date: Fri, 22 Dec 2017 12:31:03 +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: <7044959.u7szEIarlR@xps> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-Matching-Connectors: 131583988143827234; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(7966004)(336005)(396003)(346002)(39860400002)(39380400002)(376002)(2980300002)(1110001)(1109001)(339900001)(189003)(199004)(24454002)(356003)(67846002)(5660300001)(7116003)(8936002)(68736007)(77096006)(305945005)(3480700004)(86362001)(106466001)(53936002)(2950100002)(85426001)(36756003)(83506002)(31696002)(105606002)(97736004)(65826007)(65806001)(54906003)(65956001)(110136005)(316002)(58126008)(64126003)(2906002)(230700001)(31686004)(6306002)(498600001)(229853002)(23676004)(2486003)(4326008)(76176011)(104016004)(6246003)(50466002)(47776003)(966005)(81156014)(8676002)(81166006); DIR:OUT; SFP:1101; SCL:1; SRVR:CO2PR03MB2360; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD036; 1:WAWGjRinQlHe4a0Jg7gjqNXLlZPaaR7R8NfO0cpml7GnuGDu3ux40PupK+o15FEHNhRu05lh/Gl/GA9q1hTgyv48ywPRa2v1IO2EqFGnvT4Exa+oipOur8Gr+8jsNByW X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b7419a2c-acd9-416d-2922-08d54907c9e8 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4628075)(201703131517081)(5600026)(4604075)(2017052603307); SRVR:CO2PR03MB2360; X-Microsoft-Exchange-Diagnostics: 1; CO2PR03MB2360; 3:rdLKKGhQYErf4Qm00rKWNked3zfTRiFWdNHpwLP9oVP1WS1pVPmmNl7ENdLn5tenSDa8lU5+ZUoYDw7bNyVyczle1+heBxOVLWFjiSk1MmCryoTc3axkJ+ggGF15NtYva9Ki8bh4QhSOyfEcYbivJJF0KtnyNyWCzRvIVoNwfvcAK6t6W0Ka/FsL8Rwd4SWeMPwcxNj57uHifvaQnDymVvNnwhVGFcr+VUr16KjqZ2iS2DMrJA34+JSviLrTvJzJmynx+uOVV2dcRRjTruj22XA39xm3aINBRalEqpq1tXngt3lGtqPcl+IRRPQiteYcOCR/tPcjwPmNzYkN1fiQnz6UsIASKAkksgsVSO3O0AM=; 25:R/AtbuPqA8unotblMWOZ4KKzljAxtzjhbDkTw8e+w60ZKwG9i9zDadL2sZWXiNjorR9ktPMPGG2y4K0BxfhF4/abhuvq5uKeOAiQ0Z0KhcnWqEhVkek7bfLt4IR+CVZpBlvql7xrL34KHCtfhXAqgzDoFwhhH692tglqbnuAucvt62tQLIXWEYkdqrM7y0Puc6L/y4YjLZqEBGCQxkj3YT4dFo7IuM6kLzhX3R9XklrLwqLCm95xx9N2Xc0XWY4/e3MyWJouam4xWsdKC7UmSLhq7vRccLTrMwkZoDoOGNwv/JjJkjn8zFkhQPHEZ59NLCPvHuA7AIVDHCV7M1IJug== X-MS-TrafficTypeDiagnostic: CO2PR03MB2360: X-Microsoft-Exchange-Diagnostics: 1; CO2PR03MB2360; 31:B+W+aZfl3Q9wk2ERCvmbjG+ekLYeIMvOOXbAupP5Ma0pae5b4qzRz2/RYtBScsikAClQLOg1pgcyM4kcHwZKjTh/6RXP0tJd97VAr4e2/hse14HSdOCCapSXKiRB8bpMXEWGOgnZ7wf8+WEjj+/w7muoHrZTa3yCCz1rfbkSLBYz9vmo40I2bmoz7UW5kILnksgZMSIV08Qi8ttNBtmDtCaPjuAbG12q802tPIDnNNE=; 4:/juxUXGycBOJFZXgmfH29g4BXI1EA9oKhxWY1w3wHcSFTJ2+WIGnIbyofqtPgC99G8nEI3Hq9H6BO8yOzzCS5VG9e1spEFn9EM+vJc56LZEmzINlZfSd6NWNmdbC5Xtazm+VOz97NlXu4CvIlwqDYWlyR03arnOrydLNSWsdmhTAAVdPe0Mpr/eC1olhSrL6POsSPg9yt0w08Icxc/gFY5MiXgn0D22gKkI6xt7SEx6DAOswY1vkq0zpgTwVLvwqPqACo0KjOkYHvgZiXWrZy1BhvKLp1KIDm1su3ceSOEpodsxPvQcMQmSe+bBT1LIKTwF9O4cO1DZ0h0LUno/ckMGHXNp8jaoOrPo1KIqlWmM= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(216315784871565)(17755550239193); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(2401047)(8121501046)(5005006)(3002001)(93006095)(93001095)(10201501046)(3231023)(6055026)(6096035)(20161123559100)(20161123556025)(201703131430075)(201703131433075)(201703131441075)(201703131448075)(201703161259150)(20161123565025)(20161123563025)(20161123561025)(201708071742011); SRVR:CO2PR03MB2360; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:CO2PR03MB2360; X-Forefront-PRVS: 05299D545B X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtDTzJQUjAzTUIyMzYwOzIzOk8rZnpBZHAyUFVVbE9JVXdtNUFNTW1QZ3gr?= =?utf-8?B?eU55QlBMa2ovSjNpS0RPbUR3cU1hUHZBR1RJMmFWOE5Ldk5xTFU4SktoOVhr?= =?utf-8?B?amhoUDRvVmhOME5vTmdzZnREQ2xkeWhHQ2pwcjB0MWUweHhoL2RLekR0V0kx?= =?utf-8?B?QmtWcUtHV2QrU1RzbU1oN3IzUkZiZU1qcHkvOG8rVG9ER0w1ZVdaMVI0SWNj?= =?utf-8?B?U2VlRWFzbkhaYnpSaGh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2u6oPpY3T/oamjlQmunSVhjPIabu7L6+Cv5XyQnTKTUAiZdp/B080j/ePgwSJiWyTb7rq2VH5rerVbWBfGfnKp3mR97KPKE91QthEI6ooGK6aDH1xxIUyqUV24A9ICcmsMgwMD/2IDv/HEt0CXafMSdVBc3eUZHsV1Bs=; 5:iVudInhXSnPJQ1KVL0jfpJjyPDCxngbfogXlkDoGy3hnXlxIjchG0EsjbetURcYi6qtPpUvNPwjs/jV5fIcy8GfBmYFCNmykNvG5Wp/josN5+yRUxogVlBMVWhf5Q0NNMDvX0u4dvQHM6IEq2M8COxt/BOsl1/4xb8172Ff2aAI=; 24:wMqIw6Wx1MaUEp+6nOiLBL8QqcI7wsaZCG37/CJP4Wy/qwvWgVOuV5AQ22s1NspZ0KgxJxx22HAtzZjXvjZsm9gIsITpn3pr4Muf+jyujis=; 7:wkWHNj0Ljv9kAVjLDvp4MQKvnKhv98ezvZ/8PeQg5Gzcpa3+0rYhlky21vPhzVcUW5Zf3vlMOQKDz4/nRF7IVy3tx/rkzv5W39A1HTTNVKG8TN5IkVjh2JPkHSod3Aj7mRHlB07gigj3hrJ/ckU//V6Ev+F6UB7ZU8sPP1voKZ5/cH6pc9TMbKrGHDZz/fpyw4pyR/UQm0x+3Sz7OtvWlGMky4tXAm7YNxf8Sy8WhwlyryfQIW8ji+xXwoX0OAbX SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Dec 2017 06:46:54.1487 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b7419a2c-acd9-416d-2922-08d54907c9e8 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: CO2PR03MB2360 Subject: Re: [dpdk-dev] standardize device identification 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, 22 Dec 2017 06:47:12 -0000 On Thursday 21 December 2017 03:32 AM, Thomas Monjalon wrote: > Changing the title and adding more comments inline: > > 19/12/2017 00:05, Thomas Monjalon: >> Let's summarize and resume this thread. >> >> We need a generic syntax to describe a device. >> This syntax can be used >> - before initializing the device (i.e. whitelist/blacklist) >> - or after the initialization (e.g. user config) >> >> We need to answer 4 questions: >> 1/ what are the separators (comma, colon, etc)? >> 2/ how to distinguish a device identification from a configuration? >> 3/ what are the mandatory parts? >> 4/ what can be the optional properties? >> >> 30/11/2017 08:35, Yuanhan Liu: >>> What this patch proposes is to use "name[,mac]" syntax. "name" is the >>> PCI id for pci device. For vdev, it's the vdev name given by user. The >>> reason "mac" is needed is for some devices (say ConnectX-3), 2 ports >>> (in a single NIC) have the same PCI id. >> >> Based on the feedbacks we had, I suggest a syntax where everything is >> optional key/value pairs, and split in 3 categories: >> - bus (pci, vdev, vmbus, fslmc, etc) >> - class (eth, crypto) >> - driver (i40e, mlx5, virtio, etc) > > The key/value pair describing the category scope is mandatory > and must be the first pair in the category properties. > Example: bus=pci, must be placed before id=0000:01:00.0 > >> Between categories, the separator is a slash. Why is a '/' required as a separator? Are you expecting the key in key,value pair to duplicate across categories? >> Inside a category, the separator is a comma. >> Inside a key/value pair, the separator is an equal sign. sounds reasonable to me. >> >> It may look like this: >> bus=BUS_NAME,id=BUS_ID/class=CLASS_NAME,dev_port=PORT_NUM,mac=MAC_ADDRESS/driver=DRIVER_NAME,driverspecificproperty=VALUE If I take cue from fslmc and dpaa bus: for fslmc: bus=fslmc,id=dpni.1 bus=fslmc,id=dpsec.1 for dpaa: bus=dpaa,id=fm1-mac1 bus=dpaa,id=dpaa-sec1 So, at least from fslmc/dpaa perspective, above fits. Just want to highlight: in some cases the device names can contain ',' - but then, that can be handled at bus scan level. For dpaa bus, the device identified from platform identifiers contains a longer ',' separated string - which is then stripped to form a name like 'fm1-mac1' before being added to device->name. >> >> A device is identified when every properties are matched. So, a ovs-dpdk user would have to know a dpdk bus to identify a device to plug into a OVS bridge? >> Before device is probed, only the bus category is relevant. >> For the simple PCI whitelist, it means moving from >> -w 0000:01:00.0 >> to >> -w bus=pci,id=0000:01:00.0 OK >> >> It is possible to mix some settings in these devargs syntax if the keys >> are differents. Example: mac= is for identification by MAC, whereas >> newmac= would be for specifying a MAC address to set. >> >> Agreement? in principle, yes. just need clarity on '/' as a separator. > > Yuanhan is proposing to use this syntax in OVS option dpdk-devargs: > https://mail.openvswitch.org/pipermail/ovs-dev/2017-December/342273.html > > Please, any feedback or approval that this syntax is good? >