From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f68.google.com (mail-pg0-f68.google.com [74.125.83.68]) by dpdk.org (Postfix) with ESMTP id B79A11B217 for ; Mon, 8 Jan 2018 18:45:39 +0100 (CET) Received: by mail-pg0-f68.google.com with SMTP id t67so6001997pgc.5 for ; Mon, 08 Jan 2018 09:45:39 -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=R+3XAUfjeRTTDLfBOZRvZelAXZbKXiDp8umAUp5CZdqFb4d6xEw2hkG0raEjR6w3Y+ 1c9CjwWnlLR3s1fNyI/pWW1g1Gx5JAE4+RRp6SK9qxyDC30GnTNh7x/Xv4s5l8h4KAq8 uyDf/josmHAcpOEowQca+1d5EgbDz4ExeJ4kp9b3vscNTczSZz4ArrT02wW7Zf+lNqye bz4wWFOKdido88jTjgdHYlUnh6rHk4ZNv/OARZQz1aZrsjfow6BOO3vK9zeBMTwUPn2N 5JOta/QvUVGhv7SFdKBa/0SZZU6kxo4lKipqJhgjcjgjPdJl1I8+1AbyXDT3P0avnRJA nvAw== 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=HofnpmWSdwhxh/Q9J0V4TRTsL4aHL+uqXKbrBJiuSETe7GgowandqleTTuOIem2GVp j/aDsiugCxydAG3clqXc8WaMkffXF7Qs4JTRpDkeeeXAXbbaAnom3BYbtQFssatD1fxl YeLZYSjUUzDAbzt4GM9LmpcGV5uCBvin4pmB/IR79k/wdc20vCrj+TLJfcmMYJaEBnXh x1+mQinTCzn99y52vTu7JazmksJnSd0GXwlAiJxOgyfzJtu+S6uyUlu6lZ+9K51UQfBd yxuPuVcLE+i2DrDQ32Va6HNgWooRazwZzilZhho7G/vExcVyRBtFj7ti9CE0u9FwTarV LtrA== X-Gm-Message-State: AKGB3mKKGdZsti8RTwaVDs84avh+6XR9JMYdyHqbzgGRJOtygyFNkWZ1 sDi2HJOuqBLJqH0VNnIDAlZBZzhAfjc= X-Google-Smtp-Source: ACJfBosuNijHKj6XlMkC2CgTDtf8btItmWGYgGSdhPSdiLQdZ9XtmRbc2uKZk1IFjmE2UQ5BQh9IYQ== X-Received: by 10.84.253.133 with SMTP id a5mr12515638plm.96.1515433538666; Mon, 08 Jan 2018 09:45:38 -0800 (PST) Received: from xeon-e3.lan (204-195-18-133.wavecable.com. [204.195.18.133]) by smtp.gmail.com with ESMTPSA id j14sm10933142pfh.94.2018.01.08.09.45.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 Jan 2018 09:45:37 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Mon, 8 Jan 2018 09:45:11 -0800 Message-Id: <20180108174514.14688-13-stephen@networkplumber.org> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180108174514.14688-1-stephen@networkplumber.org> References: <20180108174514.14688-1-stephen@networkplumber.org> Subject: [dpdk-dev] [PATCH v3 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: Mon, 08 Jan 2018 17:45:40 -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