From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D1DE3A04FF; Thu, 5 May 2022 11:00:47 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B273740C35; Thu, 5 May 2022 11:00:47 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id 56E6E40042 for ; Thu, 5 May 2022 11:00:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1651741246; x=1683277246; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=o/iFKc4lE/zYKmyiyBKCoyUp1B81rQkotUAvW6987yY=; b=jWcrZA5+Njv5/vIhy948UyMUSgfNJbH3a8Y+qkcOh2ZqX7PeKbGr2LcY SGTmsil7+5tfqu/TAhlzJuOmWw176WtRi4aVV7aQSj2K/um3hQoRJ0cPP SaQIynDWq7p11qcqGYe9U3QvE3U+IXZlrWTkbIKO8iz8mPtWQlPgbNMBg 0XMSRLFNj/vNZbuZG6hJGc64XULsqLV2UAlaC10p+egISyBkqymqzcVLx 0/xuZ6BIYSvSlhs2joR/RhUije9FIVnZlI3ByFRLjprcj9Dj75snIM0Nc JpgB5oVlPYpGl9W37kfvl8GWxI14eHcXXg7bwbgLg6rLxjIB894X45dHF g==; X-IronPort-AV: E=McAfee;i="6400,9594,10337"; a="331035635" X-IronPort-AV: E=Sophos;i="5.91,200,1647327600"; d="asc'?scan'208";a="331035635" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 May 2022 02:00:45 -0700 X-IronPort-AV: E=Sophos;i="5.91,200,1647327600"; d="asc'?scan'208";a="585221171" Received: from bricha3-mobl.ger.corp.intel.com ([10.55.133.40]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 05 May 2022 02:00:44 -0700 Date: Thu, 5 May 2022 10:00:41 +0100 From: Bruce Richardson To: Tianhao Chai Cc: dev@dpdk.org Subject: Re: [PATCH] rte_dev: allow C-symbol-in-C++ dma operations Message-ID: References: <20220505043935.GA312259@cth-desktop-dorm.onozuka.cth451.me> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="nS0NpAjdw1CQU581" Content-Disposition: inline In-Reply-To: <20220505043935.GA312259@cth-desktop-dorm.onozuka.cth451.me> 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 --nS0NpAjdw1CQU581 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, May 04, 2022 at 11:39:35PM -0500, Tianhao Chai wrote: > Currently the "extern C" section ends right before rte_dev_dma_unmap > and other DMA function declarations, causing some C++ compilers to > produce C++ mangled symbols to rte_dev_dma_unmap instead of C symbols. > This leads to build failures later when linking a final executable > against this object. >=20 > The issue is observed on DPDK 22.03 and G++ 11. >=20 =46rom the git history I think the first offending commit is a753e53. Fixes: a753e53d517b ("eal: add device event monitor framework") > Signed-off-by: Tianhao Chai Acked-by: Bruce Richardson > --- > lib/eal/include/rte_dev.h | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) >=20 > diff --git a/lib/eal/include/rte_dev.h b/lib/eal/include/rte_dev.h > index 448a41cb0e..e6ff1218f9 100644 > --- a/lib/eal/include/rte_dev.h > +++ b/lib/eal/include/rte_dev.h > @@ -320,10 +320,6 @@ rte_dev_iterator_next(struct rte_dev_iterator *it); > dev !=3D NULL; \ > dev =3D rte_dev_iterator_next(it)) > =20 > -#ifdef __cplusplus > -} > -#endif > - > /** > * @warning > * @b EXPERIMENTAL: this API may change without prior notice > @@ -496,4 +492,8 @@ int > rte_dev_dma_unmap(struct rte_device *dev, void *addr, uint64_t iova, > size_t len); > =20 > +#ifdef __cplusplus > +} > +#endif > + > #endif /* _RTE_DEV_H_ */ > --=20 > 2.35.1 >=20 --nS0NpAjdw1CQU581 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEE7eIoYK42QEt4yrTrKWFgd5TuKvsFAmJzki0ACgkQKWFgd5Tu KvvDbRAAk77Xm4z10lykaVh2pdHdKwLMjpYP6Ov9VkqShjx845nP0Z8efSR04Pml SULuFyVhl4RNV/VS3McSDBR2pP2OfOaxl5gFBPnoXob8d+XwrfKTc6TQuMPpm2Hk 65Tt+TAfurN92wxvagiNIlT2xX0d+3dJnH4oDR9pqAdisHsVHZmyaqryWzCd8AXM FVh3i77TFfUVW4nv6RxrL2FCp8nzLUhAjJtcXqiUNrTqHa8kXxfcQaB/rBp2XEUe h0ByzCnwMNFqSNSBRo9J8XdRt1wtcK436bjdmXVSUdA0YkzzP3N0bdX67tBVBuMB bAPIMc0RJzWan0G03NdEEN7QL3DIgWIBMyDTTLs/UvYSJRndvEsLvwXnSJbHtRCm 74EKdpr49pFcBCmeS5ra1l41eVjBhJSNhz2jmnFMtyux96YgwOlpSpC/oyve5l8j glSZyJ8vqJmwmQmUM6GAMz84O6yvLQuq3wUZkcNUi0JNe3AjLUeF4tWUWKxkPIoE EoyYctYHLQgd/eY8uxegHM5Tfb1vgPmY6+Z2vvUuQs0ZiDLy20Odnt9wOVHk63UD KjO4QGab/2bltevUUI0KW+V9zQs9OJT96J7V3g7MV9A5em/sltwWOmDdLu65fLvH tY5t6O/9iFmck0YKOH8D/5LsItgD+NTguTaCwQNn3Bc2Hb9oWTQ= =jrMb -----END PGP SIGNATURE----- --nS0NpAjdw1CQU581--