[dpdk-dev] [PATCH v8 03/19] ethdev: enable hotplug on multi-process

Zhang, Qi Z qi.z.zhang at intel.com
Wed Jul 4 04:26:39 CEST 2018



> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas at monjalon.net]
> Sent: Wednesday, July 4, 2018 6:36 AM
> To: Zhang, Qi Z <qi.z.zhang at intel.com>
> Cc: dev at dpdk.org; Burakov, Anatoly <anatoly.burakov at intel.com>; Ananyev,
> Konstantin <konstantin.ananyev at intel.com>; Richardson, Bruce
> <bruce.richardson at intel.com>; Yigit, Ferruh <ferruh.yigit at intel.com>; Shelton,
> Benjamin H <benjamin.h.shelton at intel.com>; Vangati, Narender
> <narender.vangati at intel.com>
> Subject: Re: [dpdk-dev] [PATCH v8 03/19] ethdev: enable hotplug on
> multi-process
> 
> 03/07/2018 23:57, Thomas Monjalon:
> > 03/07/2018 17:03, Zhang, Qi Z:
> > > From: Thomas Monjalon [mailto:thomas at monjalon.net]
> > > > 03/07/2018 14:59, Zhang, Qi Z:
> > > > > > > +do_eth_dev_attach(const char *devargs, uint16_t *port_id);
> > > > > >
> > > > > > So you are duplicating rte_eth_dev_attach which is flawed in
> > > > > > its design and should be deprecated...
> > > > >
> > > > > OK, just to know this, but I guess it will not be the issue, if
> > > > > we move the dev
> > > > sync mechanism into eal layer in future right?
> > > >
> > > > Future is now :)
> > > > We must stop mixing devargs and port id in the same layer.
> > >
> > > Ok, is there any RFC I can learn?
> >
> > RFC for what?
> > It is just a design issue that we must stop propagating.
> 
> Please read at this commit, which is 2 years old:
> 	http://git.dpdk.org/dpdk/commit/?id=b0fb26685570
> It was starting to fix early design mistakes, but unfortunately it is not yet totally
> fixed today.

OK, rte_eth_dev_attach is going to be deprecated.
Do you mean we will use rte_eal_hotplug_add to attach a device directly, 
then the device driver will be responsible for propagating all the ethdev port, 
and application could register callback for RTE_ETH_EVENT_NEW to know new ports are created, 
is that correct?

> 
> > > > > > As you may have noticed, rte_eth_dev_attach() is calling
> > > > > > rte_eal_hotplug_add() which manages the EAL device.
> > > > > > It is wrong because the relation between an ethdev port and an
> > > > > > EAL device is not a 1:1 mapping.
> > > > > > We must manage the ethdev port as one of the possible
> > > > > > abstractions of a device represented by rte_device.
> 
> 



More information about the dev mailing list