DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [dpdk.org] [PATCH] fib: add "C" extern linkage for C++ programs
@ 2020-03-16 18:42 Muhammad Asim Jamshed
  2020-03-25 13:21 ` David Marchand
  2020-03-26 10:40 ` Medvedkin, Vladimir
  0 siblings, 2 replies; 4+ messages in thread
From: Muhammad Asim Jamshed @ 2020-03-16 18:42 UTC (permalink / raw)
  To: dev; +Cc: muhammad.jamshed, saikrishna.edupuganti, asim.jamshed

This patch allows C++ programs to use librte_fib library routines.
Previously C++ programs were not able to link this library and programs
would fail to get linked. With this patch compilation and linking
will be successful.

Signed-off-by: Muhammad Asim Jamshed <asim.jamshed@gmail.com>
Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
---
 lib/librte_fib/rte_fib.h  | 8 ++++++++
 lib/librte_fib/rte_fib6.h | 8 ++++++++
 2 files changed, 16 insertions(+)

diff --git a/lib/librte_fib/rte_fib.h b/lib/librte_fib/rte_fib.h
index d06c5ef55..af3bbf07e 100644
--- a/lib/librte_fib/rte_fib.h
+++ b/lib/librte_fib/rte_fib.h
@@ -14,6 +14,10 @@
 
 #include <rte_compat.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct rte_fib;
 struct rte_rib;
 
@@ -185,4 +189,8 @@ __rte_experimental
 struct rte_rib *
 rte_fib_get_rib(struct rte_fib *fib);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _RTE_FIB_H_ */
diff --git a/lib/librte_fib/rte_fib6.h b/lib/librte_fib/rte_fib6.h
index 426870403..66c71c84c 100644
--- a/lib/librte_fib/rte_fib6.h
+++ b/lib/librte_fib/rte_fib6.h
@@ -14,6 +14,10 @@
 
 #include <rte_compat.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define RTE_FIB6_IPV6_ADDR_SIZE		16
 /** Maximum depth value possible for IPv6 FIB. */
 #define RTE_FIB6_MAXDEPTH       128
@@ -190,4 +194,8 @@ __rte_experimental
 struct rte_rib6 *
 rte_fib6_get_rib(struct rte_fib6 *fib);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _RTE_FIB6_H_ */
-- 
2.17.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [dpdk.org] [PATCH] fib: add "C" extern linkage for C++ programs
  2020-03-16 18:42 [dpdk-dev] [dpdk.org] [PATCH] fib: add "C" extern linkage for C++ programs Muhammad Asim Jamshed
@ 2020-03-25 13:21 ` David Marchand
  2020-04-10  9:04   ` David Marchand
  2020-03-26 10:40 ` Medvedkin, Vladimir
  1 sibling, 1 reply; 4+ messages in thread
From: David Marchand @ 2020-03-25 13:21 UTC (permalink / raw)
  To: Muhammad Asim Jamshed
  Cc: dev, muhammad.jamshed, saikrishna.edupuganti, Vladimir Medvedkin

Cc: maintainer.

On Mon, Mar 16, 2020 at 8:22 PM Muhammad Asim Jamshed
<asim.jamshed@gmail.com> wrote:
>
> This patch allows C++ programs to use librte_fib library routines.
> Previously C++ programs were not able to link this library and programs
> would fail to get linked. With this patch compilation and linking
> will be successful.
>
> Signed-off-by: Muhammad Asim Jamshed <asim.jamshed@gmail.com>
> Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
> ---
>  lib/librte_fib/rte_fib.h  | 8 ++++++++
>  lib/librte_fib/rte_fib6.h | 8 ++++++++
>  2 files changed, 16 insertions(+)
>
> diff --git a/lib/librte_fib/rte_fib.h b/lib/librte_fib/rte_fib.h
> index d06c5ef55..af3bbf07e 100644
> --- a/lib/librte_fib/rte_fib.h
> +++ b/lib/librte_fib/rte_fib.h
> @@ -14,6 +14,10 @@
>
>  #include <rte_compat.h>
>
> +#ifdef __cplusplus
> +extern "C" {
> +#endif
> +
>  struct rte_fib;
>  struct rte_rib;
>
> @@ -185,4 +189,8 @@ __rte_experimental
>  struct rte_rib *
>  rte_fib_get_rib(struct rte_fib *fib);
>
> +#ifdef __cplusplus
> +}
> +#endif
> +
>  #endif /* _RTE_FIB_H_ */
> diff --git a/lib/librte_fib/rte_fib6.h b/lib/librte_fib/rte_fib6.h
> index 426870403..66c71c84c 100644
> --- a/lib/librte_fib/rte_fib6.h
> +++ b/lib/librte_fib/rte_fib6.h
> @@ -14,6 +14,10 @@
>
>  #include <rte_compat.h>
>
> +#ifdef __cplusplus
> +extern "C" {
> +#endif
> +
>  #define RTE_FIB6_IPV6_ADDR_SIZE                16
>  /** Maximum depth value possible for IPv6 FIB. */
>  #define RTE_FIB6_MAXDEPTH       128
> @@ -190,4 +194,8 @@ __rte_experimental
>  struct rte_rib6 *
>  rte_fib6_get_rib(struct rte_fib6 *fib);
>
> +#ifdef __cplusplus
> +}
> +#endif
> +
>  #endif /* _RTE_FIB6_H_ */
> --
> 2.17.1
>

Reviewed-by: David Marchand <david.marchand@redhat.com>


-- 
David Marchand


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [dpdk.org] [PATCH] fib: add "C" extern linkage for C++ programs
  2020-03-16 18:42 [dpdk-dev] [dpdk.org] [PATCH] fib: add "C" extern linkage for C++ programs Muhammad Asim Jamshed
  2020-03-25 13:21 ` David Marchand
