From: Tianhao Chai <cth451@gmail.com>
To: dev@dpdk.org
Cc: Tianhao Chai <cth451@gmail.com>
Subject: [PATCH] rte_dev: allow C-symbol-in-C++ dma operations
Date: Wed, 4 May 2022 23:39:35 -0500 [thread overview]
Message-ID: <20220505043935.GA312259@cth-desktop-dorm.onozuka.cth451.me> (raw)
[-- Attachment #1: Type: text/plain, Size: 1128 bytes --]
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 <cth451@gmail.com>
---
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 != NULL; \
dev = rte_dev_iterator_next(it))
-#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);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _RTE_DEV_H_ */
--
2.35.1
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next reply other threads:[~2022-05-05 4:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-05 4:39 Tianhao Chai [this message]
2022-05-05 9:00 ` Bruce Richardson
2022-05-05 9:53 ` David Marchand
2022-05-05 9:43 ` Tyler Retzlaff
2022-05-06 17:41 ` Morten Brørup
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220505043935.GA312259@cth-desktop-dorm.onozuka.cth451.me \
--to=cth451@gmail.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).