[dpdk-dev] [PATCH v2 3/4] net/failsafe: replace local sub-device with shared data
thomas at monjalon.net
Tue Mar 5 18:58:04 CET 2019
05/03/2019 18:38, Gaëtan Rivet:
> > fs_dev_remove(struct sub_device *sdev)
> > - rte_eth_dev_close(PORT_ID(sdev));
> > + rte_eth_dev_close(edev->data->port_id);
> Ok I see. I missed that during the first reading, the private_data is
> zeroed on dev_close(), so ETH(sdev) becomes invalid here.
I don't follow you. What do you mean with this comment?
> What happens when a primary process closes a device before a secondary?
> Is the secondary unable to stop / close its own then? Isn't there some
> missing uninit?
Is the secondary process supposed to do any closing?
The device management should be done only by the primary process.
Note: anyway all this hotplug related code should be dropped
from failsafe to be replaced by EAL hotplug management.
> This seems dangerous to me. Why not instead allocating a per-process
> slab of memory that would hold the relevant references and outlive the
> shared data (a per-process rte_eth_dev private data...).
Which data do you think should be allocated per process?
More information about the dev