From 56addb5a23139a46e2c7fd0c8e68f56230cd5a6c Mon Sep 17 00:00:00 2001 From: Robin Zhang Date: Sun, 27 Sep 2020 07:26:19 +0000 Subject: [PATCH] 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 --- drivers/net/iavf/iavf_ethdev.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) 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 -- 2.20.1