[dpdk-dev] [PATCH v6 06/19] eal: new TLS definition and API declaration

Liang, Cunming cunming.liang at intel.com
Sun Feb 15 07:01:45 CET 2015



> -----Original Message-----
> From: Neil Horman [mailto:nhorman at tuxdriver.com]
> Sent: Sunday, February 15, 2015 1:17 PM
> To: Liang, Cunming
> Cc: dev at dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v6 06/19] eal: new TLS definition and API
> declaration
>
[...] 
> > > >
> > > >  RTE_DEFINE_PER_LCORE(unsigned, _lcore_id);
> > > > +RTE_DEFINE_PER_LCORE(unsigned, _socket_id);
> > > > +RTE_DEFINE_PER_LCORE(rte_cpuset_t, _cpuset);
> > > >
> > > >  /*
> > > >   * Send a message to a slave lcore identified by slave_id to call a
> > > > --
> > > > 1.8.1.4
> > > >
> > > >
> > > All of these exported functions need to be exported in the version map.  Also,
> I
> > > don't think its a good idea to simply expose the per lcore cpuset variables.  It
> > > would be far better to create an api around them
> > [LCM] Thanks for the remind, I haven't taken care of the version map.
> > The rte_thread_set/get_affinity() are the api around _cpuset, so do you
> suggest we don't put 'per_lcore__cpuset' into rte_eal_version.map ?
> > On this point, I agree with you and think we'd better not expose
> 'per_lcore__socket_id' as well, what do you think ?
> Yes, absolutely, you should wrap some API around them, and make them
> defined
> symbols, only inline them if they're going to be in the hot path.
[LCM] _socket_id is wrapped by rte_socket_id() and rte_thread_set_affinity().
rte_socket_id() is defined as inline in rte_lcore.h. So finally two (rte_thread_set/get_affinity()) are added into version map.
All these are updated in v7.
> 
> Thanks
> Neil
> 
> > >
> > > Neil
> >
> >


More information about the dev mailing list