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 4F1951B1D9 for ; Sat, 6 Jan 2018 02:07:16 +0100 (CET) Received: by mail-pl0-f66.google.com with SMTP id i6so4069972plt.13 for ; Fri, 05 Jan 2018 17:07:16 -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=nI7YPkNbCwdoWrHVDIzPYWSpNQThRcxAMWMaCiPtfIw=; b=wEowteu0HXX/q8sQV2lyIuyTrJj3RrfSysv4A4U8U4fZLY/MMH2L1lmGS7PfjHhNjX XQ/HRI8RRyHku8BZNkWRB+MUt00XQg64fmddV3mLR1Ct3pjE0xqtuqj7JD6HrDXdKdkU 7gd7+iipSnsvmgiuZRG9bQ5AIeiiHE+c0y0J4h9Y3B63b+2P1jHmdQ+xVrXi3iIaTjPS tZgMCr7UwISpHgoV+F3xH3H6fJT+5aarKT5M5yN/VZdPXQwhE04aFMFAVx2l8u3bXG+W 32RrlA/wO8AmeThXyyU7Z4D6eHxHJTf1qZAK4Uq4THmnTF2I0XlHmo0rCYlUfwqoFBS3 PBEQ== 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=nI7YPkNbCwdoWrHVDIzPYWSpNQThRcxAMWMaCiPtfIw=; b=Ytkx8d6Z2PPZGYqlnitUf0KHD5+LVlCHzPA2LPBw3tp6eFoVY7k6DQHRimpzpLDsWd woHq2/frjYCljHB7mPqORwhbEVn2e8C9JIkhPw3C52XFsH3xQPgPcN4EJu/ZNjCcLveP YrvApGsduV1YSHB7Qm9pCjDaXtpYphLlEH/uMt5wSmGAY/Tf1tkRvGGjuflKizGAr/6f z6KEEBQGveZzL7+Rtp+IjGcfeiH0I9J7V+AYGaj07apZU07GYaz1z2Tc0U/XxGEDVYuZ 8/z7J3BRYT1LK8ADja3w5fuE07saYa8mhQnEfpPjlfIp2ZwFQO8akLZpJQYOU0X96L50 XtCA== X-Gm-Message-State: AKGB3mIz1Fsy9HKMURZ7Q7r3t2MPfzE4LVo11N0XRlKVero1HJxwBNEj H1TvnyNYVeYoMmC5Y6D5Rhf0EG8w4Xo= X-Google-Smtp-Source: ACJfBottxBZBHoMlokrq6uX/ND2oNREKXi3NDxfx9wkaTeUHGu8GfYesEgzzLG/LUUV+pEZuqBNc+A== X-Received: by 10.84.212.150 with SMTP id e22mr4820825pli.447.1515200835225; Fri, 05 Jan 2018 17:07:15 -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.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Jan 2018 17:07:14 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Fri, 5 Jan 2018 17:06:55 -0800 Message-Id: <20180106010656.9167-15-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 14/15] 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: Sat, 06 Jan 2018 01:07:16 -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 bd24ec330fce..670cdec0679b 100644 --- a/drivers/net/octeontx/octeontx_ethdev.c +++ b/drivers/net/octeontx/octeontx_ethdev.c @@ -490,20 +490,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) { @@ -575,7 +561,7 @@ 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); + return _rte_eth_linkstatus_set(dev, &link); } static int -- 2.15.1