In linux-generic most handles are in fact 32-bit values that are embedded in pseudo-pointers that may be either 32 bit or 64 bit, depending on the architecture. _odp_pri() returns a uint64_t because the odp_typename_to_u64() APIs are defined to return a uint64_t value.
Are you saying you are trying to use 64-bit values as handles for some new ODP type? I'd be careful about trying to make this change without careful testing on both 32-bit and 64-bit systems since the internal odp_buffer_bits_t type, for example, assumes that handles can convert to 32-bit tokens. On Fri, Sep 11, 2015 at 7:53 AM, Maxim Uvarov <[email protected]> wrote: > _odp_pri returns uint64_t value but actually accounts only 32 bit. > In my case that lead to return the same value for printed packets > with additional handle bits. > > Signed-off-by: Maxim Uvarov <[email protected]> > --- > platform/linux-generic/include/odp/plat/strong_types.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/platform/linux-generic/include/odp/plat/strong_types.h > b/platform/linux-generic/include/odp/plat/strong_types.h > index a53d763..843e2d2 100644 > --- a/platform/linux-generic/include/odp/plat/strong_types.h > +++ b/platform/linux-generic/include/odp/plat/strong_types.h > @@ -25,7 +25,7 @@ > #endif > > /** Internal macro to get value of an ODP handle */ > -#define _odp_typeval(handle) ((uint32_t)(uintptr_t)(handle)) > +#define _odp_typeval(handle) ((uint64_t)(uintptr_t)(handle)) > > /** Internal macro to get printable value of an ODP handle */ > #define _odp_pri(handle) ((uint64_t)_odp_typeval(handle)) > -- > 1.9.1 > > _______________________________________________ > lng-odp mailing list > [email protected] > https://lists.linaro.org/mailman/listinfo/lng-odp >
_______________________________________________ lng-odp mailing list [email protected] https://lists.linaro.org/mailman/listinfo/lng-odp
