From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3ED13A2EFC for ; Tue, 15 Oct 2019 09:33:54 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 03D191D15D; Tue, 15 Oct 2019 09:33:54 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 24C671C2E8 for ; Tue, 15 Oct 2019 09:33:50 +0200 (CEST) Received: from mail-vk1-f199.google.com (mail-vk1-f199.google.com [209.85.221.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4B7B588309 for ; Tue, 15 Oct 2019 07:33:50 +0000 (UTC) Received: by mail-vk1-f199.google.com with SMTP id u123so7898781vkf.8 for ; Tue, 15 Oct 2019 00:33:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ToSVk/XCZACetFpRIHmWfFZwpA63WujC9N3CvboGrjw=; b=VtOh5YPqawkVEyA5DcjE4/Qi5Qx2wwY8mesNHj+pjB8QmCW2hziltZYnI9IJ7qjtkW X8xDvn36RsHn5SocMKamEQyE/9o8tl+MvYDx+ZY8pZHIbNTHirQILaInaZIq6Tf274mJ SEQ79fLyrT+jJKspMbNXOgv396c7iUXJNRJ8bUVa0CxAkdeOhf2TnUkB0NvfM2OQBP7N Kw6qX+Si9yCByEX796FJ5izURYh08LI4E6QQHy6hrTdByB7P9u9drMPmUJpoS5o3Ei9v p2xVqTuZ4MpWVjxObGBIDmdv9S69dGHwxO/o0b/aZP49xNtgNuBjsgGatpkdppcBeU1X omJg== X-Gm-Message-State: APjAAAXYoGV1as6QW7798dE9TsRNxfB1ih3RjFiEV2tPTTXjuEgQsUzT +xYI/0nI+Tl0QeMBdWNPcIcRmDO0gFPq8QDrYiA28NPsUSBgCqKR9pzrMcgU1PVc37k5OD8XzxR sEuuXKm6Nj0z0Jgm7GXJdYek= X-Received: by 2002:ab0:7107:: with SMTP id x7mr14270740uan.87.1571124829480; Tue, 15 Oct 2019 00:33:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqwsNHDWeWjsdmcJKu43OYXkH9/zay7KHr+D8fOVd0DG/k16ku2pvhhN73+nphsQSe66bMQcX/Z673SYzYJkIWQ= X-Received: by 2002:ab0:7107:: with SMTP id x7mr14270723uan.87.1571124829071; Tue, 15 Oct 2019 00:33:49 -0700 (PDT) MIME-Version: 1.0 References: <20191014230745.70489-1-drc@linux.vnet.ibm.com> In-Reply-To: <20191014230745.70489-1-drc@linux.vnet.ibm.com> From: David Marchand Date: Tue, 15 Oct 2019 09:33:38 +0200 Message-ID: To: David Christensen Cc: dev , Stephen Hemminger , dpdk stable , Aaron Conole Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] eal: fix link status issue on ppc_64 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hello David, On Tue, Oct 15, 2019 at 1:08 AM David Christensen wrote: > > The rte_atomic64_exchange operation for ppc_64 incorrectly linked > back to a 32 bit generic operation (__atomic_exchange_4) rather than > the 64 bit generic operation (__atomic_exchange_8). As a result, > only the link speed was passed to the application, not the link > state, link duplex, on link autoneg properties. Good catch. The first impact is the link status, but you can imagine applications calling this, so I would prefer a title like "eal/ppc: fix 64bits exchange operation". WDYT ? rte_atomic64_exchange has no unit test. This kind of problem could (should?) have been caught in unit tests. Maybe something to add later. > > Fixes: ff2863570f ("eal: introduce atomic exchange operation") > Cc: sthemmin@microsoft.com" > Cc: stable@dpdk.org > > Signed-off-by: David Christensen > --- > lib/librte_eal/common/include/arch/ppc_64/rte_atomic.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/librte_eal/common/include/arch/ppc_64/rte_atomic.h b/lib/librte_eal/common/include/arch/ppc_64/rte_atomic.h > index b13a80de4..7e3e13118 100644 > --- a/lib/librte_eal/common/include/arch/ppc_64/rte_atomic.h > +++ b/lib/librte_eal/common/include/arch/ppc_64/rte_atomic.h > @@ -401,7 +401,7 @@ static inline void rte_atomic64_clear(rte_atomic64_t *v) > static inline uint64_t > rte_atomic64_exchange(volatile uint64_t *dst, uint64_t val) > { > - return __atomic_exchange_4(dst, val, __ATOMIC_SEQ_CST); > + return __atomic_exchange_8(dst, val, __ATOMIC_SEQ_CST); > } > > #endif > -- > 2.18.1 > -- David Marchand