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 861631B1D8 for ; Fri, 26 Jan 2018 03:02:09 +0100 (CET) Received: by mail-pf0-f194.google.com with SMTP id a88so7190652pfe.12 for ; Thu, 25 Jan 2018 18:02:09 -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=LObjdMu5Urm5nr1xY8udu47D3pxZbNtvfr1aybtaFMY=; b=SvdPL3HDO8gud0v1j2lsTqpKrBevg5R75NEG75rlCy+YZfTP1GRBzJtvygRQF0WCrx ALo5ktsL4LU6yxT4NDrIbNBjT7CjDs+33NVv9m7JYHEZ5BVbbIsE1m3xFyqaUKcowYnd uern3a8hsg9VIZ+wC47EZQYj5EcoaF3yYDz/ayhvmkzjs04mo29yQoR25e5iD7tpwzAo RieIrK6bz9GjEfEDFojsMiqP448quC+L/Vx8/UtqI2+xUef/QIXPdyKxwDsd7kedx86k dVqMYYHCsrqjdQyFGMYwJVN5rX9DK7FKHB8VwhcQbRBDLlSSH/BoBU69225bOdFIuvXg kJmw== 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=LObjdMu5Urm5nr1xY8udu47D3pxZbNtvfr1aybtaFMY=; b=OAFy7mbR1Rmup27y3ZFrDikc9alqzDVWjgyKxsaGq/H1e9IVasSI+E7UP5smn9d7Vn seXraJnbPQPMOBQegMCNZlHB5zo102ny4dGu2b97Clm/TqTrXLx9hd6tleG0Xjd7rkBp SpsDxbGJoUxguhTeeU6BGmCuDfCysyZmyGVmKHhJvygTsBhlxcXnUwOrtAHmiF3rIsyw vVGIed1jnQ3L4I2b2Mw2DfhT0D/xEns2X/K1FwEqh8Q9Pnbob2+MbqbGrbGJSXM+J36+ WrKV1xgZ3jXDJV69UZrCVKWcZzngxqxDBIPQkjhWdWQHlRrXR54UvhtNBttmMQlZ+ApH S+pQ== X-Gm-Message-State: AKwxytciL/nmjCuPBUhz9PWmNbr+p35XLgh9BKwgnct52C22Jl3LhvDJ xxdJChpcfeiTgFx6dldcePxSuM+krKY= X-Google-Smtp-Source: AH8x226ha4aYtUHNVCnymKUpaiOxQPEB7qhfQXq/s+Hlp11kuzqSjYI0bpT1IzMU0O/qZzt0pCQA9g== X-Received: by 10.101.101.19 with SMTP id x19mr15264819pgv.347.1516932128469; Thu, 25 Jan 2018 18:02:08 -0800 (PST) Received: from xeon-e3.lan (204-195-18-133.wavecable.com. [204.195.18.133]) by smtp.gmail.com with ESMTPSA id d5sm22141492pfk.2.2018.01.25.18.02.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Jan 2018 18:02:07 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Thu, 25 Jan 2018 18:01:50 -0800 Message-Id: <20180126020151.979-15-stephen@networkplumber.org> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180126020151.979-1-stephen@networkplumber.org> References: <20180126020151.979-1-stephen@networkplumber.org> Subject: [dpdk-dev] [PATCH v8 14/15] net/octeontx: 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: Fri, 26 Jan 2018 02:02:09 -0000 Common function matches this drivers usage. Signed-off-by: Stephen Hemminger --- drivers/net/octeontx/octeontx_ethdev.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c index adca3435e4af..68a617051d0b 100644 --- a/drivers/net/octeontx/octeontx_ethdev.c +++ b/drivers/net/octeontx/octeontx_ethdev.c @@ -487,20 +487,6 @@ octeontx_dev_promisc_disable(struct rte_eth_dev *dev) octeontx_port_promisc_set(nic, 0); } -static inline int -octeontx_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 int octeontx_port_link_status(struct octeontx_nic *nic) { @@ -572,7 +558,7 @@ octeontx_dev_link_update(struct rte_eth_dev *dev, link.link_duplex = ETH_LINK_FULL_DUPLEX; link.link_autoneg = ETH_LINK_AUTONEG; - return octeontx_atomic_write_link_status(dev, &link); + return rte_eth_linkstatus_set(dev, &link); } static int -- 2.15.1