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

Zhang, Qi Z qi.z.zhang at intel.com
Tue Jul 3 17:03:45 CEST 2018



> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas at monjalon.net]
> Sent: Tuesday, July 3, 2018 10:11 PM
> 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 14:59, Zhang, Qi Z:
> > > > +/**
> > > > + * this is a synchronous wrapper for secondary process send
> > > > + * request to primary process, this is invoked when an attach
> > > > + * or detach request issued from primary.
> > > > + */
> > > > +int eth_dev_request_to_primary(struct eth_dev_mp_req *req);
> > > > +
> > > > +/**
> > > > + * this is a synchronous wrapper for primary process send
> > > > + * request to secondary process, this is invoked when an attach
> > > > + * or detach request issued from secondary process.
> > > > + */
> > > > +int eth_dev_request_to_secondary(struct eth_dev_mp_req *req);
> > >
> > >
> > > Why do we need ethdev functions for IPC (mp request/response)?
> > > How this model can reasonnably scale to other device classes
> > > (crypto, compression, bbdev, eventdev, etc)?
> >
> > Yes it will be more generic to more the multi-process device sync
> > mechanism into eal layer.(rte_eal_hotplug_add/rte_eal_hotplug_remove)
> > I didn't do this is I'm not very sure if all anothers kinds of device
> > type need this, but if you think this is a good direction and we need to enable
> for all devices, I think this could be our next step. BTW, I guess ethdev still
> need some IPC to sync port_id which is specific for itself, and other device type
> may have similar requirement.
> 
> I don't understand what is specific to ethdev in this IPC.
> If it is just about a port id, I think it can be done elsewhere (EAL?)

Yes what I mean is port _id, I'm not sure if it can be done elsewhere, I need to check.

> 
> > > > --- /dev/null
> > > > +++ b/lib/librte_ethdev/ethdev_private.h
> > >
> > > What is the purpose of a file ethdev_private.h?
> 
> You did not reply this question.

the header file is used to declare the functions only be used by libethdev internally 
like eal_private.h, or I don't know where the three functions I should declared.

> 
> > > > +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?

> 
> > > 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