[dpdk-dev] [PATCH v1] ethdev: add rte_device to port_id function
Stephen Hemminger
stephen at networkplumber.org
Fri Apr 17 22:44:35 CEST 2020
On Fri, 17 Apr 2020 18:48:37 +0200
Gaetan Rivet <grive at u256.net> 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 an `rte_device` if it is owned by `owner`.
> + * `RTE_MAX_ETHPORTS` otherwise.
> + */
> +__rte_experimental
> +uint16_t rte_eth_port_from_dev_owned_by(const struct rte_device *dev,
> + const uint64_t owner);
> +
Ok, but why introduce API with no users?
Also a device could in theory be owned multiple times by the same owner.
For example if two NIC's from same vendor were used in bonding.
More information about the dev
mailing list