On 8 May 2015 at 08:47, Bill Fischofer <[email protected]> wrote:
> I guess the question is: > > 1. Who was using these? > Applications want to know the implementation and API versions, I think that was the driver to adding the APIs originally and I think that remains true. Certainly the patch as it stands subverts the original APIs intention of indicating just the implementation revision level. > 2. How do we intend for them to be used going forward? > Original APIs for the version remain as originally intended, the new API makes debugging and identification of the code in use much easier > > If we can answer those questions then any needed "course correction" > should be clearer. > > On Fri, May 8, 2015 at 7:40 AM, Mike Holmes <[email protected]> > wrote: > >> sorry paste failed me insert odp_version_impl_str >> >> However we just re-purposed odp_version_impl_str from returning that >> "1" to a string that is good for debug logs. >> >> odp_version_impl_str = 0 << revert this to its old purpose >> >> On 8 May 2015 at 08:38, Mike Holmes <[email protected]> wrote: >> >>> I think we may have made a mistake. >>> >>> We need a way to indicate linux-generic changes that do not in any way >>> touch the API given that linux-generic and the API are released together. >>> We have that information already it is the version digit that was >>> returned by odp_version_api_str() >>> <http://docs.opendataplane.org/linux-generic-doxygen-html/group__odp__ver__abt__log__dbg.html#ga36ea138f559454eee62c343107947cb6> >>> and >>> was set to 0 >>> >>> We should be releasing 1.1.0-0 right now, and when we make a point >>> release that in no way touches the API will will release maybe 1.1.0-1. >>> However we just re-purposed odp_version_api_str() >>> <http://docs.opendataplane.org/linux-generic-doxygen-html/group__odp__ver__abt__log__dbg.html#ga36ea138f559454eee62c343107947cb6> >>> from >>> returning that "1" to a string that is good for debug logs. >>> >>> I think we need a new API for the verbose string. >>> >>> odp_version_api_str >>> <http://docs.opendataplane.org/linux-generic-doxygen-html/group__odp__ver__abt__log__dbg.html#ga36ea138f559454eee62c343107947cb6> >>> = 1.1.0 >>> odp_version_api_str() >>> <http://docs.opendataplane.org/linux-generic-doxygen-html/group__odp__ver__abt__log__dbg.html#ga36ea138f559454eee62c343107947cb6> >>> = 0 << revert this to its old purpose >>> >>> odp_version_description_str() >>> <http://docs.opendataplane.org/linux-generic-doxygen-html/group__odp__ver__abt__log__dbg.html#ga36ea138f559454eee62c343107947cb6> >>> << add this = linux-generic 1.0.4-0 (v1.0.4) May 8 2015 07:34:05 ' >>> https://git.linaro.org/lng/odp.git' (v1.0.4-22-g9a02ee4-dirty) >>> >>> >>> >>> >>> On 8 May 2015 at 06:20, Maxim Uvarov <[email protected]> wrote: >>> >>>> v2 patch is ok, going to apply it if no more objections. >>>> >>>> Maxim. >>>> >>>> >>>> >>>> On 05/07/2015 15:38, Mike Holmes wrote: >>>> >>>>> Signed-off-by: Mike Holmes <[email protected]> >>>>> --- >>>>> >>>>> V2 >>>>> Reduce the number fo files touched. >>>>> >>>>> platform/Makefile.inc | 4 ++++ >>>>> platform/linux-generic/odp_impl.c | 14 ++++++++++++-- >>>>> scripts/git_hash.sh | 9 +++++++++ >>>>> 3 files changed, 25 insertions(+), 2 deletions(-) >>>>> create mode 100755 scripts/git_hash.sh >>>>> >>>>> diff --git a/platform/Makefile.inc b/platform/Makefile.inc >>>>> index 9e73fc4..4000d64 100644 >>>>> --- a/platform/Makefile.inc >>>>> +++ b/platform/Makefile.inc >>>>> @@ -11,3 +11,7 @@ VPATH = $(srcdir) $(builddir) >>>>> lib_LTLIBRARIES = $(LIB)/libodp.la >>>>> AM_LDFLAGS += -version-number '$(ODP_LIBSO_VERSION)' >>>>> + >>>>> +GIT_DESC !=$(top_builddir)/scripts/git_hash.sh >>>>> +AM_CFLAGS += "-DGIT_HASH=$(GIT_DESC)" >>>>> +AM_CFLAGS += -DPLATFORM=${with_platform} >>>>> diff --git a/platform/linux-generic/odp_impl.c >>>>> b/platform/linux-generic/odp_impl.c >>>>> index ca3224d..46d0e40 100644 >>>>> --- a/platform/linux-generic/odp_impl.c >>>>> +++ b/platform/linux-generic/odp_impl.c >>>>> @@ -20,8 +20,18 @@ extern "C" { >>>>> #include <odp/version.h> >>>>> -#define ODP_VERSION_IMPL 0 >>>>> -#define ODP_VERSION_IMPL_STR ODP_VERSION_TO_STR(ODP_VERSION_IMPL) >>>>> +#define ODP_VERSION_IMPL 0 >>>>> +#define ODP_VERSION_IMPL_STR \ >>>>> + ODP_VERSION_TO_STR(PLATFORM) " " \ >>>>> + ODP_VERSION_TO_STR(ODP_VERSION_API_GENERATION) "." \ >>>>> + ODP_VERSION_TO_STR(ODP_VERSION_API_MAJOR) "." \ >>>>> + ODP_VERSION_TO_STR(ODP_VERSION_API_MINOR) "-" \ >>>>> + ODP_VERSION_TO_STR(ODP_VERSION_IMPL) " (v" \ >>>>> + ODP_VERSION_TO_STR(ODP_VERSION_API_GENERATION) "." \ >>>>> + ODP_VERSION_TO_STR(ODP_VERSION_API_MAJOR) "." \ >>>>> + ODP_VERSION_TO_STR(ODP_VERSION_API_MINOR) ") " \ >>>>> + __DATE__ " " __TIME__ " " \ >>>>> + ODP_VERSION_TO_STR(GIT_HASH) >>>>> const char *odp_version_impl_str(void) >>>>> { >>>>> diff --git a/scripts/git_hash.sh b/scripts/git_hash.sh >>>>> new file mode 100755 >>>>> index 0000000..c9f1faf >>>>> --- /dev/null >>>>> +++ b/scripts/git_hash.sh >>>>> @@ -0,0 +1,9 @@ >>>>> +#!/bin/bash >>>>> + >>>>> +repo=https://git.linaro.org/lng/odp.git >>>>> +hash=$(git describe | tr -d "\n") >>>>> +if git diff-index --name-only HEAD &>/dev/null ; then >>>>> + dirty=-dirty >>>>> +fi >>>>> + >>>>> +echo -n "'${repo}' (${hash}${dirty})" >>>>> >>>> >>>> _______________________________________________ >>>> lng-odp mailing list >>>> [email protected] >>>> https://lists.linaro.org/mailman/listinfo/lng-odp >>>> >>> >>> >>> >>> -- >>> Mike Holmes >>> Technical Manager - Linaro Networking Group >>> Linaro.org <http://www.linaro.org/> *│ *Open source software for ARM >>> SoCs >>> >>> >>> >> >> >> -- >> Mike Holmes >> Technical Manager - Linaro Networking Group >> Linaro.org <http://www.linaro.org/> *│ *Open source software for ARM SoCs >> >> >> >> _______________________________________________ >> lng-odp mailing list >> [email protected] >> https://lists.linaro.org/mailman/listinfo/lng-odp >> >> > -- Mike Holmes Technical Manager - Linaro Networking Group Linaro.org <http://www.linaro.org/> *│ *Open source software for ARM SoCs
_______________________________________________ lng-odp mailing list [email protected] https://lists.linaro.org/mailman/listinfo/lng-odp