@ 2020-03-26 10:40 ` Medvedkin, Vladimir
  1 sibling, 0 replies; 4+ messages in thread
From: Medvedkin, Vladimir @ 2020-03-26 10:40 UTC (permalink / raw)
  To: Muhammad Asim Jamshed, dev; +Cc: muhammad.jamshed, saikrishna.edupuganti

On 16/03/2020 18:42, Muhammad Asim Jamshed wrote:
> This patch allows C++ programs to use librte_fib library routines.
> Previously C++ programs were not able to link this library and programs
> would fail to get linked. With this patch compilation and linking
> will be successful.
>
> Signed-off-by: Muhammad Asim Jamshed <asim.jamshed@gmail.com>
> Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
> ---
>   lib/librte_fib/rte_fib.h  | 8 ++++++++
>   lib/librte_fib/rte_fib6.h | 8 ++++++++
>   2 files changed, 16 insertions(+)
>
> diff --git a/lib/librte_fib/rte_fib.h b/lib/librte_fib/rte_fib.h
> index d06c5ef55..af3bbf07e 100644
> --- a/lib/librte_fib/rte_fib.h
> +++ b/lib/librte_fib/rte_fib.h
> @@ -14,6 +14,10 @@
>   
>   #include <rte_compat.h>
>   
> +#ifdef __cplusplus
> +extern "C" {
> +#endif
> +
>   struct rte_fib;
>   struct rte_rib;
>   
> @@ -185,4 +189,8 @@ __rte_experimental
>   struct rte_rib *
>   rte_fib_get_rib(struct rte_fib *fib);
>   
> +#ifdef __cplusplus
> +}
> +#endif
> +
>   #endif /* _RTE_FIB_H_ */
> diff --git a/lib/librte_fib/rte_fib6.h b/lib/librte_fib/rte_fib6.h
> index 426870403..66c71c84c 100644
> --- a/lib/librte_fib/rte_fib6.h
> +++ b/lib/librte_fib/rte_fib6.h
> @@ -14,6 +14,10 @@
>   
>   #include <rte_compat.h>
>   
> +#ifdef __cplusplus
> +extern "C" {
> +#endif
> +
>   #define RTE_FIB6_IPV6_ADDR_SIZE		16
>   /** Maximum depth value possible for IPv6 FIB. */
>   #define RTE_FIB6_MAXDEPTH       128
> @@ -190,4 +194,8 @@ __rte_experimental
>   struct rte_rib6 *
>   rte_fib6_get_rib(struct rte_fib6 *fib);
>   
> +#ifdef __cplusplus
> +}
> +#endif
> +
>   #endif /* _RTE_FIB6_H_ */


Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>

-- 
Regards,
Vladimir


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [dpdk.org] [PATCH] fib: add "C" extern linkage for C++ programs
  2020-03-25 13:21 ` David Marchand
@ 2020-04-10  9:04   ` David Marchand
  0 siblings, 0 replies; 4+ messages in thread
From: David Marchand @ 2020-04-10  9:04 UTC (permalink / raw)
  To: Muhammad Asim Jamshed; +Cc: dev, saikrishna.edupuganti, Vladimir Medvedkin

On Wed, Mar 25, 2020 at 2:21 PM David Marchand
<david.marchand@redhat.com> wrote:
> On Mon, Mar 16, 2020 at 8:22 PM Muhammad Asim Jamshed
> <asim.jamshed@gmail.com> wrote:
> >
> > This patch allows C++ programs to use librte_fib library routines.
> > Previously C++ programs were not able to link this library and programs
> > would fail to get linked. With this patch compilation and linking
> > will be successful.

Fixes: 39e927248416 ("fib: add FIB library")
Fixes: 40d41a8a7b34 ("fib: support IPv6")
Cc: stable@dpdk.org

> >
> > Signed-off-by: Muhammad Asim Jamshed <asim.jamshed@gmail.com>
> > Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
> Reviewed-by: David Marchand <david.marchand@redhat.com>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>

Applied, thanks.

-- 
David Marchand


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-04-10  9:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-16 18:42 [dpdk-dev] [dpdk.org] [PATCH] fib: add "C" extern linkage for C++ programs Muhammad Asim Jamshed
2020-03-25 13:21 ` David Marchand
2020-04-10  9:04   ` David Marchand
2020-03-26 10:40 ` Medvedkin, Vladimir

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).