From patchwork Wed May 25 09:53:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Monjalon X-Patchwork-Id: 111793 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 25C90A054F; Wed, 25 May 2022 11:53:37 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0DECC40146; Wed, 25 May 2022 11:53:37 +0200 (CEST) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by mails.dpdk.org (Postfix) with ESMTP id E08D7400EF; Wed, 25 May 2022 11:53:34 +0200 (CEST) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 2E3F55C027A; Wed, 25 May 2022 05:53:34 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Wed, 25 May 2022 05:53:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:date:date:from:from:in-reply-to :message-id:mime-version:reply-to:sender:subject:subject:to:to; s=fm1; t=1653472414; x=1653558814; bh=IBKa/5tog8R1NI0KO45h3gr7u uMK0HgrEMSmWHsMuT8=; b=uxKnBzsQl+qqnucCVu+Kecb2Ro2kSInnBdkHP2Qud fO3NefmNRQKPOmTxlxRc2DHDRcPaCTsqudcBuU+Wd4KwooD4mbOUG6gyPjEh+OEM RN0XXBWR2+Fh/0/kvLjget+MILgkTDVq7XTPXVqbzKNauHtdfcwox5zrykN8hbNq /f6aityoQyJ3vmrh31e6BgWtMJu32xNdJ/gtDNBg5TnQwgAh/MfOsPUOABrCPDlE 3vq+Kn2sLNRakhgMyOgwYqe9EUj3lpFA3Xk40Bdg16ILB1H2ruaKJyESwPZ6zOFy lT0gqA8yTbb5qJvaFFmvyX3sO7IBnKtr1BV5nKWagO/+A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:message-id :mime-version:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1653472414; x=1653558814; bh=IBKa/5tog8R1NI0KO45h3gr7uuMK0HgrEMS mWHsMuT8=; b=i4ecP5SyJimE1Aog6UWesVAUP5aYtP9+BqfcGk90WwP0jwx+IHy S0VJF9Hz0/c8Zo5Ynhi1uCq5+TAkWnGUqQUEdV7lFtH6YjdMCnLGRbJlSCdN9lXL gDYn2WciudUxw97hS+DibBaSQR1gz+DsNogCV3L9GKUbNj5u9mJrO8eEYObc9xeD rkxYMApnEwbw+1bn4WzNKD3FjpUYTdpikUPnreoJeBgukXYtf6WCVbGKgSiKChrT ehbvIqsEEhWODrRQ0GPtPFgW+vX1vM1gJR9s41BcBKkNJKZIJGMttXUS2ajzNGUg RzltlrMzed7cN6MzaoDmY0yrCLz8tMwYDKQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrjeehgddvtdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvvefufffkofgggfestdekredtre dttdenucfhrhhomhepvfhhohhmrghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhho nhhjrghlohhnrdhnvghtqeenucggtffrrghtthgvrhhnpeevveefveeiiefhtedukeegke elieegffeukeevudetueffieduveetiedukeefleenucevlhhushhtvghrufhiiigvpedt necurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvg ht X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 25 May 2022 05:53:32 -0400 (EDT) From: Thomas Monjalon To: dev@dpdk.org Cc: mdr@ashroe.eu, david.marchand@redhat.com, techboard@dpdk.org, David Christensen Subject: [PATCH] eal/ppc: undefine AltiVec keyword vector Date: Wed, 25 May 2022 11:53:07 +0200 Message-Id: <20220525095307.675312-1-thomas@monjalon.net> X-Mailer: git-send-email 2.36.0 MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org The AltiVec header file is defining "vector", except in C++ build. The keyword "vector" may conflict easily. As a rule, it is better to use the alternative keyword "__vector". The DPDK header file rte_altivec.h takes care of undefining "vector", so the applications and dependencies are free to define the name "vector". This is a compatibility breakage for applications which were using the keyword "vector" for its AltiVec meaning. Signed-off-by: Thomas Monjalon Acked-by: Tyler Retzlaff Tested-by: Ali Alnubani Acked-by: Ray Kinsella Acked-by: Tyler Retzlaff --- doc/guides/rel_notes/release_22_07.rst | 5 +++++ lib/eal/ppc/include/rte_altivec.h | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/doc/guides/rel_notes/release_22_07.rst b/doc/guides/rel_notes/release_22_07.rst index e49cacecef..ee60b17821 100644 --- a/doc/guides/rel_notes/release_22_07.rst +++ b/doc/guides/rel_notes/release_22_07.rst @@ -133,6 +133,11 @@ API Changes Also, make sure to start the actual text at the margin. ======================================================= +* The DPDK header file ``rte_altivec.h``, + which is a wrapper for the PPC header file ``altivec.h``, + undefines the AltiVec keyword ``vector``. + The alternative keyword ``__vector`` should be used instead. + ABI Changes ----------- diff --git a/lib/eal/ppc/include/rte_altivec.h b/lib/eal/ppc/include/rte_altivec.h index 1551a94544..7c088d2d16 100644 --- a/lib/eal/ppc/include/rte_altivec.h +++ b/lib/eal/ppc/include/rte_altivec.h @@ -9,6 +9,13 @@ /* To include altivec.h, GCC version must be >= 4.8 */ #include +/* + * The keyword "vector" is defined in altivec.h, + * and often conflicts with code in applications or dependencies. + * It is preferred to use the alternative keyword "__vector". + */ +#undef vector + /* * Compilation workaround for PPC64 when AltiVec is fully enabled, e.g. std=c11. * Otherwise there would be a type conflict between stdbool and altivec.