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

Function rte_eth_linkstatus_set

dpdk/lib/ethdev/ethdev_driver.h:1654–1665  ·  view source on GitHub ↗

* @internal * Atomically set the link status for the specific device. * It is for use by DPDK device driver use only. * User applications should not call it * * @param dev * Pointer to struct rte_eth_dev. * @param link * New link status value. * @return * Same convention as eth_link_update operation. * 0 if link up status has changed * -1 if link up status was unchanged */

Source from the content-addressed store, hash-verified

1652 * -1 if link up status was unchanged
1653 */
1654static inline int
1655rte_eth_linkstatus_set(struct rte_eth_dev *dev,
1656 const struct rte_eth_link *new_link)
1657{
1658 struct rte_eth_link old_link;
1659
1660 old_link.val64 = rte_atomic_exchange_explicit(&dev->data->dev_link.val64,
1661 new_link->val64,
1662 rte_memory_order_seq_cst);
1663
1664 return (old_link.link_status == new_link->link_status) ? -1 : 0;
1665}
1666
1667/**
1668 * @internal

Callers 15

atl_dev_stopFunction · 0.85
atl_dev_link_updateFunction · 0.85
eth_igb_stopFunction · 0.85
eth_igb_closeFunction · 0.85
eth_igb_link_updateFunction · 0.85
eth_em_stopFunction · 0.85
eth_em_link_updateFunction · 0.85
enetc_link_updateFunction · 0.85
virtio_dev_stopFunction · 0.85
virtio_dev_link_updateFunction · 0.85
otx_ep_dev_link_updateFunction · 0.85
ipn3ke_rpst_link_updateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected