[dpdk-dev] [PATCH v3 7/7] app/testpmd: adjust ethdev port ownership

Ananyev, Konstantin konstantin.ananyev at intel.com
Thu Jan 25 12:55:53 CET 2018



> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas at monjalon.net]
> Sent: Thursday, January 25, 2018 11:33 AM
> To: Ananyev, Konstantin <konstantin.ananyev at intel.com>
> Cc: Matan Azrad <matan at mellanox.com>; Gaëtan Rivet <gaetan.rivet at 6wind.com>; Wu, Jingjing <jingjing.wu at intel.com>;
> dev at dpdk.org; Neil Horman <nhorman at tuxdriver.com>; Richardson, Bruce <bruce.richardson at intel.com>
> Subject: Re: [dpdk-dev] [PATCH v3 7/7] app/testpmd: adjust ethdev port ownership
> 
> 25/01/2018 12:15, Ananyev, Konstantin:
> > Hi everyone,
> >
> > >
> > > 25/01/2018 10:36, Matan Azrad:
> > > > Gaetan, Konstantin, Thomas
> > > >
> > > > Any response to my suggestion below?
> > > >
> > > > From: Matan Azrad
> > > > > Suggestion:
> > > > >
> > > > > 2 system owners.
> > > > > APP_OWNER - 1.
> > > > > NO_OWNER - 0.
> > > > >
> > > > > And allowing for more owners as now.
> > > > >
> > > > > 1. Every port creation will set the owner for NO_OWNER (as now).
> > > > > 2. There is option for all dpdk entities to take owner of  NO_OWNER ports all
> > > > > the time(as now).
> > > > > 3. In some point in the end of EAL init: set all the NO_OWNER to
> > > > > APP_OWNER(for V6).
> >
> > What will happen if we have 2 (or more process) sharing the same device?
> > How we will distinguish what APP_OWNER we are talking about?
> > Shouldn't default_owner be unique per process?
> 
> Yes, good point!
> Each application process should be considered a different owner
> by default.
> 
> > > > > 4. Change the old iterator to iterate over APP_OWNER ports(for V6).
> >
> > If I get it right it means no changes in tetpmd, correct?
> 
> It is my understanding yes.

Sounds reasonable to me then.

> 
> > > > > What do you think?
> > >
> > > Reminder for everybody: there is no issue if no hotplug.
> > > There is a race condition with hotplug.
> > > Hotplug is not managed by EAL yet, but there is a temporary hotplug
> > > management in failsafe.
> > > So until now, the issue is seen only with hotplug in failsafe.
> > >
> > > Your suggestion makes no change for applications,
> > > and fix the ownership issue for failsafe.
> > > And later, if an application wants to support generic hotplug properly
> > > (when it will be generally available in DPDK),
> > > the application should use the ownership API.
> > > Right?
> > >
> > > I think it is a good compromise.
> >
> > I still think it would be good if future hotplug support will be transparent
> > to existing apps (no/minimal changes).
> > But I suppose we can discuss it later, when will have hotplug patches.
> 
> It cannot be really transparent.
> If an application is based on port detection at init, it has to be changed
> to decide how to handle new ports.
> That's why I introduced the new events for ethdev notification callback.

Ok, but I think, most processes would just assign default_owner for newly plugged device. 
For that case I don't see why it can't be transparent.
Anyway, that's probably a topic for new mail thread.
Konstantin




More information about the dev mailing list