Message ID | 1416247037-13357-1-git-send-email-mike.holmes@linaro.org |
---|---|
State | Accepted |
Commit | 722db81b51a9ff9510052ac6b86e01d99fe76cef |
Headers | show |
ping On 17 November 2014 12:57, Mike Holmes <mike.holmes@linaro.org> wrote: > Add odp_version_impl_str() so that the implementation may indicate its own > version string independently of the ODP API changing. > > Signed-off-by: Mike Holmes <mike.holmes@linaro.org> > --- > platform/linux-generic/Makefile.am | 1 + > platform/linux-generic/include/api/odp_version.h | 11 ++++++++ > platform/linux-generic/odp_impl.c | 35 > ++++++++++++++++++++++++ > 3 files changed, 47 insertions(+) > create mode 100644 platform/linux-generic/odp_impl.c > > diff --git a/platform/linux-generic/Makefile.am > b/platform/linux-generic/Makefile.am > index ea77521..e709700 100644 > --- a/platform/linux-generic/Makefile.am > +++ b/platform/linux-generic/Makefile.am > @@ -59,6 +59,7 @@ __LIB__libodp_la_SOURCES = \ > odp_coremask.c \ > odp_crypto.c \ > odp_init.c \ > + odp_impl.c \ > odp_linux.c \ > odp_packet.c \ > odp_packet_flags.c \ > diff --git a/platform/linux-generic/include/api/odp_version.h > b/platform/linux-generic/include/api/odp_version.h > index 4450452..805ddba 100644 > --- a/platform/linux-generic/include/api/odp_version.h > +++ b/platform/linux-generic/include/api/odp_version.h > @@ -69,6 +69,17 @@ static inline const char *odp_version_api_str(void) > } > > /** > + * Returns ODP implementation version string > + * > + * Every implementation of ODP may receive bug fixes independent of the > version > + * of the API changing, this function returns that indication string. > + * @note This string is implementation specific. > + * @sa odp_version_api_str() > + * > + * @return null terminated implementation specific version identifier > string > + */ > +inline const char *odp_version_impl_str(void); > +/** > * @} > */ > > diff --git a/platform/linux-generic/odp_impl.c > b/platform/linux-generic/odp_impl.c > new file mode 100644 > index 0000000..c58cc09 > --- /dev/null > +++ b/platform/linux-generic/odp_impl.c > @@ -0,0 +1,35 @@ > +/* Copyright (c) 2014, Linaro Limited > + * All rights reserved. > + * > + * SPDX-License-Identifier: BSD-3-Clause > + */ > + > + > +/** > + * @file > + * > + * ODP Implementation information > + */ > + > +#ifndef ODP_IMPL_H_ > +#define ODP_IMPL_H_ > + > +#ifdef __cplusplus > +extern "C" { > +#endif > + > +#include <odp_version.h> > + > +#define ODP_VERSION_IMPL 0 > +#define ODP_VERSION_IMPL_STR ODP_VERSION_TO_STR(ODP_VERSION_IMPL) > + > +inline const char *odp_version_impl_str(void) > +{ > + return ODP_VERSION_IMPL_STR; > +} > + > +#ifdef __cplusplus > +} > +#endif > + > +#endif > -- > 2.1.0 > >
On Monday, November 17, 2014, Mike Holmes <mike.holmes@linaro.org> wrote: > Add odp_version_impl_str() so that the implementation may indicate its own > version string independently of the ODP API changing. > > Signed-off-by: Mike Holmes <mike.holmes@linaro.org <javascript:;>> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> > --- > platform/linux-generic/Makefile.am | 1 + > platform/linux-generic/include/api/odp_version.h | 11 ++++++++ > platform/linux-generic/odp_impl.c | 35 > ++++++++++++++++++++++++ > 3 files changed, 47 insertions(+) > create mode 100644 platform/linux-generic/odp_impl.c > > diff --git a/platform/linux-generic/Makefile.am > b/platform/linux-generic/Makefile.am > index ea77521..e709700 100644 > --- a/platform/linux-generic/Makefile.am > +++ b/platform/linux-generic/Makefile.am > @@ -59,6 +59,7 @@ __LIB__libodp_la_SOURCES = \ > odp_coremask.c \ > odp_crypto.c \ > odp_init.c \ > + odp_impl.c \ > odp_linux.c \ > odp_packet.c \ > odp_packet_flags.c \ > diff --git a/platform/linux-generic/include/api/odp_version.h > b/platform/linux-generic/include/api/odp_version.h > index 4450452..805ddba 100644 > --- a/platform/linux-generic/include/api/odp_version.h > +++ b/platform/linux-generic/include/api/odp_version.h > @@ -69,6 +69,17 @@ static inline const char *odp_version_api_str(void) > } > > /** > + * Returns ODP implementation version string > + * > + * Every implementation of ODP may receive bug fixes independent of the > version > + * of the API changing, this function returns that indication string. > + * @note This string is implementation specific. > + * @sa odp_version_api_str() > + * > + * @return null terminated implementation specific version identifier > string > + */ > +inline const char *odp_version_impl_str(void); > +/** > * @} > */ > > diff --git a/platform/linux-generic/odp_impl.c > b/platform/linux-generic/odp_impl.c > new file mode 100644 > index 0000000..c58cc09 > --- /dev/null > +++ b/platform/linux-generic/odp_impl.c > @@ -0,0 +1,35 @@ > +/* Copyright (c) 2014, Linaro Limited > + * All rights reserved. > + * > + * SPDX-License-Identifier: BSD-3-Clause > + */ > + > + > +/** > + * @file > + * > + * ODP Implementation information > + */ > + > +#ifndef ODP_IMPL_H_ > +#define ODP_IMPL_H_ > + > +#ifdef __cplusplus > +extern "C" { > +#endif > + > +#include <odp_version.h> > + > +#define ODP_VERSION_IMPL 0 > +#define ODP_VERSION_IMPL_STR ODP_VERSION_TO_STR(ODP_VERSION_IMPL) > + > +inline const char *odp_version_impl_str(void) > +{ > + return ODP_VERSION_IMPL_STR; > +} > + > +#ifdef __cplusplus > +} > +#endif > + > +#endif > -- > 2.1.0 > > > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org <javascript:;> > http://lists.linaro.org/mailman/listinfo/lng-odp >
Merged! Maxim. On 11/20/2014 10:55 PM, Bill Fischofer wrote: > > > On Monday, November 17, 2014, Mike Holmes <mike.holmes@linaro.org > <mailto:mike.holmes@linaro.org>> wrote: > > Add odp_version_impl_str() so that the implementation may indicate > its own > version string independently of the ODP API changing. > > Signed-off-by: Mike Holmes <mike.holmes@linaro.org <javascript:;>> > > > Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org > <mailto:bill.fischofer@linaro.org>> > > --- > platform/linux-generic/Makefile.am | 1 + > platform/linux-generic/include/api/odp_version.h | 11 ++++++++ > platform/linux-generic/odp_impl.c | 35 > ++++++++++++++++++++++++ > 3 files changed, 47 insertions(+) > create mode 100644 platform/linux-generic/odp_impl.c > > diff --git a/platform/linux-generic/Makefile.am > b/platform/linux-generic/Makefile.am > index ea77521..e709700 100644 > --- a/platform/linux-generic/Makefile.am > +++ b/platform/linux-generic/Makefile.am > @@ -59,6 +59,7 @@ __LIB__libodp_la_SOURCES = \ > odp_coremask.c \ > odp_crypto.c \ > odp_init.c \ > + odp_impl.c \ > odp_linux.c \ > odp_packet.c \ > odp_packet_flags.c \ > diff --git a/platform/linux-generic/include/api/odp_version.h > b/platform/linux-generic/include/api/odp_version.h > index 4450452..805ddba 100644 > --- a/platform/linux-generic/include/api/odp_version.h > +++ b/platform/linux-generic/include/api/odp_version.h > @@ -69,6 +69,17 @@ static inline const char *odp_version_api_str(void) > } > > /** > + * Returns ODP implementation version string > + * > + * Every implementation of ODP may receive bug fixes independent > of the version > + * of the API changing, this function returns that indication string. > + * @note This string is implementation specific. > + * @sa odp_version_api_str() > + * > + * @return null terminated implementation specific version > identifier string > + */ > +inline const char *odp_version_impl_str(void); > +/** > * @} > */ > > diff --git a/platform/linux-generic/odp_impl.c > b/platform/linux-generic/odp_impl.c > new file mode 100644 > index 0000000..c58cc09 > --- /dev/null > +++ b/platform/linux-generic/odp_impl.c > @@ -0,0 +1,35 @@ > +/* Copyright (c) 2014, Linaro Limited > + * All rights reserved. > + * > + * SPDX-License-Identifier: BSD-3-Clause > + */ > + > + > +/** > + * @file > + * > + * ODP Implementation information > + */ > + > +#ifndef ODP_IMPL_H_ > +#define ODP_IMPL_H_ > + > +#ifdef __cplusplus > +extern "C" { > +#endif > + > +#include <odp_version.h> > + > +#define ODP_VERSION_IMPL 0 > +#define ODP_VERSION_IMPL_STR ODP_VERSION_TO_STR(ODP_VERSION_IMPL) > + > +inline const char *odp_version_impl_str(void) > +{ > + return ODP_VERSION_IMPL_STR; > +} > + > +#ifdef __cplusplus > +} > +#endif > + > +#endif > -- > 2.1.0 > > > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org <javascript:;> > http://lists.linaro.org/mailman/listinfo/lng-odp > > > > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org > http://lists.linaro.org/mailman/listinfo/lng-odp
inline const char *odp_version_impl_str(void); Keyword "inline" should be removed from this definition. -Petri > -----Original Message----- > From: lng-odp-bounces@lists.linaro.org [mailto:lng-odp- > bounces@lists.linaro.org] On Behalf Of ext Maxim Uvarov > Sent: Friday, November 21, 2014 12:10 AM > To: lng-odp@lists.linaro.org > Subject: Re: [lng-odp] [PATCH 1/2] api: Add implementation version > > Merged! > > Maxim. > > On 11/20/2014 10:55 PM, Bill Fischofer wrote: > > > > > > On Monday, November 17, 2014, Mike Holmes <mike.holmes@linaro.org > > <mailto:mike.holmes@linaro.org>> wrote: > > > > Add odp_version_impl_str() so that the implementation may indicate > > its own > > version string independently of the ODP API changing. > > > > Signed-off-by: Mike Holmes <mike.holmes@linaro.org <javascript:;>> > > > > > > Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org > > <mailto:bill.fischofer@linaro.org>> > > > > --- > > platform/linux-generic/Makefile.am | 1 + > > platform/linux-generic/include/api/odp_version.h | 11 ++++++++ > > platform/linux-generic/odp_impl.c | 35 > > ++++++++++++++++++++++++ > > 3 files changed, 47 insertions(+) > > create mode 100644 platform/linux-generic/odp_impl.c > > > > diff --git a/platform/linux-generic/Makefile.am > > b/platform/linux-generic/Makefile.am > > index ea77521..e709700 100644 > > --- a/platform/linux-generic/Makefile.am > > +++ b/platform/linux-generic/Makefile.am > > @@ -59,6 +59,7 @@ __LIB__libodp_la_SOURCES = \ > > odp_coremask.c \ > > odp_crypto.c \ > > odp_init.c \ > > + odp_impl.c \ > > odp_linux.c \ > > odp_packet.c \ > > odp_packet_flags.c \ > > diff --git a/platform/linux-generic/include/api/odp_version.h > > b/platform/linux-generic/include/api/odp_version.h > > index 4450452..805ddba 100644 > > --- a/platform/linux-generic/include/api/odp_version.h > > +++ b/platform/linux-generic/include/api/odp_version.h > > @@ -69,6 +69,17 @@ static inline const char > *odp_version_api_str(void) > > } > > > > /** > > + * Returns ODP implementation version string > > + * > > + * Every implementation of ODP may receive bug fixes independent > > of the version > > + * of the API changing, this function returns that indication > string. > > + * @note This string is implementation specific. > > + * @sa odp_version_api_str() > > + * > > + * @return null terminated implementation specific version > > identifier string > > + */ > > +inline const char *odp_version_impl_str(void); > > +/** > > * @} > > */ > > > > diff --git a/platform/linux-generic/odp_impl.c > > b/platform/linux-generic/odp_impl.c > > new file mode 100644 > > index 0000000..c58cc09 > > --- /dev/null > > +++ b/platform/linux-generic/odp_impl.c > > @@ -0,0 +1,35 @@ > > +/* Copyright (c) 2014, Linaro Limited > > + * All rights reserved. > > + * > > + * SPDX-License-Identifier: BSD-3-Clause > > + */ > > + > > + > > +/** > > + * @file > > + * > > + * ODP Implementation information > > + */ > > + > > +#ifndef ODP_IMPL_H_ > > +#define ODP_IMPL_H_ > > + > > +#ifdef __cplusplus > > +extern "C" { > > +#endif > > + > > +#include <odp_version.h> > > + > > +#define ODP_VERSION_IMPL 0 > > +#define ODP_VERSION_IMPL_STR ODP_VERSION_TO_STR(ODP_VERSION_IMPL) > > + > > +inline const char *odp_version_impl_str(void) > > +{ > > + return ODP_VERSION_IMPL_STR; > > +} > > + > > +#ifdef __cplusplus > > +} > > +#endif > > + > > +#endif > > -- > > 2.1.0 > > > > > > _______________________________________________ > > lng-odp mailing list > > lng-odp@lists.linaro.org <javascript:;> > > http://lists.linaro.org/mailman/listinfo/lng-odp > > > > > > > > _______________________________________________ > > lng-odp mailing list > > lng-odp@lists.linaro.org > > http://lists.linaro.org/mailman/listinfo/lng-odp > > > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org > http://lists.linaro.org/mailman/listinfo/lng-odp
diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am index ea77521..e709700 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -59,6 +59,7 @@ __LIB__libodp_la_SOURCES = \ odp_coremask.c \ odp_crypto.c \ odp_init.c \ + odp_impl.c \ odp_linux.c \ odp_packet.c \ odp_packet_flags.c \ diff --git a/platform/linux-generic/include/api/odp_version.h b/platform/linux-generic/include/api/odp_version.h index 4450452..805ddba 100644 --- a/platform/linux-generic/include/api/odp_version.h +++ b/platform/linux-generic/include/api/odp_version.h @@ -69,6 +69,17 @@ static inline const char *odp_version_api_str(void) } /** + * Returns ODP implementation version string + * + * Every implementation of ODP may receive bug fixes independent of the version + * of the API changing, this function returns that indication string. + * @note This string is implementation specific. + * @sa odp_version_api_str() + * + * @return null terminated implementation specific version identifier string + */ +inline const char *odp_version_impl_str(void); +/** * @} */ diff --git a/platform/linux-generic/odp_impl.c b/platform/linux-generic/odp_impl.c new file mode 100644 index 0000000..c58cc09 --- /dev/null +++ b/platform/linux-generic/odp_impl.c @@ -0,0 +1,35 @@ +/* Copyright (c) 2014, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + + +/** + * @file + * + * ODP Implementation information + */ + +#ifndef ODP_IMPL_H_ +#define ODP_IMPL_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include <odp_version.h> + +#define ODP_VERSION_IMPL 0 +#define ODP_VERSION_IMPL_STR ODP_VERSION_TO_STR(ODP_VERSION_IMPL) + +inline const char *odp_version_impl_str(void) +{ + return ODP_VERSION_IMPL_STR; +} + +#ifdef __cplusplus +} +#endif + +#endif
Add odp_version_impl_str() so that the implementation may indicate its own version string independently of the ODP API changing. Signed-off-by: Mike Holmes <mike.holmes@linaro.org> --- platform/linux-generic/Makefile.am | 1 + platform/linux-generic/include/api/odp_version.h | 11 ++++++++ platform/linux-generic/odp_impl.c | 35 ++++++++++++++++++++++++ 3 files changed, 47 insertions(+) create mode 100644 platform/linux-generic/odp_impl.c