From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl0-f66.google.com (mail-pl0-f66.google.com [209.85.160.66]) by dpdk.org (Postfix) with ESMTP id BFD661B1D2 for ; Sat, 6 Jan 2018 02:07:13 +0100 (CET) Received: by mail-pl0-f66.google.com with SMTP id b96so4082493pli.2 for ; Fri, 05 Jan 2018 17:07:13 -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=eCEVLj0vIiz28Eg74l1jXcXBSS8NZ3sw8oZn5HTXArA=; b=eXiKs+sbAj2ig0pOSPGfHH9rvXxUm/5RFfCdcQ4qJO4r59mbttfgK7ZPWvTE7gpB3L Ms7Qbh0xOvHKsBPLaAVEOb+k12/PNqxx6GMPy26S1zqAb9qOxVFa5ger08eNvdOoa9i+ V8TVViMGGaU15XUYqBAm96TOdcCeDTsvJrVRxenJZ0zcZJ4/SI+1hVuMNVKDGTVbbuM7 jnU5tLpQ8I84DtwihhFq+xt3lriAsYZCj9NVXU3zaopDDh0fgCt13wb7NYcJWAs70Oli cMR9bfdtcLPDDlwW3siAZuLy8hf4t7y1ZtOvUdnMt0QdjMQwGnNtaATVZ3FwJ4Yzxw1s XGWA== 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=eCEVLj0vIiz28Eg74l1jXcXBSS8NZ3sw8oZn5HTXArA=; b=SLUpiSfJuyWe6gcx9U5GYmWLB2lcds5Ke3V2+uXiNA9awId3yG0NgEUdV8tIAuOHXn dpdkUsmtjIlYxd71UiCnTh/JtZIXxcLCh0liRuh9Bja6T21R0yagqOOzXWePVV8TOMjl 0/czbiUII8kttvm6PgZ+dRQu5db36SDXG84H/1LzcchILjPveOQRrEi7rH7b6uhIf1g4 CSBadRnxjXaX2ADo9cj7wzJX3P75/awsvrPqcG+EgYNktxfMJCcOvwkySlgWFm+QKey4 bLdpaQDmRpWP9ZrNRNsq23MzJkSEs3SvqKprkc9sjLphDNketiIDETU5p4mhR3jSwV+F MGYw== X-Gm-Message-State: AKGB3mLfJyhI+CQE5oT9IjmmQcGMvB4V7gPcUOUyV2QT02tFWBAl7NGr aDfNdAJJosWD6swKWMlQLV1UHTP13go= X-Google-Smtp-Source: ACJfBos/y+qNo7841aKNO0eS3FZyo1NdSN6Ajo9FcvJOnnPJHuSi4TwD/9Eznen8RaYti3wZCipayA== X-Received: by 10.84.231.22 with SMTP id f22mr4836583plk.442.1515200832773; Fri, 05 Jan 2018 17:07:12 -0800 (PST) Received: from xeon-e3.lan (204-195-18-133.wavecable.com. [204.195.18.133]) by smtp.gmail.com with ESMTPSA id p14sm12385018pgn.37.2018.01.05.17.07.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Jan 2018 17:07:11 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Fri, 5 Jan 2018 17:06:53 -0800 Message-Id: <20180106010656.9167-13-stephen@networkplumber.org> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180106010656.9167-1-stephen@networkplumber.org> References: <20180106010656.9167-1-stephen@networkplumber.org> Subject: [dpdk-dev] [PATCH v2 12/15] 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: Sat, 06 Jan 2018 01:07:14 -0000 Use new helper function. Signed-off-by: Stephen Hemminger --- drivers/net/thunderx/nicvf_ethdev.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c index d65d3cee727e..e41b379f3c9c 100644 --- a/drivers/net/thunderx/nicvf_ethdev.c +++ b/drivers/net/thunderx/nicvf_ethdev.c @@ -43,7 +43,6 @@ #include #include -#include #include #include #include @@ -76,19 +75,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) @@ -170,7 +156,8 @@ 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); + + return _rte_eth_linkstatus_set(dev, &link); } static int -- 2.15.1