Non-NUMA systems would just return ODP_SOCKET_ID_ANY for these calls. This
patch is the result of BKK16 discussions and is simply designed to
introduce basic APIs to permit NUMA concepts to be attached to pools for
platforms/implementations that support NUMA.  They mirror current DPDK
concepts/APIs.

We expect these to be expanded post-Monarch as we define Tiger Moth support
in this area.

On Wed, Mar 23, 2016 at 6:46 PM, Nikolay Nikolaev <
n.nikol...@virtualopensystems.com> wrote:

> On Thu, Mar 24, 2016 at 12:19 AM, Bill Fischofer
> <bill.fischo...@linaro.org> wrote:
> >
> > Add odp_cpu_socket_id() and odp_cpu_socket_id_cpu() routines
>
> I wonder how those are going to be implemented on non-NUMA systems
> like ThunderX?
> Jerin do you have any comments here?
>
> regards,
> Nikolay Nikolaev
>
> >
> >
> > Signed-off-by: Bill Fischofer <bill.fischo...@linaro.org>
> > ---
> >  include/odp/api/spec/cpu.h | 25 +++++++++++++++++++++++++
> >  1 file changed, 25 insertions(+)
> >
> > diff --git a/include/odp/api/spec/cpu.h b/include/odp/api/spec/cpu.h
> > index f0e20c4..d383c3b 100644
> > --- a/include/odp/api/spec/cpu.h
> > +++ b/include/odp/api/spec/cpu.h
> > @@ -36,6 +36,31 @@ extern "C" {
> >  int odp_cpu_id(void);
> >
> >  /**
> > + * CPU socket id
> > + *
> > + * Returns the socket id associated with the calling CPU on NUMA
> systems.
> > + * Socket ID numbering is system specific.
> > + *
> > + * @return Socket ID of the calling CPU
> > + * @retval ODP_SOCKET_ID_ANY If the caller is not running on a NUMA
> system.
> > + */
> > +uint32_t odp_cpu_socket_id(void);
> > +
> > +/**
> > + * CPU socket id of designated CPU
> > + *
> > + * Returns the socket id associated with a specific CPU on NUMA systems.
> > + * Socket ID numbering is system specific.
> > + *
> > + * @param cpu_id ID of the CPU for which socket ID information is
> requested.
> > + *
> > + * @return Socket ID of the designated CPU
> > + * @retval ODP_SOCKET_ID_ANY If the specified CPU is unknown or caller
> is
> > + *                           not running on a NUMA system.
> > + */
> > +uint32_t odp_cpu_socket_id_cpu(int cpu_id);
> > +
> > +/**
> >   * CPU count
> >   *
> >   * Report the number of CPU's available to this ODP program.
> > --
> > 2.5.0
> >
> > _______________________________________________
> > lng-odp mailing list
> > lng-odp@lists.linaro.org
> > https://lists.linaro.org/mailman/listinfo/lng-odp
>
_______________________________________________
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to