[1/1] mbuf: add extern "C" to rte_mbuf_dyn.h
Checks
Commit Message
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(+)
Comments
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?
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?
>
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?
> >
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?
> > >
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
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
>
>
@@ -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_ */