From patchwork Wed Oct 21 11:49:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eli Britstein X-Patchwork-Id: 1385511 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=nvidia.com Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CGTLX4GfTz9sSC for ; Wed, 21 Oct 2020 22:49:39 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 82421873B5; Wed, 21 Oct 2020 11:49:36 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FtyiyQ4sLMO0; Wed, 21 Oct 2020 11:49:33 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by hemlock.osuosl.org (Postfix) with ESMTP id 175CF8722C; Wed, 21 Oct 2020 11:49:33 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id EAE4EC08A1; Wed, 21 Oct 2020 11:49:32 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id 6919DC0052 for ; Wed, 21 Oct 2020 11:49:31 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 57E63854C9 for ; Wed, 21 Oct 2020 11:49:31 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RMp5PSwd6WrK for ; Wed, 21 Oct 2020 11:49:28 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by fraxinus.osuosl.org (Postfix) with ESMTP id EBC32854A7 for ; Wed, 21 Oct 2020 11:49:27 +0000 (UTC) Received: from Internal Mail-Server by MTLPINE1 (envelope-from elibr@nvidia.com) with SMTP; 21 Oct 2020 14:49:22 +0300 Received: from nvidia.com (dev-r-vrt-214.mtr.labs.mlnx [10.212.214.1]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 09LBnLOG013091; Wed, 21 Oct 2020 14:49:21 +0300 From: Eli Britstein To: dev@openvswitch.org, Ian Stokes Date: Wed, 21 Oct 2020 11:49:12 +0000 Message-Id: <20201021114912.2552-1-elibr@nvidia.com> X-Mailer: git-send-email 2.28.0.546.g385c171 MIME-Version: 1.0 Cc: Eli Britstein , David Marchand , Ilya Maximets Subject: [ovs-dev] [PATCH dpdk-latest 1/1] sparse: Fix __ATOMIC_* redefinition errors X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" In sparse commit [1], __ATOMIC_* defines were introduced, which cause redefinition errors. Wrap OVS defines with #ifndef to fix it. [1] https://git.kernel.org/pub/scm/devel/sparse/sparse.git/commit/?id=cf8f104749f5bca36852989297af8cc19ff24d5f Tested-at: https://travis-ci.org/github/elibritstein/OVS/builds/737660375 Signed-off-by: Eli Britstein --- include/sparse/rte_mbuf.h | 8 ++++++++ include/sparse/rte_trace_point.h | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/include/sparse/rte_mbuf.h b/include/sparse/rte_mbuf.h index ee461f91e..172c9954a 100644 --- a/include/sparse/rte_mbuf.h +++ b/include/sparse/rte_mbuf.h @@ -18,10 +18,18 @@ #endif /* sparse doesn't know about gcc atomic builtins. */ +#ifndef __ATOMIC_ACQ_REL #define __ATOMIC_ACQ_REL 0 +#endif +#ifndef __ATOMIC_RELAXED #define __ATOMIC_RELAXED 1 +#endif +#ifndef __atomic_add_fetch #define __atomic_add_fetch(p, val, memorder) (*(p) = *(p) + (val)) +#endif +#ifndef __atomic_store_n #define __atomic_store_n(p, val, memorder) (*(p) = (val)) +#endif /* Get actual definitions for us to annotate and build on. */ #include_next diff --git a/include/sparse/rte_trace_point.h b/include/sparse/rte_trace_point.h index c28f1c941..94bd54b25 100644 --- a/include/sparse/rte_trace_point.h +++ b/include/sparse/rte_trace_point.h @@ -18,8 +18,12 @@ #endif /* sparse doesn't know about gcc atomic builtins. */ +#ifndef __ATOMIC_ACQUIRE #define __ATOMIC_ACQUIRE 0 +#endif +#ifndef __atomic_load_n #define __atomic_load_n(p, memorder) *(p) +#endif /* Get actual definitions for us to annotate and * build on. */