From: Robin Zhang Date: Sun, 27 Sep 2020 07:26:19 +0000 (+0000) Subject: net/iavf: use link status helper functions X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=56addb5a23139a46e2c7fd0c8e68f56230cd5a6c;p=dpdk.git 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 Acked-by: Qi Zhang --- diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c index d451762fc0..ec19abb01f 100644 --- a/drivers/net/iavf/iavf_ethdev.c +++ b/drivers/net/iavf/iavf_ethdev.c @@ -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