Port Ownership
~~~~~~~~~~~~~~
+
The Ethernet devices ports can be owned by a single DPDK entity (application, library, PMD, process, etc).
The ownership mechanism is controlled by ethdev APIs and allows to set/remove/get a port owner by DPDK entities.
-Allowing this should prevent any multiple management of Ethernet port by different entities.
+It prevents Ethernet ports to be managed by different entities.
.. note::
It is the DPDK entity responsibility to set the port owner before using it and to manage the port usage synchronization between different threads or processes.
+It is recommended to set port ownership early,
+like during the probing notification ``RTE_ETH_EVENT_NEW``.
+
Device Configuration
~~~~~~~~~~~~~~~~~~~~
port_id = rte_eth_find_next_sibling(port_id + 1, ref_port_id))
/**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice.
- *
* Get a new unique owner identifier.
* An owner identifier is used to owns Ethernet devices by only one DPDK entity
* to avoid multiple management of device by different entities.
* @return
* Negative errno value on error, 0 on success.
*/
-__rte_experimental
int rte_eth_dev_owner_new(uint64_t *owner_id);
/**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice.
- *
* Set an Ethernet device owner.
*
* @param port_id
* @return
* Negative errno value on error, 0 on success.
*/
-__rte_experimental
int rte_eth_dev_owner_set(const uint16_t port_id,
const struct rte_eth_dev_owner *owner);
/**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice.
- *
* Unset Ethernet device owner to make the device ownerless.
*
* @param port_id
* @return
* 0 on success, negative errno value on error.
*/
-__rte_experimental
int rte_eth_dev_owner_unset(const uint16_t port_id,
const uint64_t owner_id);
/**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice.
- *
* Remove owner from all Ethernet devices owned by a specific owner.
*
* @param owner_id
* @return
* 0 on success, negative errno value on error.
*/
-__rte_experimental
int rte_eth_dev_owner_delete(const uint64_t owner_id);
/**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice.
- *
* Get the owner of an Ethernet device.
*
* @param port_id
* @return
* 0 on success, negative errno value on error..
*/
-__rte_experimental
int rte_eth_dev_owner_get(const uint16_t port_id,
struct rte_eth_dev_owner *owner);
rte_eth_dev_logtype;
rte_eth_dev_mac_addr_add;
rte_eth_dev_mac_addr_remove;
+ rte_eth_dev_owner_delete;
+ rte_eth_dev_owner_get;
+ rte_eth_dev_owner_new;
+ rte_eth_dev_owner_set;
+ rte_eth_dev_owner_unset;
rte_eth_dev_pool_ops_supported;
rte_eth_dev_priority_flow_ctrl_set;
rte_eth_dev_reset;
rte_mtr_stats_read;
rte_mtr_stats_update;
- # added in 18.02
- rte_eth_dev_owner_delete;
- rte_eth_dev_owner_get;
- rte_eth_dev_owner_new;
- rte_eth_dev_owner_set;
- rte_eth_dev_owner_unset;
-
# added in 18.05
rte_eth_dev_get_module_eeprom;
rte_eth_dev_get_module_info;