Message ID | 1477338972-17132-1-git-send-email-bill.fischofer@linaro.org |
---|---|
State | Superseded |
Headers | show |
On 10/24/16 22:56, Bill Fischofer wrote: > Add the odp_dev_id() API used for NUMA support probably log also needs to be corrected with removing reference to NUMA. Maxim. > Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> > --- > Changes for v2: > - Incorporate changes suggested by Petri > > include/odp/api/spec/dev.h | 89 ++++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 89 insertions(+) > create mode 100644 include/odp/api/spec/dev.h > > diff --git a/include/odp/api/spec/dev.h b/include/odp/api/spec/dev.h > new file mode 100644 > index 0000000..1f7ed8b > --- /dev/null > +++ b/include/odp/api/spec/dev.h > @@ -0,0 +1,89 @@ > +/* Copyright (c) 2016, Linaro Limited > + * All rights reserved. > + * > + * SPDX-License-Identifier: BSD-3-Clause > + */ > + > +/** > + * @file > + * > + * ODP device > + */ > + > +#ifndef ODP_API_DEV_H_ > +#define ODP_API_DEV_H_ > +#include <odp/visibility_begin.h> > + > +#ifdef __cplusplus > +extern "C" { > +#endif > + > +#include <odp/api/std_types.h> > + > +/** @defgroup odp_dev ODP DEVICE > + * Operations on devices > + * @{ > + */ > + > +/** > + * @typedef odp_dev_t > + * ODP Device > + */ > + > +/** > + * @def ODP_DEV_NAME_LEN > + * Maximum device name length in chars > + */ > + > +/** > + * @def ODP_DEV_ANY > + * Any device > + */ > + > +/** > + * @def ODP_DEV_INVALID > + * Invalid device > + */ > + > +/** > + * Get Device ID by Name > + * > + * Get an implementation-defined device identifier from a device name. Device > + * names are supplied as parameter info (command line, file, etc.) to the > + * application. This routine translates this symbolic name into an internal > + * identifier that can be used to define a device connection hierarchy for > + * NUMA or other purposes. > + * > + * The reserved id ODP_DEV_ANY may be used as a "don't care" placeholder > + * wherever a device id is required. > + * > + * @param name Name of the device > + * > + * @return Device ID > + * @retval ODP_DEV_INVALID Device is unknown > + */ > +odp_dev_t odp_dev_id(const char *name); > + > +/** > + * Get printable value for an odp_dev_t > + * > + * @param hdl odp_dev_t handle to be printed > + * @return uint64_t value that can be used to print/display this > + * handle > + * > + * @note This routine is intended to be used for diagnostic purposes > + * to enable applications to generate a printable value that represents > + * an odp_dev_t handle. > + */ > +uint64_t odp_dev_to_u64(odp_dev_t hdl); > + > +/** > + * @} > + */ > + > +#ifdef __cplusplus > +} > +#endif > + > +#include <odp/visibility_end.h> > +#endif
On Mon, Oct 24, 2016 at 3:45 PM, Maxim Uvarov <maxim.uvarov@linaro.org> wrote: > On 10/24/16 22:56, Bill Fischofer wrote: > >> Add the odp_dev_id() API used for NUMA support >> > > probably log also needs to be corrected with removing reference to NUMA. Petri didn't object to the term NUMA, just some other references which are addressed in this version. > > > Maxim. > > > Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> >> --- >> Changes for v2: >> - Incorporate changes suggested by Petri >> >> include/odp/api/spec/dev.h | 89 ++++++++++++++++++++++++++++++ >> ++++++++++++++++ >> 1 file changed, 89 insertions(+) >> create mode 100644 include/odp/api/spec/dev.h >> >> diff --git a/include/odp/api/spec/dev.h b/include/odp/api/spec/dev.h >> new file mode 100644 >> index 0000000..1f7ed8b >> --- /dev/null >> +++ b/include/odp/api/spec/dev.h >> @@ -0,0 +1,89 @@ >> +/* Copyright (c) 2016, Linaro Limited >> + * All rights reserved. >> + * >> + * SPDX-License-Identifier: BSD-3-Clause >> + */ >> + >> +/** >> + * @file >> + * >> + * ODP device >> + */ >> + >> +#ifndef ODP_API_DEV_H_ >> +#define ODP_API_DEV_H_ >> +#include <odp/visibility_begin.h> >> + >> +#ifdef __cplusplus >> +extern "C" { >> +#endif >> + >> +#include <odp/api/std_types.h> >> + >> +/** @defgroup odp_dev ODP DEVICE >> + * Operations on devices >> + * @{ >> + */ >> + >> +/** >> + * @typedef odp_dev_t >> + * ODP Device >> + */ >> + >> +/** >> + * @def ODP_DEV_NAME_LEN >> + * Maximum device name length in chars >> + */ >> + >> +/** >> + * @def ODP_DEV_ANY >> + * Any device >> + */ >> + >> +/** >> + * @def ODP_DEV_INVALID >> + * Invalid device >> + */ >> + >> +/** >> + * Get Device ID by Name >> + * >> + * Get an implementation-defined device identifier from a device name. >> Device >> + * names are supplied as parameter info (command line, file, etc.) to the >> + * application. This routine translates this symbolic name into an >> internal >> + * identifier that can be used to define a device connection hierarchy >> for >> + * NUMA or other purposes. >> + * >> + * The reserved id ODP_DEV_ANY may be used as a "don't care" placeholder >> + * wherever a device id is required. >> + * >> + * @param name Name of the device >> + * >> + * @return Device ID >> + * @retval ODP_DEV_INVALID Device is unknown >> + */ >> +odp_dev_t odp_dev_id(const char *name); >> + >> +/** >> + * Get printable value for an odp_dev_t >> + * >> + * @param hdl odp_dev_t handle to be printed >> + * @return uint64_t value that can be used to print/display this >> + * handle >> + * >> + * @note This routine is intended to be used for diagnostic purposes >> + * to enable applications to generate a printable value that represents >> + * an odp_dev_t handle. >> + */ >> +uint64_t odp_dev_to_u64(odp_dev_t hdl); >> + >> +/** >> + * @} >> + */ >> + >> +#ifdef __cplusplus >> +} >> +#endif >> + >> +#include <odp/visibility_end.h> >> +#endif >> > >
diff --git a/include/odp/api/spec/dev.h b/include/odp/api/spec/dev.h new file mode 100644 index 0000000..1f7ed8b --- /dev/null +++ b/include/odp/api/spec/dev.h @@ -0,0 +1,89 @@ +/* Copyright (c) 2016, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +/** + * @file + * + * ODP device + */ + +#ifndef ODP_API_DEV_H_ +#define ODP_API_DEV_H_ +#include <odp/visibility_begin.h> + +#ifdef __cplusplus +extern "C" { +#endif + +#include <odp/api/std_types.h> + +/** @defgroup odp_dev ODP DEVICE + * Operations on devices + * @{ + */ + +/** + * @typedef odp_dev_t + * ODP Device + */ + +/** + * @def ODP_DEV_NAME_LEN + * Maximum device name length in chars + */ + +/** + * @def ODP_DEV_ANY + * Any device + */ + +/** + * @def ODP_DEV_INVALID + * Invalid device + */ + +/** + * Get Device ID by Name + * + * Get an implementation-defined device identifier from a device name. Device + * names are supplied as parameter info (command line, file, etc.) to the + * application. This routine translates this symbolic name into an internal + * identifier that can be used to define a device connection hierarchy for + * NUMA or other purposes. + * + * The reserved id ODP_DEV_ANY may be used as a "don't care" placeholder + * wherever a device id is required. + * + * @param name Name of the device + * + * @return Device ID + * @retval ODP_DEV_INVALID Device is unknown + */ +odp_dev_t odp_dev_id(const char *name); + +/** + * Get printable value for an odp_dev_t + * + * @param hdl odp_dev_t handle to be printed + * @return uint64_t value that can be used to print/display this + * handle + * + * @note This routine is intended to be used for diagnostic purposes + * to enable applications to generate a printable value that represents + * an odp_dev_t handle. + */ +uint64_t odp_dev_to_u64(odp_dev_t hdl); + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#include <odp/visibility_end.h> +#endif
Add the odp_dev_id() API used for NUMA support Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> --- Changes for v2: - Incorporate changes suggested by Petri include/odp/api/spec/dev.h | 89 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 include/odp/api/spec/dev.h -- 2.7.4