From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f66.google.com (mail-pg0-f66.google.com [74.125.83.66]) by dpdk.org (Postfix) with ESMTP id 41FDA1B3CC for ; Tue, 16 Jan 2018 19:38:21 +0100 (CET) Received: by mail-pg0-f66.google.com with SMTP id y27so3930085pgc.5 for ; Tue, 16 Jan 2018 10:38:21 -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=mBRcJpTzFgeGAe6ZLRMvtlr/uWjjMMEboikaRRgJr7k=; b=TOBGVkZUI/WsZEIV3GE32fEtVRvmASLAP0fM9Ji3mTpScHsiSLvUE7GEIr4z7f9v79 qvEG79PZboIA5V54wYpMeIEDyPrJkbrq4LZt2cDI40Tx7ZwI/xmKy2Viij3jdh6UhsUP iUhqbG8f6iTFUPTYDLbphOkRcMsXxoflSIYpTFlXwv3Deny2woOUIMi5F0i1Io/cwxJi izwh9tlisLpIXjkoYtA/ggVK2PsjVNvkyXlCJC/PEewPcFYVDKbTf2q+eD9tWgeIX3uw EA/JEW8jK28En94032OXv7bq8ba2w1cYyiGv071wdK0QEZ68zNh4f4dOuhX1QOPsxXfA 7eWw== 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=mBRcJpTzFgeGAe6ZLRMvtlr/uWjjMMEboikaRRgJr7k=; b=JIE9VYWyO797WeCeZ7rKEAjMKCoGfqqhcduNHxHVHap/i9d4inclVgh0LBngWqwibn j55XO75Chr1KkdFDsae7UZlbD8impoNLwU2YBzbQR7jJdKbeDfJmBFCb+1PAs250D45Q 7BiohL11PfyG3WcMW53JD5gmJI9G2xs1/cYPOFMJE/hxAwCqMbs3GbCTKA54jwdVizpo ZTc3JMkRVS3CBhdqZcWmRkmfqHqyogFK1x04kzS/H5rVCyzOvGyFCJR6vXKSJYa/9yKv eZ9d2EglPOl9cmOhxcI9l8CjuTDjB1kK0dKIyvviEGfYj4nrXBJGrkGzq3aKuqRexB2u fAHw== X-Gm-Message-State: AKGB3mI7xz2S62FTtiGGYPwPkLTpeWhkpaZxiXnoJ1+bIU0QwVxQQExW buyYAzpMnXWaSJ1F3SJjI2EiONSPIIU= X-Google-Smtp-Source: ACJfBoscsJY39qls91GEsXdGoXAj2jwCjdA9OlxYdwwhz3WV5ITojTbkLE0YMsAeuuJ0Wg9hs4Pdqw== X-Received: by 10.98.217.28 with SMTP id s28mr26966871pfg.69.1516127900218; Tue, 16 Jan 2018 10:38:20 -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.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jan 2018 10:38:19 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Tue, 16 Jan 2018 10:37:54 -0800 Message-Id: <20180116183755.24542-15-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 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: Tue, 16 Jan 2018 18:38:21 -0000 Common function matches this drivers usage. Signed-off-by: Stephen Hemminger --- drivers/net/octeontx/octeontx_ethdev.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c index 4f71f9def7e9..fd03d22646f4 100644 --- a/drivers/net/octeontx/octeontx_ethdev.c +++ b/drivers/net/octeontx/octeontx_ethdev.c @@ -463,20 +463,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) { @@ -548,7 +534,8 @@ octeontx_dev_link_update(struct rte_eth_dev *dev, link.link_duplex = ETH_LINK_AUTONEG; link.link_autoneg = ETH_LINK_SPEED_AUTONEG; - return octeontx_atomic_write_link_status(dev, &link); + rte_eth_linkstatus_set(dev, &link); + return 0; } static int -- 2.15.1