> -----Original Message----- > From: Thomas Monjalon [mailto:thomas.monjalon at 6wind.com] > Sent: Wednesday, June 11, 2014 3:50 PM > To: Richardson, Bruce > Cc: Lu, Patrick; dev at dpdk.org > Subject: Re: [dpdk-dev] [PATCH] Add an API to query enabled core index > > 2014-06-11 21:57, Richardson, Bruce: > > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Thomas Monjalon > > > 2014-06-11 13:45, Patrick Lu: > > > > The new API rte_lcore_id2() will return an index from enabled lcores > > > > starting from zero. > > > > > > I think core_id2 is not a representative name. > > > What do you think of renaming core_id as lcore_hwid and core_id2 as > > > lcore_index? > > > > I like lcore_index as the name for the new function. However, I'm not sure > > in that case that we want/need to rename the old one. > > I think it would be not easy to distinguish id and index. So I prefer > hwid/index. And lcore is more precise than core. >
The function is already called "rte_lcore_id()" so there is no need to change it to make it an "lcore" function. That function has been around for a long time and is commonly used, so I'd prefer it not be changed unless it really is necessary. "rte_lcore_index" is a sufficiently different function name, in my opinion. The API documentation should clear up any confusion for the user anyway.