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:
Robin Zhang 2020-09-27 07:26:19 +00:00 committed by Ferruh Yigit
parent c02ea7410e
commit 56addb5a23

View File

@ -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