mbuf: add extern "C" to rte_mbuf_dyn.h
PATCH 1/1 mbuf: add extern "C" to rte_mbuf_dyn.h
The header was missing the extern "C" directive which causes name mangling of functions by C++ compilers, leading to linker errors complaining of undefined references to these functions.
--- lib/librte_mbuf/rte_mbuf_dyn.h | 9 +++++++++ 1 file changed, 9 insertions(+)
lib/librte_mbuf/rte_mbuf_dyn.h +9 -0
@@ -67,6 +67,11 @@*/ #include <sys/types.h> + +#ifdef __cplusplus +extern "C" { +#endif +/** * Maximum length of the dynamic field or flag string. */
@@ -326,4 +331,8 @@ int rte_mbuf_dyn_rx_timestamp_register(int *field_offset, uint64_t *rx_flag);__rte_experimental int rte_mbuf_dyn_tx_timestamp_register(int *field_offset, uint64_t *tx_flag); +#ifdef __cplusplus +}#endif + +#endif /* _RTE_MBUF_DYN_H_ */
Signature · 1 line
2.9.3
Quoted 5 lines · On Tue, 29 Dec 2020 12:41:44 -0700 Ashish Sadanandan…
The header was missing the extern "C" directive which causes name mangling of functions by C++ compilers, leading to linker errors complaining of undefined references to these functions.
Signed-off-by Ashish Sadanandan <[email protected]>
Could you add a Fixes tag please?
Hi Stephen,
Should I reference the commit that created rte_mbuf_dyn.h for the Fixes tag?
PS: this is my first time submitting a patch to DPDK, so forgive me if this is covered in the contributing doc, but I couldn't find anything that applied to this situation
Quoted 11 lines · Stephen Hemminger
Quoted 5 lines · On Tue, 29 Dec 2020 12:41:44 -0700 Ashish Sadanandan…
The header was missing the extern "C" directive which causes name mangling of functions by C++ compilers, leading to linker errors complaining of undefined references to these functions.
Signed-off-by Ashish Sadanandan <[email protected]>Could you add a Fixes tag please?
Hi Ashish,
Quoted 2 lines · Ashish Sadanandan
Hi Stephen,
Should I reference the commit that createdrte_mbuf_dyn.hfor the Fixes tag?
Yes, it should reference the patch that introduced the issue. In this case, it should be:
Can you please also change the title to start with "fix", for instance like this:
mbuf: fix inclusion from c++
You can also add "Cc: [email protected]" in the commit log.
Some documentation can be found in doc/guides/contributing/patches.rst
Thanks,
Olivier
Quoted 18 lines
PS: this is my first time submitting a patch to DPDK, so forgive me if this is covered in the contributing doc, but I couldn't find anything that applied to this situation
Quoted 11 lines · Stephen Hemminger
Quoted 5 lines · On Tue, 29 Dec 2020 12:41:44 -0700 Ashish Sadanandan…
The header was missing the extern "C" directive which causes name mangling of functions by C++ compilers, leading to linker errors complaining of undefined references to these functions.
Signed-off-by Ashish Sadanandan <[email protected]>Could you add a Fixes tag please?
Hi Olivier,
Quoted 8 lines · Olivier Matz
Hi Ashish,
Yes, it should reference the patch that introduced the issue. In this case, it should be:
Fixes 4958ca3a443a ("mbuf: support dynamic fields and flags")
Quoted 8 lines
Can you please also change the title to start with "fix", for instance like this:
mbuf: fix inclusion from c++
You can also add "Cc: [email protected]" in the commit log.
Some documentation can be found in
doc/guides/contributing/patches.rst
Thanks for the pointers. I've made the changes above. However I don't know if I'm using the message ID for --in-reply-to correctly, since I seem to be creating a new thread each time.
Thanks,
Ashish.
Quoted 23 lines
Thanks,
OlivierQuoted 18 lines
PS: this is my first time submitting a patch to DPDK, so forgive me if this is covered in the contributing doc, but I couldn't find anything that applied to this situation
Quoted 11 lines · Stephen Hemminger
Quoted 5 lines · On Tue, 29 Dec 2020 12:41:44 -0700 Ashish Sadanandan…
The header was missing the extern "C" directive which causes name mangling of functions by C++ compilers, leading to linker errors complaining of undefined references to these functions.
Signed-off-by Ashish Sadanandan <[email protected]>Could you add a Fixes tag please?
Quoted 17 lines · Ashish Sadanandan
Hi Olivier,
Quoted 13 lines · Olivier Matz
Hi Ashish,
Yes, it should reference the patch that introduced the issue. In this case, it should be:
Fixes 4958ca3a443a ("mbuf: support dynamic fields and flags")Can you please also change the title to start with "fix", for instance like this:
mbuf: fix inclusion from c++
Quoted 7 lines
Quoted 3 lines
You can also add "Cc: [email protected]" in the commit log.
Some documentation can be found in
doc/guides/contributing/patches.rstThanks for the pointers. I've made the changes above. However I don't know if I'm using the message ID for --in-reply-to correctly, since I seem to be creating a new thread each time.
You can get the message ID in various places.
I usually take the info from patchwork and update the previous patch state to Superseded at the same time.
So in your case, the v1 patch was:
http://patchwork.dpdk.org/patch/85878/
Message ID: [email protected]
So for the v2:
git send-email --to [email protected] --cc-cmd ./devtools/get-maintainer.sh --cc XXX --in-reply-to '[email protected]' v2-*.patch
Signature · 1 line
David Marchand
Hi David,
Quoted 36 lines · David Marchand
Quoted 4 lines · Ashish Sadanandan
Hi Olivier,
On Wed, Jan 6, 2021 at 6:21 AM Olivier Matz <[email protected]>
Quoted 4 lines · wrote:
Quoted 4 lines
Hi Ashish,
Yes, it should reference the patch that introduced the issue. In this
case,
Quoted 9 lines
Quoted 9 lines
it should be:
Fixes 4958ca3a443a ("mbuf: support dynamic fields and flags")Can you please also change the title to start with "fix", for instance like this:
mbuf: fix inclusion from c++
Quoted 7 lines
Quoted 3 lines
You can also add "Cc: [email protected]" in the commit log.
Some documentation can be found in
doc/guides/contributing/patches.rstThanks for the pointers. I've made the changes above. However I don't know if I'm using the message ID for --in-reply-to correctly, since I seem to be creating a new thread each time.
You can get the message ID in various places.
I usually take the info from patchwork and update the previous patch state to Superseded at the same time.So in your case, the v1 patch was:
http://patchwork.dpdk.org/patch/85878/
Quoted 8 lines
Message ID: [email protected]
So for the v2:
git send-email --to [email protected] --cc-cmd./devtools/get-maintainer.sh--cc XXX --in-reply-to '[email protected]' v2-*.patchThis is almost the exact command I ran (except for the --cc-cmd arg since
I don't have the Linux source tree cloned). Just tried it once more, but I think it created a new thread again! I don't get what I'm doing wrong and am terribly sorry for the spam I've been generating.
- Ashish
Quoted 5 lines
--
David Marchand
PATCH v2 1/1 mbuf: fix rte_mbuf_dyn.h inclusion from C++
In reply to Ashish SadanandanThe header was missing the extern "C" directive which causes name mangling of functions by C++ compilers, leading to linker errors complaining of undefined references to these functions.
---
v2:
* No functional change
* Add fixes tag with reference to commit that introduced the header
* CC [email protected]
lib/librte_mbuf/rte_mbuf_dyn.h | 9 +++++++++ 1 file changed, 9 insertions(+)
lib/librte_mbuf/rte_mbuf_dyn.h +9 -0
@@ -67,6 +67,11 @@*/ #include <sys/types.h> + +#ifdef __cplusplus +extern "C" { +#endif +/** * Maximum length of the dynamic field or flag string. */
@@ -326,4 +331,8 @@ int rte_mbuf_dyn_rx_timestamp_register(int *field_offset, uint64_t *rx_flag);__rte_experimental int rte_mbuf_dyn_tx_timestamp_register(int *field_offset, uint64_t *tx_flag); +#ifdef __cplusplus +}#endif + +#endif /* _RTE_MBUF_DYN_H_ */
Signature · 1 line
2.9.3
PATCH v2 1/1 mbuf: fix rte_mbuf_dyn.h inclusion from C++
In reply to Ashish SadanandanThe header was missing the extern "C" directive which causes name mangling of functions by C++ compilers, leading to linker errors complaining of undefined references to these functions.
---
v2:
* No functional change
* Add fixes tag with reference to commit that introduced the header
* CC [email protected]
lib/librte_mbuf/rte_mbuf_dyn.h | 9 +++++++++ 1 file changed, 9 insertions(+)
lib/librte_mbuf/rte_mbuf_dyn.h +9 -0
@@ -67,6 +67,11 @@*/ #include <sys/types.h> + +#ifdef __cplusplus +extern "C" { +#endif +/** * Maximum length of the dynamic field or flag string. */
@@ -326,4 +331,8 @@ int rte_mbuf_dyn_rx_timestamp_register(int *field_offset, uint64_t *rx_flag);__rte_experimental int rte_mbuf_dyn_tx_timestamp_register(int *field_offset, uint64_t *tx_flag); +#ifdef __cplusplus +}#endif + +#endif /* _RTE_MBUF_DYN_H_ */
Signature · 1 line
2.9.3
PATCH v2 1/1 mbuf: fix rte_mbuf_dyn.h inclusion from C++
In reply to Ashish SadanandanThe header was missing the extern "C" directive which causes name mangling of functions by C++ compilers, leading to linker errors complaining of undefined references to these functions.
---
v2:
* No functional change
* Add fixes tag with reference to commit that introduced the header
* CC [email protected]
lib/librte_mbuf/rte_mbuf_dyn.h | 9 +++++++++ 1 file changed, 9 insertions(+)
lib/librte_mbuf/rte_mbuf_dyn.h +9 -0
@@ -67,6 +67,11 @@*/ #include <sys/types.h> + +#ifdef __cplusplus +extern "C" { +#endif +/** * Maximum length of the dynamic field or flag string. */
@@ -326,4 +331,8 @@ int rte_mbuf_dyn_rx_timestamp_register(int *field_offset, uint64_t *rx_flag);__rte_experimental int rte_mbuf_dyn_tx_timestamp_register(int *field_offset, uint64_t *tx_flag); +#ifdef __cplusplus +}#endif + +#endif /* _RTE_MBUF_DYN_H_ */
Signature · 1 line
2.9.3