From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f68.google.com (mail-pg0-f68.google.com [74.125.83.68]) by dpdk.org (Postfix) with ESMTP id 4EC571B220 for ; Mon, 8 Jan 2018 18:45:42 +0100 (CET) Received: by mail-pg0-f68.google.com with SMTP id d6so4945578pgv.2 for ; Mon, 08 Jan 2018 09:45:42 -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=YtW8MMIPM7pRpOkIOaQiJASJLefndx3cnGbZMSyWTLxOKV3yWbUrzzk6vDzISFdU7V DgguzwhbnvuiiWnNmKIUCCSqOcmFOrLp4ckRN+pKxiSHXPQCcBchO7o1BKPevfSo0M3T N9siq30EmriYW/oBo0nn0iP7K7lOR1s0WCVbraOHUSVTQbHROUNkTlUswc/PtOoYGGr6 fBfVI3+WKF+0vt6jA50pwcYhpK39+Z5llkrXH/vwCfNPYpplsAocLK/D0jeozoDP+iX6 6MO2jsAYNUQiqGN4nz4ECnbkfzEeyX1CcbLhbWqlXvO+6v/jYCr0c+2yeKhiS+YDM4Wt BONw== 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=S5Ccxhw5B1YqKq1CApc68RMqEyjx8+Q6JqnDUadBUc2G3TlheBbP88FPFEOJUDh2nc nts2acNdlfw4JV+rKcu1EjkPoWXM6+zRVaMXIJVFtRozC/gAxzgpmZa0+atoOdHk2BtD Ryge6DWHbxB2DeNS4gD2zHQ8jy3hYP5dbiFwg2i8EHPO92tPSdkXSc4apy+DyAWzghYS y+tbUv63sINsHGRU3RJ9kVGrnAbN1nt8ez3gWkimq7+qUeAGcXhB48WPcsbGrz33gqS0 Nc5wEhp+CxZikLzZf+jeiJuYL4jXJjxCVQedjuPnd/K48iB+X1Jmh/XbmHZe/j5BXPRi pUEA== X-Gm-Message-State: AKGB3mJugnX5DXpfuMZfYoRY81aCv4dpZWQaoyPooscefDWfqUSYnrt+ 3knoLUyEvaQCJmWMJhI5BlrBE2fdHFs= X-Google-Smtp-Source: ACJfBotIJAZtilXe7m7PC9mSGC3xseIPQiUwi27QvSu2w+onzGOBOlAkdQ0gWDyIM08c2fI3JgMURQ== X-Received: by 10.84.150.129 with SMTP id h1mr12963821plh.108.1515433540990; Mon, 08 Jan 2018 09:45:40 -0800 (PST) Received: from xeon-e3.lan (204-195-18-133.wavecable.com. [204.195.18.133]) by smtp.gmail.com with ESMTPSA id j14sm10933142pfh.94.2018.01.08.09.45.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 Jan 2018 09:45:39 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Mon, 8 Jan 2018 09:45:13 -0800 Message-Id: <20180108174514.14688-15-stephen@networkplumber.org> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180108174514.14688-1-stephen@networkplumber.org> References: <20180108174514.14688-1-stephen@networkplumber.org> Subject: [dpdk-dev] [PATCH v3 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, 08 Jan 2018 17:45:42 -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