> On Wed, 10 Aug 2022 01:51:55 +0000
> Chaoyong He <chaoyong...@corigine.com> wrote:
> 
> > > On Mon, 8 Aug 2022 11:32:30 +0000
> > > Chaoyong He <chaoyong...@corigine.com> wrote:
> > >
> > > > > > +           goto done;
> > > > > > +
> > > > > > +   /* Allocate memory for the eth_dev of the vNIC */
> > > > > > +   hw->eth_dev = rte_zmalloc("ctrl_vnic_eth_dev",
> > > > >
> > > > > Why not rte_eth_dev_allocate()? Isn't an ethdev?
> > > > > Why do you bypsss ethdev layer in this case completely and do
> > > > > everything yourself?
> > > >
> > > > Here we created an ethdev locally to nfp PMD, we want the user
> > > > totally
> > > won't be aware of it.
> > > > If we use rte_eth_dev_allocate() to create it, it will be in array
> > > 'rte_ethdev_devices[]', that's not we want.
> > >
> > > Having a floating ethdev does open the code and users up to a number
> > > of potential bugs.
> > > What is the value of port_id on that ethdev? What is the mechanism
> > > to ensure it doesn't conflict with other ones in the system.
> >
> > The 'port_id' is the 'Device [external] port identifier', which
> > related with the 'rte_ethdev_devices[]' I think.
> > Here the ethdev we created is not exposed to the user and is not in the
> 'rte_ethdev_devices[]'
> > array, so it can't be invoked by the user at all.
> > And we invoke this ethdev through a pointer in the `struct
> > nfp_net_hw`, so I think there should no conflict with other ones in the
> system.
> 
> DPDK already has a port ownership framework to deal with internal ethernet
> device ports. Why was this not used?

Sorry I have no knowledge about this framework before. Any document link or 
logic about
this framework will be greatly appreciated. Thanks!

Reply via email to