From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id EB9A91B19 for ; Fri, 21 Sep 2018 15:06:50 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 7574521F50; Fri, 21 Sep 2018 09:06:50 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Fri, 21 Sep 2018 09:06:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=mesmtp; bh=dHIRSivUT8NAgi35l/4V3OzzqB omGL8TKvxdP4PX0IY=; b=eRuMsOWBt1zoEfWWm6CzIEugsXSyJzA8dXFaAxa3nw HvvRWZVAVsQ5o6MRhv2CmvXyxcBV7ZTwdkX036WA+8/PyP7/7z+l5SAv1lePqJ9N Te19bEMXuxi3xu5n4SRhUx/X++4g2l+P5CS96U/ezl6JvR+cFRxKrtUVqSG9hR+x w= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=dHIRSi vUT8NAgi35l/4V3OzzqBomGL8TKvxdP4PX0IY=; b=hkigmhDetQTu10uU15iFCM a6NLF0uYAwGufA5tRcR+iMHIWADRhfKa1iOgQSBDgdc6Wq7WRAigyZ8ukhCRuecP 4iOzWxElgkOVjs2hjY/5KPjoYvN3WM3bdfAxEu/M50G0NChacuGAWzZUkoEu0+Nw Brh8A+pOB6uKCySaVWGlywh4ghqF1RPK6Egjrs5xIxQyI9BY5f0S+VK3KaaqMew7 nAkTJXRjFZjhluMQgYVJteV8d2nOaT5os7xg4Io2MzOYZ1K/oROTU5yyIPAYv58u LlPcFcrKDt4ygLKlWrlmXnT5RXPPMx1L/7hC0FjBbAFO0oZric9SHrxRTBKe7EaA == X-ME-Proxy: X-ME-Sender: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 39318E47C2; Fri, 21 Sep 2018 09:06:49 -0400 (EDT) From: Thomas Monjalon To: =?ISO-8859-1?Q?Ga=EBtan?= Rivet Cc: dev@dpdk.org, arybchenko@solarflare.com Date: Fri, 21 Sep 2018 15:06:48 +0200 Message-ID: <4913069.0xk8QlEqK7@xps> In-Reply-To: <20180921121621.rjo7esvng7gjuri4@bidouze.vm.6wind.com> References: <6077733.FS8kXFb8lC@xps> <20180921121621.rjo7esvng7gjuri4@bidouze.vm.6wind.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" Subject: Re: [dpdk-dev] [PATCH v2 07/13] ethdev: add device matching field name 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, 21 Sep 2018 13:06:51 -0000 21/09/2018 14:16, Ga=EBtan Rivet: > On Thu, Sep 20, 2018 at 06:17:13PM +0200, Thomas Monjalon wrote: > > 19/09/2018 18:03, Gaetan Rivet: > > > The eth device class can now parse a field name, > > > matching the eth_dev name with one passed as > > >=20 > > > "class=3Deth,name=3Dxxxxxx" > >=20 > > I am not sure what is the purpose of the "name" property. > > I think we should not need it to choose a port by its ethdev name. >=20 > rte_eth_dev_get_port_by_name seems pretty close. Exact, this function already exists to get a port id by name. I think we should discourage the use of ethdev "internal" name. The point of the devargs is to match device with explicit known properties. > Which fields do you think should be proposed first as a getter on the eth= class? > Or do you have a list of fields the eth class should be restricted to? In other words, which ethdev properties can help to match a port? I think about "mac=3D" (which is already implemented in OVS devargs), and "representor=3D" (which requires a new field in ethdev). About representors, we could also match all representor ports of a switch (see rte_eth_switch_info). We could also have a property for the kernel netdev we are (or were) bound. Does it make sense? > > If you are thinking about a vdev, we can use the rte_device name (at bu= s level). >=20 > This patch is only about eth class, it has no impact on buses. So we agree :)