* [dpdk-dev] [PATCH 1/1] mbuf: add extern "C" to rte_mbuf_dyn.h
@ 2020-12-29 19:41 Ashish Sadanandan
2020-12-29 20:10 ` Stephen Hemminger
` (3 more replies)
0 siblings, 4 replies; 10+ messages in thread
From: Ashish Sadanandan @ 2020-12-29 19:41 UTC (permalink / raw)
To: olivier.matz; +Cc: dev, 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 <ashish.sadanandan@gmail.com>
---
lib/librte_mbuf/rte_mbuf_dyn.h | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/lib/librte_mbuf/rte_mbuf_dyn.h b/lib/librte_mbuf/rte_mbuf_dyn.h
index d88e7ba..fc4eee7 100644
--- a/lib/librte_mbuf/rte_mbuf_dyn.h
+++ b/lib/librte_mbuf/rte_mbuf_dyn.h
@@ -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_ */
--
2.9.3
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [dpdk-dev] [PATCH 1/1] mbuf: add extern "C" to rte_mbuf_dyn.h
2020-12-29 19:41 [dpdk-dev] [PATCH 1/1] mbuf: add extern "C" to rte_mbuf_dyn.h Ashish Sadanandan
@ 2020-12-29 20:10 ` Stephen Hemminger
2020-12-29 20:22 ` Ashish Sadanandan
2021-01-07 1:38 ` [dpdk-dev] [PATCH v2 1/1] mbuf: fix rte_mbuf_dyn.h inclusion from C++ Ashish Sadanandan
` (2 subsequent siblings)
3 siblings, 1 reply; 10+ messages in thread
From: Stephen Hemminger @ 2020-12-29 20:10 UTC (permalink / raw)
To: Ashish Sadanandan; +Cc: olivier.matz, dev
On Tue, 29 Dec 2020 12:41:44 -0700
Ashish Sadanandan <ashish.sadanandan@gmail.com> wrote:
> 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 <ashish.sadanandan@gmail.com>
Could you add a Fixes tag please?
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [dpdk-dev] [PATCH 1/1] mbuf: add extern "C" to rte_mbuf_dyn.h
2020-12-29 20:10 ` Stephen Hemminger
@ 2020-12-29 20:22 ` Ashish Sadanandan
2021-01-06 13:21 ` Olivier Matz
0 siblings, 1 reply; 10+ messages in thread
From: Ashish Sadanandan @ 2020-12-29 20:22 UTC (permalink / raw)
To: stephen; +Cc: olivier.matz, dev
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
On Tue, Dec 29, 2020 at 1:10 PM Stephen Hemminger <
stephen@networkplumber.org> wrote:
> On Tue, 29 Dec 2020 12:41:44 -0700
> Ashish Sadanandan <ashish.sadanandan@gmail.com> wrote:
>
> > 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 <ashish.sadanandan@gmail.com>
>
> Could you add a Fixes tag please?
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [dpdk-dev] [PATCH 1/1] mbuf: add extern "C" to rte_mbuf_dyn.h
2020-12-29 20:22 ` Ashish Sadanandan
@ 2021-01-06 13:21 ` Olivier Matz
2021-01-07 1:42 ` Ashish Sadanandan
0 siblings, 1 reply; 10+ messages in thread
From: Olivier Matz @ 2021-01-06 13:21 UTC (permalink / raw)
To: Ashish Sadanandan; +Cc: stephen, dev
Hi Ashish,
On Tue, Dec 29, 2020 at 01:22:04PM -0700, Ashish Sadanandan wrote:
> Hi Stephen,
> Should I reference the commit that created rte_mbuf_dyn.h for the Fixes tag?
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++
You can also add "Cc: stable@dpdk.org" in the commit log.
Some documentation can be found in doc/guides/contributing/patches.rst
Thanks,
Olivier
> 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
>
> On Tue, Dec 29, 2020 at 1:10 PM Stephen Hemminger <
> stephen@networkplumber.org> wrote:
>
> > On Tue, 29 Dec 2020 12:41:44 -0700
> > Ashish Sadanandan <ashish.sadanandan@gmail.com> wrote:
> >
> > > 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 <ashish.sadanandan@gmail.com>
> >
> > Could you add a Fixes tag please?
> >
^ permalink raw reply [flat|nested] 10+ messages in thread
* [dpdk-dev] [PATCH v2 1/1] mbuf: fix rte_mbuf_dyn.h inclusion from C++
2020-12-29 19:41 [dpdk-dev] [PATCH 1/1] mbuf: add extern "C" to rte_mbuf_dyn.h Ashish Sadanandan
2020-12-29 20:10 ` Stephen Hemminger
@ 2021-01-07 1:38 ` Ashish Sadanandan
2021-01-07 6:16 ` Ashish Sadanandan
2021-01-07 17:15 ` Ashish Sadanandan
3 siblings, 0 replies; 10+ messages in thread
From: Ashish Sadanandan @ 2021-01-07 1:38 UTC (permalink / raw)
To: olivier.matz; +Cc: dev, Ashish Sadanandan, stable
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.
Fixes: 4958ca3a443a ("mbuf: support dynamic fields and flags")
Cc: olivier.matz@6wind.com
Cc: stable@dpdk.org
Signed-off-by: Ashish Sadanandan <ashish.sadanandan@gmail.com>
---
v2:
* No functional change
* Add fixes tag with reference to commit that introduced the header
* CC stable@dpdk.org
lib/librte_mbuf/rte_mbuf_dyn.h | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/lib/librte_mbuf/rte_mbuf_dyn.h b/lib/librte_mbuf/rte_mbuf_dyn.h
index d88e7ba..fc4eee7 100644
--- a/lib/librte_mbuf/rte_mbuf_dyn.h
+++ b/lib/librte_mbuf/rte_mbuf_dyn.h
@@ -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_ */
--
2.9.3
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [dpdk-dev] [PATCH 1/1] mbuf: add extern "C" to rte_mbuf_dyn.h
2021-01-06 13:21 ` Olivier Matz
@ 2021-01-07 1:42 ` Ashish Sadanandan
2021-01-07 8:01 ` David Marchand
0 siblings, 1 reply; 10+ messages in thread
From: Ashish Sadanandan @ 2021-01-07 1:42 UTC (permalink / raw)
To: Olivier Matz; +Cc: stephen, dev
Hi Olivier,
On Wed, Jan 6, 2021 at 6:21 AM Olivier Matz <olivier.matz@6wind.com> wrote:
>
> 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++
>
> You can also add "Cc: stable@dpdk.org" 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.
>
> Thanks,
> Olivier
>
>
> > 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
> >
> > On Tue, Dec 29, 2020 at 1:10 PM Stephen Hemminger <
> > stephen@networkplumber.org> wrote:
> >
> > > On Tue, 29 Dec 2020 12:41:44 -0700
> > > Ashish Sadanandan <ashish.sadanandan@gmail.com> wrote:
> > >
> > > > 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 <ashish.sadanandan@gmail.com>
> > >
> > > Could you add a Fixes tag please?
> > >
^ permalink raw reply [flat|nested] 10+ messages in thread
* [dpdk-dev] [PATCH v2 1/1] mbuf: fix rte_mbuf_dyn.h inclusion from C++
2020-12-29 19:41 [dpdk-dev] [PATCH 1/1] mbuf: add extern "C" to rte_mbuf_dyn.h Ashish Sadanandan
2020-12-29 20:10 ` Stephen Hemminger
2021-01-07 1:38 ` [dpdk-dev] [PATCH v2 1/1] mbuf: fix rte_mbuf_dyn.h inclusion from C++ Ashish Sadanandan
@ 2021-01-07 6:16 ` Ashish Sadanandan
2021-01-07 17:15 ` Ashish Sadanandan
3 siblings, 0 replies; 10+ messages in thread
From: Ashish Sadanandan @ 2021-01-07 6:16 UTC (permalink / raw)
To: olivier.matz; +Cc: dev, Ashish Sadanandan, stable
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.
Fixes: 4958ca3a443a ("mbuf: support dynamic fields and flags")
Cc: olivier.matz@6wind.com
Cc: stable@dpdk.org
Signed-off-by: Ashish Sadanandan <ashish.sadanandan@gmail.com>
---
v2:
* No functional change
* Add fixes tag with reference to commit that introduced the header
* CC stable@dpdk.org
lib/librte_mbuf/rte_mbuf_dyn.h | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/lib/librte_mbuf/rte_mbuf_dyn.h b/lib/librte_mbuf/rte_mbuf_dyn.h
index d88e7ba..fc4eee7 100644
--- a/lib/librte_mbuf/rte_mbuf_dyn.h
+++ b/lib/librte_mbuf/rte_mbuf_dyn.h
@@ -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_ */
--
2.9.3
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [dpdk-dev] [PATCH 1/1] mbuf: add extern "C" to rte_mbuf_dyn.h
2021-01-07 1:42 ` Ashish Sadanandan
@ 2021-01-07 8:01 ` David Marchand
2021-01-07 17:20 ` Ashish Sadanandan
0 siblings, 1 reply; 10+ messages in thread
From: David Marchand @ 2021-01-07 8:01 UTC (permalink / raw)
To: Ashish Sadanandan; +Cc: Olivier Matz, Stephen Hemminger, dev
On Thu, Jan 7, 2021 at 2:42 AM Ashish Sadanandan
<ashish.sadanandan@gmail.com> wrote:
>
> Hi Olivier,
>
> On Wed, Jan 6, 2021 at 6:21 AM Olivier Matz <olivier.matz@6wind.com> wrote:
> >
> > 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++
> >
> > You can also add "Cc: stable@dpdk.org" 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.
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: 20201229194144.17824-1-ashish.sadanandan@gmail.com
So for the v2:
git send-email --to dev@dpdk.org --cc-cmd ./devtools/get-maintainer.sh
--cc XXX --in-reply-to
'20201229194144.17824-1-ashish.sadanandan@gmail.com' v2-*.patch
--
David Marchand
^ permalink raw reply [flat|nested] 10+ messages in thread
* [dpdk-dev] [PATCH v2 1/1] mbuf: fix rte_mbuf_dyn.h inclusion from C++
2020-12-29 19:41 [dpdk-dev] [PATCH 1/1] mbuf: add extern "C" to rte_mbuf_dyn.h Ashish Sadanandan
` (2 preceding siblings ...)
2021-01-07 6:16 ` Ashish Sadanandan
@ 2021-01-07 17:15 ` Ashish Sadanandan
3 siblings, 0 replies; 10+ messages in thread
From: Ashish Sadanandan @ 2021-01-07 17:15 UTC (permalink / raw)
To: dev; +Cc: olivier.matz, Ashish Sadanandan, stable
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.
Fixes: 4958ca3a443a ("mbuf: support dynamic fields and flags")
Cc: olivier.matz@6wind.com
Cc: stable@dpdk.org
Signed-off-by: Ashish Sadanandan <ashish.sadanandan@gmail.com>
---
v2:
* No functional change
* Add fixes tag with reference to commit that introduced the header
* CC stable@dpdk.org
lib/librte_mbuf/rte_mbuf_dyn.h | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/lib/librte_mbuf/rte_mbuf_dyn.h b/lib/librte_mbuf/rte_mbuf_dyn.h
index d88e7ba..fc4eee7 100644
--- a/lib/librte_mbuf/rte_mbuf_dyn.h
+++ b/lib/librte_mbuf/rte_mbuf_dyn.h
@@ -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_ */
--
2.9.3
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [dpdk-dev] [PATCH 1/1] mbuf: add extern "C" to rte_mbuf_dyn.h
2021-01-07 8:01 ` David Marchand
@ 2021-01-07 17:20 ` Ashish Sadanandan
0 siblings, 0 replies; 10+ messages in thread
From: Ashish Sadanandan @ 2021-01-07 17:20 UTC (permalink / raw)
To: David Marchand; +Cc: Olivier Matz, Stephen Hemminger, dev
Hi David,
On Thu, Jan 7, 2021 at 1:02 AM David Marchand <david.marchand@redhat.com>
wrote:
> On Thu, Jan 7, 2021 at 2:42 AM Ashish Sadanandan
> <ashish.sadanandan@gmail.com> wrote:
> >
> > Hi Olivier,
> >
> > On Wed, Jan 6, 2021 at 6:21 AM Olivier Matz <olivier.matz@6wind.com>
> wrote:
> > >
> > > 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++
> > >
> > > You can also add "Cc: stable@dpdk.org" 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.
>
> 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: 20201229194144.17824-1-ashish.sadanandan@gmail.com
>
> So for the v2:
> git send-email --to dev@dpdk.org --cc-cmd ./devtools/get-maintainer.sh
> --cc XXX --in-reply-to
> '20201229194144.17824-1-ashish.sadanandan@gmail.com' v2-*.patch
>
> This 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
>
> --
> David Marchand
>
>
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2021-01-07 17:20 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-29 19:41 [dpdk-dev] [PATCH 1/1] mbuf: add extern "C" to rte_mbuf_dyn.h Ashish Sadanandan
2020-12-29 20:10 ` Stephen Hemminger
2020-12-29 20:22 ` Ashish Sadanandan
2021-01-06 13:21 ` Olivier Matz
2021-01-07 1:42 ` Ashish Sadanandan
2021-01-07 8:01 ` David Marchand
2021-01-07 17:20 ` Ashish Sadanandan
2021-01-07 1:38 ` [dpdk-dev] [PATCH v2 1/1] mbuf: fix rte_mbuf_dyn.h inclusion from C++ Ashish Sadanandan
2021-01-07 6:16 ` Ashish Sadanandan
2021-01-07 17:15 ` Ashish Sadanandan
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).