[1/8] net/iavf: use link status helper functions
diff mbox series

Message ID 20200927072626.28374-2-robinx.zhang@intel.com
State Accepted
Delegated to: Qi Zhang
Headers show
Series
  • feature porting from i40evf to iavf
Related show

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Robin Zhang Sept. 27, 2020, 7:26 a.m. UTC
Use new rte_eth_linkstatus_get/set helper functions to handle link
status update.

Signed-off-by: Robin Zhang <robinx.zhang@intel.com>
---
 drivers/net/iavf/iavf_ethdev.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

Patch
diff mbox series

diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 440da7d76..95c71e16f 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