Re: [dpdk-dev] [PATCH v1] ethdev: add rte_device to port_id function

2020-04-19 Thread Gaƫtan Rivet
On 17/04/20 13:44 -0700, Stephen Hemminger wrote: > On Fri, 17 Apr 2020 18:48:37 +0200 > Gaetan Rivet wrote: > > > +/** > > + * Find the owned ethdev port id of an `rte_device`. > > + * > > + * @param dev > > + * An `rte_device`. > > + * @param owner > > + * An owner id. Use `RTE_ETH_DEV_NO_O

Re: [dpdk-dev] [PATCH v1] ethdev: add rte_device to port_id function

2020-04-17 Thread Stephen Hemminger
On Fri, 17 Apr 2020 18:48:37 +0200 Gaetan Rivet wrote: > +/** > + * Find the owned ethdev port id of an `rte_device`. > + * > + * @param dev > + * An `rte_device`. > + * @param owner > + * An owner id. Use `RTE_ETH_DEV_NO_OWNER` for ownerless ports. > + * > + * @return > + * The port id of

[dpdk-dev] [PATCH v1] ethdev: add rte_device to port_id function

2020-04-17 Thread Gaetan Rivet
Some EAL facilities are using rte_devices. Once the rte_device of a port is found, some need to transform it into a port id to be able to use the ethdev API. Add a function to transform an rte_device pointer into an ethdev port id, as well as an ownership aware variant. Use this new API in a few