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 39F4CA2EFC for ; Tue, 15 Oct 2019 09:33:53 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CB4021C2E8; Tue, 15 Oct 2019 09:33:51 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 016DF1C2C0 for ; Tue, 15 Oct 2019 09:33:50 +0200 (CEST) Received: from mail-ua1-f72.google.com (mail-ua1-f72.google.com [209.85.222.72]) (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 51BC6C049E36 for ; Tue, 15 Oct 2019 07:33:50 +0000 (UTC) Received: by mail-ua1-f72.google.com with SMTP id n8so4548455uak.6 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=QnXAKLmVSg7DsVEDzdDJQ3WwgRRZoR281XZCiknspyWZuE43ea4Mvj3y1xJygFIYee kWoWvG5F5L2y0UCJ+GMEZGwWq3xrn3lx8ylBtcr4H8rFcD8Tgbvhg8njccJy3Lg9/PM7 d+YICytI5HI9my0wjmNAbhXiHR5JsciWWRPg04bMcn4frUoqXdtublHwY0Q8Ss+ZMbAe iDxkSslYEVd1+JqE4KxJqHvx7xuNjyQ0pkK0RpH431ATI1tqV0V1KHIR5QeWuop/eM4I q0YqdbzSW1RL9iNcEJxtZSGsbyM2x6fZXkNYPOh1THiTmgjKrTzOhm9K5PIzV75cD3V4 eEsQ== X-Gm-Message-State: APjAAAX2u+IT4CUpvtmT8rYbzFX9E5OosjYjatfeRlsrj3obN4JYX7nI 527anXl7UARS28vnAT02BsMwcaLHSVPk9Dk0P4fr8tRO153gawFKR2j6TcZ7ZOas1Q6GTeRIDDk yg5L/5E6t7MjmzpsJ/Yw= X-Received: by 2002:ab0:7107:: with SMTP id x7mr14270739uan.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-dev] [PATCH] eal: fix link status issue on ppc_64 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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