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 DEB9A1B1A7 for ; Tue, 23 Jan 2018 00:55:20 +0100 (CET) Received: by mail-pf0-f194.google.com with SMTP id t12so8343790pfg.2 for ; Mon, 22 Jan 2018 15:55:20 -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=11KA9+HO4Aa7+xwd7iQL476VY/pu2i76HsLFODBWals=; b=BiJsqPzr48XO+E5N0Ar6jO+KkSQzWY8wFa4/pondqWdUm4IgB1BnXvkxgRqmaCesHX /T0mDPLMCMcXcbfP8UjumBB9302IsDk56AxSvC/1eN4dalN1Nk1y0/lPNFrmC5wqn32h iMZSRWLgYjL55c8kS2lAmWhPDzStBR405efYKCvCCw9KApF0f8xGUp35kPWM6fd/zhK9 ZXaV5WO3FJuycgNgQgvC6rZ2b2pQhK5n1ehJ2+rt8zpr2xkHTRCjBfL+p5PUTXBL04CE CE7LiRtJFyXs2Q6s1JKwsxLRER8ZeTa7B0Y+NdSafWRngccg7kYjy5duyyeBDN1V61ZJ IAWw== 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=11KA9+HO4Aa7+xwd7iQL476VY/pu2i76HsLFODBWals=; b=PRuHU0KkolaVezkiNhRpwDXCCKn2HB2y0I+ExeEBPaPvw4Wu86ccdinyLo6OnQq0ZM Fpba4yP/XlqhLJE8iWycTgKVcQPr5oIKp+sXkzi984NfAI3HGfE++5Xoyo7F1a3G2yB0 dALD4sKHOz1YLFa4lqo2d7JyspB8CTs6UCEySXWskDfo8VlnfWqOKMGcsUsLRWuUVk+T JLvT+ofiY3/q3URbIjEt5tUQt8+0oEBojAVYOcTr4dmAuT7ljgibO2qvkvcnG9vRXB7N Bj7QzWfofhz9Oxrjjs1MEhP3+otWp9NUkJvx0NsXALReJqFeBmktJx2iWViShhmaBos8 L7Ng== X-Gm-Message-State: AKwxytco4FqxsQ6JiebnzvwWv12Bf9wA/zQH+iOMj5fcUVd7A0QLQ+SK DiroTU6tytTvFugzpn1kBgzxM5zQIPw= X-Google-Smtp-Source: AH8x224C3dgW/h/GREigQoAQUcNjqARN23MHvo4M97FnDgIB3si9tg/vfhxDkxs1VsRYbOXA00G+NQ== X-Received: by 10.99.94.69 with SMTP id s66mr7905957pgb.145.1516665319842; Mon, 22 Jan 2018 15:55:19 -0800 (PST) Received: from xeon-e3.lan (204-195-18-133.wavecable.com. [204.195.18.133]) by smtp.gmail.com with ESMTPSA id a24sm1623825pff.160.2018.01.22.15.55.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Jan 2018 15:55:18 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Mon, 22 Jan 2018 15:54:57 -0800 Message-Id: <20180122235458.28562-15-stephen@networkplumber.org> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180122235458.28562-1-stephen@networkplumber.org> References: <20180122235458.28562-1-stephen@networkplumber.org> Subject: [dpdk-dev] [PATCH v7 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: Mon, 22 Jan 2018 23:55: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 adca3435e4af..a54ea1d2219a 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,8 @@ 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); + rte_eth_linkstatus_set(dev, &link); + return 0; } static int -- 2.15.1