From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f41.google.com (mail-pg0-f41.google.com [74.125.83.41]) by dpdk.org (Postfix) with ESMTP id 527E07CB9 for ; Fri, 14 Jul 2017 20:30:52 +0200 (CEST) Received: by mail-pg0-f41.google.com with SMTP id t186so49539147pgb.1 for ; Fri, 14 Jul 2017 11:30:51 -0700 (PDT) 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=HOf4OvHJ0pYzSyrSAWcVaBsEBQb0eJtECBdQkONvR6g=; b=dLdviFC1N1jdsmOHqbXN85LbRNUhzEgddg5hWpE+Gmb8Q7iBjtUHzP6lJtL8/xawmq ZX9tOMB79Qypf1SrUf/RsdPadrb7VuYivVk68G6tyAo+MBS1jxqThFfkjzIRObA8TQmv uYoi8IqH5PX68Uo1LTLoTrAylld7rE8VjInpHfu2A+CHL6eAfEEMc9ZJFcU7Xorr2rSc YJ4IW/MgRnoivPSojuAGTO1mj9FswzACFTOTy9pH7gIJxc2cJDn0DlRK6Q09wB1Qel4A xJRqD/hYtkdjsnY5ai0qY17PqqGwSbe41wnFonzk9GODT2ccqxi9ccA+xL0WcX0zMnIa 5bTA== 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=HOf4OvHJ0pYzSyrSAWcVaBsEBQb0eJtECBdQkONvR6g=; b=kzsy8vQs7d4x9Gd+fb4xPNgYOKXINCBIBdSr7M395j52sHFWqgm+RvbvNQultpVh6+ ZSTrXgORJCLlbLdFbnG+mEm1leH17K2oHfaZj8CN+y0ti9S2uKq/BD19TZYNqhabg2RF 8U89c/5JEOXb8wvx23cyreyrGTtpAjQjZECtA2n0C5AuFl8JVFbc6DHCZEv5vsGPtEGy MSIhawkvyxgwHnDIxoBcBCi+vzbxGD6IM6I0SGNN2f/L0V3IVnTFt8X/24F82fPAP4rD KE5loaOZN/t702nJXVVeeu7bsqtLXCLYDvUROwkucjI5Cm3lh2VqkkZ5Pr2eLDUNO0By uXHw== X-Gm-Message-State: AIVw110MakktIOGUEMlXcsCbiKep+m9uEc+HOW2y2ALZ/C8pJYXTAAoA XvBU5DLBmTbQ9RP8BuGgyA== X-Received: by 10.84.128.195 with SMTP id a61mr17831937pla.124.1500057051086; Fri, 14 Jul 2017 11:30:51 -0700 (PDT) Received: from xeon-e3.wavecable.com (76-14-207-240.or.wavecable.com. [76.14.207.240]) by smtp.gmail.com with ESMTPSA id r9sm22711163pfi.114.2017.07.14.11.30.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Jul 2017 11:30:49 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Fri, 14 Jul 2017 11:30:25 -0700 Message-Id: <20170714183027.16021-13-stephen@networkplumber.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170714183027.16021-1-stephen@networkplumber.org> References: <20170714183027.16021-1-stephen@networkplumber.org> Subject: [dpdk-dev] [RFC 12/14] thunderx: use _rte_eth_link_update 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: Fri, 14 Jul 2017 18:30:53 -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 edc17f1d4002..113e75bc14de 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 @@ -75,19 +74,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) @@ -169,7 +155,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_link_update(dev, &link); } static int -- 2.11.0