On Fri, Jun 05, 2020 at 03:57:46PM -0700, Stephen Hemminger wrote: > Replace the old use of master/slave lcore with more inclusive > name of initial/secondary lcore. The old visible API will > stay for now. > > Change master2slave to new init2worker and vice-versa. > > This patch breaks the expected practice for new API's. > The new rte_get_initial_lcore() will not go through the standard > experimental API phase; there is no functional difference > from the previous name. > > Signed-off-by: Stephen Hemminger <step...@networkplumber.org> > ---
This patch needs some rebasing as some of the memory functions have moved from eal_memory.c to eal_common_dynmem.c, and the windows code has been updated too. Any further versions of this set can probably have the "RFC" label removed too, as the consensus very much seems to be in favour of this change - it's just a matter of getting the implementation in. One further comment below. /Bruce > lib/librte_eal/common/eal_common_launch.c | 36 ++++++------- > lib/librte_eal/common/eal_common_lcore.c | 11 ++-- > lib/librte_eal/common/eal_common_options.c | 62 +++++++++++----------- > lib/librte_eal/common/eal_options.h | 4 +- > lib/librte_eal/common/eal_private.h | 6 +-- > lib/librte_eal/common/eal_thread.h | 6 +-- > lib/librte_eal/common/rte_random.c | 2 +- > lib/librte_eal/common/rte_service.c | 2 +- > lib/librte_eal/freebsd/eal.c | 24 ++++----- > lib/librte_eal/freebsd/eal_thread.c | 24 ++++----- > lib/librte_eal/include/rte_eal.h | 4 +- > lib/librte_eal/include/rte_eal_trace.h | 4 +- > lib/librte_eal/include/rte_launch.h | 62 ++++++++++++---------- > lib/librte_eal/include/rte_lcore.h | 29 +++++++--- > lib/librte_eal/linux/eal.c | 24 ++++----- > lib/librte_eal/linux/eal_memory.c | 20 +++---- > lib/librte_eal/linux/eal_thread.c | 24 ++++----- > lib/librte_eal/rte_eal_version.map | 1 + > lib/librte_eal/windows/eal.c | 14 ++--- > lib/librte_eal/windows/eal_thread.c | 22 ++++---- > 20 files changed, 204 insertions(+), 177 deletions(-) > <snip> > int > -rte_eal_remote_launch(int (*f)(void *), void *arg, unsigned slave_id) > +rte_eal_remote_launch(int (*f)(void *), void *arg, unsigned worker_id) > { > int n; > char c = 0; > - int m2s = lcore_config[slave_id].pipe_master2slave[1]; > - int s2m = lcore_config[slave_id].pipe_slave2master[0]; > + int m2s = lcore_config[worker_id].pipe_init2worker[1]; > + int s2m = lcore_config[worker_id].pipe_worker2init[0]; > int rc = -EBUSY; > For completeness sake, these variable names, which appear in multiple places should be renamed too, m2s -> i2w, s2m -> w2i.