From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f194.google.com (mail-pf0-f194.google.com [209.85.192.194]) by dpdk.org (Postfix) with ESMTP id 1838C1B373 for ; Tue, 16 Jan 2018 19:38:18 +0100 (CET) Received: by mail-pf0-f194.google.com with SMTP id b25so3864606pfd.9 for ; Tue, 16 Jan 2018 10:38:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ziT2Wi2vOHuUley9mOK6tG5qTtxwnz8EpWKsOGWV0pw=; b=JqgjbT04tqTUDW8QaZsD4CbD4cMhJ/Kbe+Y4zr/drvV6v4HsDNpLypHXo9zC0yQTP1 kNBbKTv+MZHQnE4u8NfLJMjKIT+Zq2dZXIMnG5ICB+5ibYpdF/+d+btunZvGZFldSWvD xEp+z44LrsvKMvWdZbHzMmXDMQxThC8BoTyXwNyPk9kmfAtktL3P8YBUel9K4bbQA+vx 91n5NbruLZIFmRkZuSojKteOpjZaTLB+itu/Bp5/IM53wZuZ9HPYR9+JoDnjfnhpEUEF YyDHV7J3gn+Sy3ZY5yHHSXpgQrG349r3dNQ4HPp21avHKyHJVKrf5/02GjMzigzFrhLn QoYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ziT2Wi2vOHuUley9mOK6tG5qTtxwnz8EpWKsOGWV0pw=; b=szLuXdpLShKggFuzku7q30T7+BaoN2g3/8GkYkTP1WcjeCkaiuGJrrZgFYbiZBirwA mZadxo4V2Ijzf5woMveArpVgOJknKi9lbQeuJadtD7CV9AUTX2DNygP2pIWaaChLaxRd yhEpyX43VDOi892Qavtbep5SQrKNsgbSQfCeTTZIitrydn83aX3aMctwtwNOn6n1yj6g ejAawukjml5Nf0cUY74kEGYGnHWgsRn3++lQYRPdZYXS8mRzICGaSuziz57QZlgOPq1e gdOcSTHl5+hlGpF2cGGQCis0XR7S/D4VnbE5ux0k3eU5Xovg88lAHjoK1D7+4PH0tNZ/ uU7g== X-Gm-Message-State: AKGB3mIfcWF9L7ZkveMrA2hlDEs/TxjqppFCIktS+fQ0/4+FJcHC4t55 E16FI1dUIVTeiWnFtI/DPCawgxu6B7c= X-Google-Smtp-Source: ACJfBosb1MdpAEORwFLskbOYq4xMk3M3x6abGYVdCeNUWDzUSFVctIBy4evgsNVK1hxfbt2O0h10nw== X-Received: by 10.98.201.26 with SMTP id k26mr35912277pfg.103.1516127897842; Tue, 16 Jan 2018 10:38:17 -0800 (PST) Received: from xeon-e3.lan (204-195-18-133.wavecable.com. [204.195.18.133]) by smtp.gmail.com with ESMTPSA id 77sm4560351pfc.187.2018.01.16.10.38.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jan 2018 10:38:16 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Tue, 16 Jan 2018 10:37:52 -0800 Message-Id: <20180116183755.24542-13-stephen@networkplumber.org> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180116183755.24542-1-stephen@networkplumber.org> References: <20180116183755.24542-1-stephen@networkplumber.org> Subject: [dpdk-dev] [PATCH v5 12/15] net/thunderx: use rte_eth_linkstatus_set 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: , X-List-Received-Date: Tue, 16 Jan 2018 18:38:19 -0000 Use new helper function. Signed-off-by: Stephen Hemminger --- drivers/net/thunderx/nicvf_ethdev.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c index 72dc8ae24ba9..94a2a9b7683d 100644 --- a/drivers/net/thunderx/nicvf_ethdev.c +++ b/drivers/net/thunderx/nicvf_ethdev.c @@ -15,7 +15,6 @@ #include #include -#include #include #include #include @@ -48,19 +47,6 @@ static void nicvf_dev_stop_cleanup(struct rte_eth_dev *dev, bool cleanup); static void nicvf_vf_stop(struct rte_eth_dev *dev, struct nicvf *nic, bool cleanup); -static inline int -nicvf_atomic_write_link_status(struct rte_eth_dev *dev, - struct rte_eth_link *link) -{ - struct rte_eth_link *dst = &dev->data->dev_link; - struct rte_eth_link *src = link; - - if (rte_atomic64_cmpset((uint64_t *)dst, *(uint64_t *)dst, - *(uint64_t *)src) == 0) - return -1; - - return 0; -} static inline void nicvf_set_eth_link_status(struct nicvf *nic, struct rte_eth_link *link) @@ -142,7 +128,9 @@ nicvf_dev_link_update(struct rte_eth_dev *dev, int wait_to_complete) memset(&link, 0, sizeof(link)); nicvf_set_eth_link_status(nic, &link); } - return nicvf_atomic_write_link_status(dev, &link); + + rte_eth_linkstatus_set(dev, &link); + return 0; } static int -- 2.15.1