linux-dpdk: porting "de-couple abi compatibility from shared lib"

Message ID 1477323489-1643-1-git-send-email-balakrishna.garapati@linaro.org
State New
Headers show

Commit Message

Krishna Garapati Oct. 24, 2016, 3:38 p.m.
porting f83b71e6a9c685227615455df1f9e4fefeff19ae

Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org>
---

 Note: This patch should be applied after the fallowing patch set
       "move inline files to plat subdirectory"
       "harmonize inline support with linux-generic"

 platform/linux-dpdk/.gitignore                        |  2 +-
 platform/linux-dpdk/Makefile.am                       |  1 +
 .../odp/api/plat/{inlines.h.in => static_inline.h.in} | 19 +++++++++----------
 platform/linux-dpdk/m4/configure.m4                   |  3 +--
 4 files changed, 12 insertions(+), 13 deletions(-)
 rename platform/linux-dpdk/include/odp/api/plat/{inlines.h.in => static_inline.h.in} (58%)

--
1.9.1

Comments

Elo, Matias (Nokia - FI/Espoo) Oct. 25, 2016, 11:14 a.m. | #1
After applying this patch build fails with the following error:

  CC       ../linux-generic/odp_atomic.lo
In file included from ../linux-generic/odp_atomic.c:7:0:
./include/odp/api/atomic.h:27:34: fatal error: odp/api/plat/inlines.h: No such file or directory
compilation terminated

I applied the patches mentioned in the commit notes beforehand.

-Matias


> On 24 Oct 2016, at 18.38, Balakrishna Garapati <balakrishna.garapati@linaro.org> wrote:
> 
> porting f83b71e6a9c685227615455df1f9e4fefeff19ae
> 
> Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org>
> ---
> 
> Note: This patch should be applied after the fallowing patch set
>       "move inline files to plat subdirectory"
>       "harmonize inline support with linux-generic"
> 
> platform/linux-dpdk/.gitignore                        |  2 +-
> platform/linux-dpdk/Makefile.am                       |  1 +
> .../odp/api/plat/{inlines.h.in => static_inline.h.in} | 19 +++++++++----------
> platform/linux-dpdk/m4/configure.m4                   |  3 +--
> 4 files changed, 12 insertions(+), 13 deletions(-)
> rename platform/linux-dpdk/include/odp/api/plat/{inlines.h.in => static_inline.h.in} (58%)
> 
> diff --git a/platform/linux-dpdk/.gitignore b/platform/linux-dpdk/.gitignore
> index 654e50c..909756a 100644
> --- a/platform/linux-dpdk/.gitignore
> +++ b/platform/linux-dpdk/.gitignore
> @@ -1 +1 @@
> -include/odp/api/plat/inlines.h
> \ No newline at end of file
> +include/odp/api/plat/static_inline.h
> diff --git a/platform/linux-dpdk/Makefile.am b/platform/linux-dpdk/Makefile.am
> index 1c6295d..33a3b40 100644
> --- a/platform/linux-dpdk/Makefile.am
> +++ b/platform/linux-dpdk/Makefile.am
> @@ -78,6 +78,7 @@ odpapiinclude_HEADERS = \
> 
> odpapiplatincludedir= $(includedir)/odp/api/plat
> odpapiplatinclude_HEADERS = \
> +		  $(builddir)/include/odp/api/plat/static_inline.h \
> 		  $(srcdir)/include/odp/api/plat/atomic_types.h \
> 		  $(srcdir)/include/odp/api/plat/barrier_types.h \
> 		  $(srcdir)/include/odp/api/plat/buffer_types.h \
> diff --git a/platform/linux-dpdk/include/odp/api/plat/inlines.h.in b/platform/linux-dpdk/include/odp/api/plat/static_inline.h.in
> similarity index 58%
> rename from platform/linux-dpdk/include/odp/api/plat/inlines.h.in
> rename to platform/linux-dpdk/include/odp/api/plat/static_inline.h.in
> index 43e542b..acee5f3 100644
> --- a/platform/linux-dpdk/include/odp/api/plat/inlines.h.in
> +++ b/platform/linux-dpdk/include/odp/api/plat/static_inline.h.in
> @@ -7,27 +7,26 @@
> /**
>  * @file
>  *
> - * ODP packet inline functions
> + * Macro for static inline functions
>  */
> 
> -#ifndef ODP_PLAT_INLINES_H_
> -#define ODP_PLAT_INLINES_H_
> +#ifndef ODP_PLAT_STATIC_INLINE_H_
> +#define ODP_PLAT_STATIC_INLINE_H_
> 
> #ifdef __cplusplus
> extern "C" {
> #endif
> 
> -#define @_ODP_INLINES@
> -
> -#ifdef _ODP_INLINES
> -#define _STATIC static inline
> -#else
> +#if @ODP_ABI_COMPAT@
> +#define ODP_ABI_COMPAT 1
> #define _STATIC
> +#else
> +#define ODP_ABI_COMPAT 0
> +#define _STATIC static inline
> #endif
> 
> #ifdef __cplusplus
> }
> #endif
> 
> -
> -#endif /* ODP_PLAT_INLINES_H_ */
> +#endif
> diff --git a/platform/linux-dpdk/m4/configure.m4 b/platform/linux-dpdk/m4/configure.m4
> index 6807de4..fb50841 100644
> --- a/platform/linux-dpdk/m4/configure.m4
> +++ b/platform/linux-dpdk/m4/configure.m4
> @@ -75,5 +75,4 @@ LDFLAGS=$OLD_LDFLAGS
> CPPFLAGS=$OLD_CPPFLAGS
> 
> AC_CONFIG_FILES([platform/linux-dpdk/Makefile
> -		 platform/linux-dpdk/include/odp/api/plat/inlines.h])
> -
> +		 platform/linux-dpdk/include/odp/api/plat/static_inline.h])
> --
> 1.9.1
> 
> _______________________________________________
> lng-odp-dpdk mailing list
> lng-odp-dpdk@lists.linaro.org
> https://lists.linaro.org/mailman/listinfo/lng-odp-dpdk
Krishna Garapati Oct. 25, 2016, 12:09 p.m. | #2
I created the patches on top of a git merge from latest odp. I need to send
that as well in order to be able to build. I should have mentioned that. I
will try to send out that soon.

