21/09/2018 14:16, Gaëtan 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
> > > 
> > >    "class=eth,name=xxxxxx"
> > 
> > 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.
> 
> 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=" (which is already implemented in OVS devargs),
and "representor=" (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 bus 
> > level).
> 
> This patch is only about eth class, it has no impact on buses.

So we agree :)


Reply via email to