From patchwork Sun Sep 27 07:26:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Zhang X-Patchwork-Id: 78904 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 94108A04BC; Sun, 27 Sep 2020 09:47:23 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C8E2B1D6A1; Sun, 27 Sep 2020 09:47:21 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id B38241D5D4 for ; Sun, 27 Sep 2020 09:47:20 +0200 (CEST) IronPort-SDR: m/Nn3BhRB0nDQSXkXNmIbj1Z7FqWMVV8+VYoCGp7alx1EF41p7diTwPfffEXIdSTPQYH3rNWxz pdd4E28NYGAg== X-IronPort-AV: E=McAfee;i="6000,8403,9756"; a="223438294" X-IronPort-AV: E=Sophos;i="5.77,309,1596524400"; d="scan'208";a="223438294" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Sep 2020 00:47:17 -0700 IronPort-SDR: pksgT3cvF6Bt7D8aoDnOxGTCLu4ov1q6BGv/ylG039Mu/PYjblo6AvuLgo9wz3rRfO/vCkEqgr kjM4+H9hzeHw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,309,1596524400"; d="scan'208";a="323939317" Received: from intel-npg-odc-srv03.cd.intel.com ([10.240.178.138]) by orsmga002.jf.intel.com with ESMTP; 27 Sep 2020 00:47:15 -0700 From: Robin Zhang To: dev@dpdk.org Cc: beilei.xing@intel.com, jingjing.wu@intel.com, qiming.yang@intel.com, stevex.yang@intel.com, Robin Zhang Date: Sun, 27 Sep 2020 07:26:19 +0000 Message-Id: <20200927072626.28374-2-robinx.zhang@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200927072626.28374-1-robinx.zhang@intel.com> References: <20200927072626.28374-1-robinx.zhang@intel.com> Subject: [dpdk-dev] [PATCH 1/8] net/iavf: use link status helper functions X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Use new rte_eth_linkstatus_get/set helper functions to handle link status update. Signed-off-by: Robin 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 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