/Krishna

On 25 October 2016 at 13:14, Elo, Matias (Nokia - FI/Espoo) <
matias.elo@nokia-bell-labs.com> wrote:

> After applying this patch build fails with the following error:
>
>   CC       ../linux-generic/odp_atomic.lo
> In file included from ../linux-generic/odp_atomic.c:7:0:
> ./include/odp/api/atomic.h:27:34: fatal error: odp/api/plat/inlines.h: No
> such file or directory
> compilation terminated
>
> I applied the patches mentioned in the commit notes beforehand.
>
> -Matias
>
>
> > On 24 Oct 2016, at 18.38, Balakrishna Garapati <
> balakrishna.garapati@linaro.org> wrote:
> >
> > porting f83b71e6a9c685227615455df1f9e4fefeff19ae
> >
> > Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org>
> > ---
> >
> > Note: This patch should be applied after the fallowing patch set
> >       "move inline files to plat subdirectory"
> >       "harmonize inline support with linux-generic"
> >
> > platform/linux-dpdk/.gitignore                        |  2 +-
> > platform/linux-dpdk/Makefile.am                       |  1 +
> > .../odp/api/plat/{inlines.h.in => static_inline.h.in} | 19
> +++++++++----------
> > platform/linux-dpdk/m4/configure.m4                   |  3 +--
> > 4 files changed, 12 insertions(+), 13 deletions(-)
> > rename platform/linux-dpdk/include/odp/api/plat/{inlines.h.in =>
> static_inline.h.in} (58%)
> >
> > diff --git a/platform/linux-dpdk/.gitignore b/platform/linux-dpdk/.
> gitignore
> > index 654e50c..909756a 100644
> > --- a/platform/linux-dpdk/.gitignore
> > +++ b/platform/linux-dpdk/.gitignore
> > @@ -1 +1 @@
> > -include/odp/api/plat/inlines.h
> > \ No newline at end of file
> > +include/odp/api/plat/static_inline.h
> > diff --git a/platform/linux-dpdk/Makefile.am b/platform/linux-dpdk/
> Makefile.am
> > index 1c6295d..33a3b40 100644
> > --- a/platform/linux-dpdk/Makefile.am
> > +++ b/platform/linux-dpdk/Makefile.am
> > @@ -78,6 +78,7 @@ odpapiinclude_HEADERS = \
> >
> > odpapiplatincludedir= $(includedir)/odp/api/plat
> > odpapiplatinclude_HEADERS = \
> > +               $(builddir)/include/odp/api/plat/static_inline.h \
> >                 $(srcdir)/include/odp/api/plat/atomic_types.h \
> >                 $(srcdir)/include/odp/api/plat/barrier_types.h \
> >                 $(srcdir)/include/odp/api/plat/buffer_types.h \
> > diff --git a/platform/linux-dpdk/include/odp/api/plat/inlines.h.in
> b/platform/linux-dpdk/include/odp/api/plat/static_inline.h.in
> > similarity index 58%
> > rename from platform/linux-dpdk/include/odp/api/plat/inlines.h.in
> > rename to platform/linux-dpdk/include/odp/api/plat/static_inline.h.in
> > index 43e542b..acee5f3 100644
> > --- a/platform/linux-dpdk/include/odp/api/plat/inlines.h.in
> > +++ b/platform/linux-dpdk/include/odp/api/plat/static_inline.h.in
> > @@ -7,27 +7,26 @@
> > /**
> >  * @file
> >  *
> > - * ODP packet inline functions
> > + * Macro for static inline functions
> >  */
> >
> > -#ifndef ODP_PLAT_INLINES_H_
> > -#define ODP_PLAT_INLINES_H_
> > +#ifndef ODP_PLAT_STATIC_INLINE_H_
> > +#define ODP_PLAT_STATIC_INLINE_H_
> >
> > #ifdef __cplusplus
> > extern "C" {
> > #endif
> >
> > -#define @_ODP_INLINES@
> > -
> > -#ifdef _ODP_INLINES
> > -#define _STATIC static inline
> > -#else
> > +#if @ODP_ABI_COMPAT@
> > +#define ODP_ABI_COMPAT 1
> > #define _STATIC
> > +#else
> > +#define ODP_ABI_COMPAT 0
> > +#define _STATIC static inline
> > #endif
> >
> > #ifdef __cplusplus
> > }
> > #endif
> >
> > -
> > -#endif /* ODP_PLAT_INLINES_H_ */
> > +#endif
> > diff --git a/platform/linux-dpdk/m4/configure.m4
> b/platform/linux-dpdk/m4/configure.m4
> > index 6807de4..fb50841 100644
> > --- a/platform/linux-dpdk/m4/configure.m4
> > +++ b/platform/linux-dpdk/m4/configure.m4
> > @@ -75,5 +75,4 @@ LDFLAGS=$OLD_LDFLAGS
> > CPPFLAGS=$OLD_CPPFLAGS
> >
> > AC_CONFIG_FILES([platform/linux-dpdk/Makefile
> > -              platform/linux-dpdk/include/odp/api/plat/inlines.h])
> > -
> > +              platform/linux-dpdk/include/
> odp/api/plat/static_inline.h])
> > --
> > 1.9.1
> >
> > _______________________________________________
> > lng-odp-dpdk mailing list
> > lng-odp-dpdk@lists.linaro.org
> > https://lists.linaro.org/mailman/listinfo/lng-odp-dpdk
>
>

