[PATCH v5 07/12] net/nfp: add flower ctrl VNIC related logics

Stephen Hemminger stephen at networkplumber.org
Mon Aug 8 16:45:42 CEST 2022


On Mon, 8 Aug 2022 11:32:30 +0000
Chaoyong He <chaoyong.he at 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.


More information about the dev mailing list