> -----Original Message-----
> From: lng-odp [mailto:[email protected]] On Behalf Of
> EXT Maxim Uvarov
> Sent: Monday, September 14, 2015 1:00 PM
> To: [email protected]
> Subject: Re: [lng-odp] [API-NEXT PATCH v2 1/3] api: init: added thread
> count params
> 
> Why not pass thread mask like dpdk does instead of number of workers?


This tells to global init how many threads the user is going to create. This is 
not CPU mask, like in DPDK. App may call other APIs (incl. odp_cpumask_xxx 
calls) only after global + local init.
 

> 
> Why number of control thread is not in parameter list?


It's there:

/** Maximum number of control threads the user will run concurrently.
    Valid range is from 0 to platform specific maximum. */
int num_control;


-Petri


> 
> Maxim.
> 
> On 09/11/15 15:55, Petri Savolainen wrote:
> > Added max number of worker/control threads as global init
> > parameters. Implementation can e.g. optimize it's per worker
> > thread resource reservation or configuration accordingly.
> >
> > Maximum values are platform specific. These values come
> > typically from the user as command line arguments, etc.
> >
> > Signed-off-by: Petri Savolainen <[email protected]>
> > ---
> >   include/odp/api/init.h | 15 ++++++++++++---
> >   1 file changed, 12 insertions(+), 3 deletions(-)
> >
> > diff --git a/include/odp/api/init.h b/include/odp/api/init.h
> > index 0683d8d..d327305 100644
> > --- a/include/odp/api/init.h
> > +++ b/include/odp/api/init.h
> > @@ -110,8 +110,16 @@ typedef void (*odp_abort_func_t)(void)
> ODP_NORETURN;
> >    * @note It is expected that all unassigned members are zero
> >    */
> >   typedef struct odp_init_t {
> > -   odp_log_func_t log_fn; /**< Replacement for the default log fn */
> > -   odp_abort_func_t abort_fn; /**< Replacement for the default abort
> fn */
> > +   /** Maximum number of worker threads the user will run
> concurrently.
> > +       Valid range is from 0 to platform specific maximum. */
> > +   int num_worker;
> > +   /** Maximum number of control threads the user will run
> concurrently.
> > +       Valid range is from 0 to platform specific maximum. */
> > +   int num_control;
> > +   /** Replacement for the default log fn */
> > +   odp_log_func_t log_fn;
> > +   /** Replacement for the default abort fn */
> > +   odp_abort_func_t abort_fn;
> >   } odp_init_t;
> >
> >   /**
> > @@ -133,9 +141,10 @@ typedef struct odp_platform_init_t {
> >    * functions.
> >    *
> >    * @param params          Those parameters that are interpreted by
> the ODP API.
> > + *                        Use NULL to set all parameters to their
> defaults.
> >    * @param platform_params Those parameters that are passed without
> >    *                        interpretation by the ODP API to the
> implementation.
> > - *
> > + *                        Use NULL to set all parameters to their
> defaults.
> >    * @retval 0 on success
> >    * @retval <0 on failure
> >    *
> 
> _______________________________________________
> 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

Reply via email to