23/09/2020 18:44, Ferruh Yigit: > On 9/13/2020 11:07 PM, Thomas Monjalon wrote: > > * Note 3: > > The port is supposed to be in a stopped state when it is closed. > > If it is not the case, it is free to the PMD implementation > > how to react when trying to close a non-stopped port: > > either try to stop it automatically or just return an error. > > For this note, 'rte_eth_dev_close()' assumes port stopped and sets > "dev->data->dev_started = 0;" blindly. > > should we verify this, or perhaps should call 'rte_eth_dev_stop()' > within the 'rte_eth_dev_close()' to be sure.
Good point. I wonder why dev_started is changed in the close. It is set in rte_eth_dev_stop(), that should be enough. But clearly it is a different issue which should be adressed separately. > Also many PMDs doesn't check primary process check in the close, which > should be fixed too, I wonder if it can be fixed in this series? You mean forbid close operation from secondary process?