[dpdk-dev] [RFC] replace master/slave with primary/secondary

Gaëtan Rivet grive at u256.net
Fri Jun 5 12:43:00 CEST 2020


On 04/06/20 18:04 -0700, Stephen Hemminger wrote:
> I have a full patch that replaces the master/slave lcore
> naming (widely used in DPDK) with a better primary/secondary naming.
> 
> For now this is just a trial balloon to see what the impact would
> look like. The change mostly automated so likely that things
> are broken.
> 
> It is hard to break a change like this down, and still
> keep git bisection clean.
> 
> It keeps rte_master_lcore_id and RTE_FOREACH_SLAVE as deprecated
> items so that user code can still be built but they will be motivated
> to change.
> 
> Here is a sample of what it would look like:
> 

I think PRIMARY is a poor choice to describe the control thread. PRIMARY
is often used to designate the active element currently doing the work.
SECONDARY threads are also active threads doing equal dataplane work.

Another issue I see with primary / secondary is the ambiguity with
multi-process in DPDK. Doc readers could get confused about where a
primary / secondary thread is executed.

I think we could use instead DPDK-specific terminology. The lcore
organization is a little specific, with an lcore that does most init work
and spawns the others, but then runs the application like all others.

I'd propose instead leader lcore - there is this idea that the leader
is still a member of the team and will participate in the work.

Leader / worker?

-- 
Gaëtan


More information about the dev mailing list