net/iavf: use link status helper functions
Use new rte_eth_linkstatus_get/set helper functions to handle link status update. Signed-off-by: Robin Zhang <robinx.zhang@intel.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com>
This commit is contained in:
parent
c02ea7410e
commit
56addb5a23
@ -665,12 +665,7 @@ iavf_dev_link_update(struct rte_eth_dev *dev,
|
||||
new_link.link_autoneg = !(dev->data->dev_conf.link_speeds &
|
||||
ETH_LINK_SPEED_FIXED);
|
||||
|
||||
if (rte_atomic64_cmpset((uint64_t *)&dev->data->dev_link,
|
||||
*(uint64_t *)&dev->data->dev_link,
|
||||
*(uint64_t *)&new_link) == 0)
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
return rte_eth_linkstatus_set(dev, &new_link);
|
||||
}
|
||||
|
||||
static int
|
||||
|
Loading…
Reference in New Issue
Block a user