MCPcopy Create free account
hub / github.com/F-Stack/f-stack / rte_eth_dev_owner_set

Function rte_eth_dev_owner_set

dpdk/lib/ethdev/rte_ethdev.c:519–537  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

517}
518
519int
520rte_eth_dev_owner_set(const uint16_t port_id,
521 const struct rte_eth_dev_owner *owner)
522{
523 int ret;
524
525 rte_spinlock_lock(rte_mcfg_ethdev_get_lock());
526
527 if (eth_dev_shared_data_prepare() != NULL)
528 ret = eth_dev_owner_set(port_id, RTE_ETH_DEV_NO_OWNER, owner);
529 else
530 ret = -ENOMEM;
531
532 rte_spinlock_unlock(rte_mcfg_ethdev_get_lock());
533
534 rte_ethdev_trace_owner_set(port_id, owner, ret);
535
536 return ret;
537}
538
539int
540rte_eth_dev_owner_unset(const uint16_t port_id, const uint64_t owner_id)

Callers 3

fs_bus_initFunction · 0.85
hn_vf_attachFunction · 0.85

Calls 5

rte_mcfg_ethdev_get_lockFunction · 0.85
eth_dev_owner_setFunction · 0.85
rte_spinlock_lockFunction · 0.50
rte_spinlock_unlockFunction · 0.50

Tested by

no test coverage detected