From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v2 07/13] ethdev: add device matching field name Date: Fri, 21 Sep 2018 15:06:48 +0200 Message-ID: <4913069.0xk8QlEqK7@xps> References: <6077733.FS8kXFb8lC@xps> <20180921121621.rjo7esvng7gjuri4@bidouze.vm.6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Cc: dev@dpdk.org, arybchenko@solarflare.com To: =?ISO-8859-1?Q?Ga=EBtan?= Rivet 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) In-Reply-To: <20180921121621.rjo7esvng7gjuri4@bidouze.vm.6wind.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 :)