* @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 */
| 1652 | * -1 if link up status was unchanged |
| 1653 | */ |
| 1654 | static inline int |
| 1655 | rte_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 |
no outgoing calls
no test coverage detected