Patch

diff --git a/platform/linux-dpdk/.gitignore b/platform/linux-dpdk/.gitignore
index 654e50c..909756a 100644
--- a/platform/linux-dpdk/.gitignore
+++ b/platform/linux-dpdk/.gitignore
@@ -1 +1 @@ 
-include/odp/api/plat/inlines.h
\ No newline at end of file
+include/odp/api/plat/static_inline.h
diff --git a/platform/linux-dpdk/Makefile.am b/platform/linux-dpdk/Makefile.am
index 1c6295d..33a3b40 100644
--- a/platform/linux-dpdk/Makefile.am
+++ b/platform/linux-dpdk/Makefile.am
@@ -78,6 +78,7 @@  odpapiinclude_HEADERS = \

 odpapiplatincludedir= $(includedir)/odp/api/plat
 odpapiplatinclude_HEADERS = \
+		  $(builddir)/include/odp/api/plat/static_inline.h \
 		  $(srcdir)/include/odp/api/plat/atomic_types.h \
 		  $(srcdir)/include/odp/api/plat/barrier_types.h \
 		  $(srcdir)/include/odp/api/plat/buffer_types.h \
diff --git a/platform/linux-dpdk/include/odp/api/plat/inlines.h.in b/platform/linux-dpdk/include/odp/api/plat/static_inline.h.in
similarity index 58%
rename from platform/linux-dpdk/include/odp/api/plat/inlines.h.in
rename to platform/linux-dpdk/include/odp/api/plat/static_inline.h.in
index 43e542b..acee5f3 100644
--- a/platform/linux-dpdk/include/odp/api/plat/inlines.h.in
+++ b/platform/linux-dpdk/include/odp/api/plat/static_inline.h.in
@@ -7,27 +7,26 @@ 
 /**
  * @file
  *
- * ODP packet inline functions
+ * Macro for static inline functions
  */

-#ifndef ODP_PLAT_INLINES_H_
-#define ODP_PLAT_INLINES_H_
+#ifndef ODP_PLAT_STATIC_INLINE_H_
+#define ODP_PLAT_STATIC_INLINE_H_

 #ifdef __cplusplus
 extern "C" {
 #endif

-#define @_ODP_INLINES@
-
-#ifdef _ODP_INLINES
-#define _STATIC static inline
-#else
+#if @ODP_ABI_COMPAT@
+#define ODP_ABI_COMPAT 1
 #define _STATIC
+#else
+#define ODP_ABI_COMPAT 0
+#define _STATIC static inline
 #endif

 #ifdef __cplusplus
 }
 #endif

-
-#endif /* ODP_PLAT_INLINES_H_ */
+#endif
diff --git a/platform/linux-dpdk/m4/configure.m4 b/platform/linux-dpdk/m4/configure.m4
index 6807de4..fb50841 100644
--- a/platform/linux-dpdk/m4/configure.m4
+++ b/platform/linux-dpdk/m4/configure.m4
@@ -75,5 +75,4 @@  LDFLAGS=$OLD_LDFLAGS
 CPPFLAGS=$OLD_CPPFLAGS

 AC_CONFIG_FILES([platform/linux-dpdk/Makefile
-		 platform/linux-dpdk/include/odp/api/plat/inlines.h])
-
+		 platform/linux-dpdk/include/odp/api/plat/static_inline.h])