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 4EDA1A00BE; Thu, 5 May 2022 06:39:41 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DC40640689; Thu, 5 May 2022 06:39:40 +0200 (CEST) Received: from mail-io1-f54.google.com (mail-io1-f54.google.com [209.85.166.54]) by mails.dpdk.org (Postfix) with ESMTP id 2742F40042 for ; Thu, 5 May 2022 06:39:39 +0200 (CEST) Received: by mail-io1-f54.google.com with SMTP id o190so3612447iof.10 for ; Wed, 04 May 2022 21:39:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:mime-version:content-disposition; bh=z0vomKX8ypUSvTR55XIWBwESikGjG3niii6sliFzbFc=; b=kb8MSio0fwG67kJmXwWZIP5stuZCFrAgskJahUxlI2GsqqX2B8Ea03Yw+/rD7td3nB zqaZFIycEpUJ7tUud2dHBMkjg+piQQUUtbN9DVbSrWywGRiqcDmvft8qfImlTgGJtDI8 XWLKsAHCvAn7BGSp3Bv8fJTC96RK1NRbZGqMQfe9KLd2bABaq3P4WDwlSbAIMZM1hfzy 5rg+q5hwx/GhES8dr5QXWXBpCIS1w+UY/rULcpxWAtQH8mBuSun96LyRetP7JoHM73B6 GB6tyAumZNdmer6HQn6WS+f5bg2suDOSpUVxRZnVVSjjrKVj00jqadomEfjVEz3GBEcr DAPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=z0vomKX8ypUSvTR55XIWBwESikGjG3niii6sliFzbFc=; b=BZaH2LzBub8eG1UovmXddKNve2umbv6tSxYt2p8oPLtqlGQvaJeL/NPhaSBK5pnDCp vpY6WKcwriRjg/WzGjJKJXVgFa/oZJLgm6IlC7ICQMD5Dbz0hPHuQNOuLVnbkYl9gHba nk4P7Ii1jL7YCRNN7nNIVoauUdyf+8KspYGTzBDRe4dnckfcHFiXn8DnI0zUSpiyYQ8e U04ZG0uOOQ/q+JLpOgR8rhjExcBUHHPsjvhlIagGyElhIeM12hUcxsXAi6k0brL8/eQa LvNjwrxAYktYYFHAHbIG4+KrsCg63Jvx6YW/tgFajlLwz/UNxMDIm8KKx+cuCNyDgyQV iX+A== X-Gm-Message-State: AOAM530w3WpF/GFNgy18uf4+kLYjAZQmwTcHpXPyv4rwmij9HqMh25TC Pr5/Sg3F1uvc5R2vfk2i3jCWGBGpwlU= X-Google-Smtp-Source: ABdhPJy6yJLCKU8uKejFFiYC1sNJzW7vLV7NkZmICJ62wiYiuc71OEotYGizMpC4GEfRs4avPQnt8w== X-Received: by 2002:a05:6602:2d0d:b0:659:aa9e:95a0 with SMTP id c13-20020a0566022d0d00b00659aa9e95a0mr9569756iow.106.1651725578279; Wed, 04 May 2022 21:39:38 -0700 (PDT) Received: from cth-desktop-dorm.onozuka.cth451.me ([2600:6c44:113f:8901:6f66:c6f8:91db:cfda]) by smtp.gmail.com with ESMTPSA id n18-20020a056638121200b0032ba5cbae2esm220018jas.144.2022.05.04.21.39.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 May 2022 21:39:37 -0700 (PDT) Date: Wed, 4 May 2022 23:39:35 -0500 From: Tianhao Chai To: dev@dpdk.org Cc: Tianhao Chai Subject: [PATCH] rte_dev: allow C-symbol-in-C++ dma operations Message-ID: <20220505043935.GA312259@cth-desktop-dorm.onozuka.cth451.me> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="PEIAKu/WMn1b1Hv9" Content-Disposition: inline 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 --PEIAKu/WMn1b1Hv9 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. The issue is observed on DPDK 22.03 and G++ 11. Signed-off-by: Tianhao Chai --- lib/eal/include/rte_dev.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 --PEIAKu/WMn1b1Hv9 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQSEpw/kxI2CHoPWNplrwXv80PB4YgUCYnNVBQAKCRBrwXv80PB4 YgEFAQD0WK8Xx8Rf6lntGY23wi2YCNwF7VWpUwrBmz3Di44KZQEAhxt4/U0CR1Ap 2rr7uet0cOYC/y9SxrVmWGgM2dHG1g8= =kFO2 -----END PGP SIGNATURE----- --PEIAKu/WMn1b1Hv9--