14/10/2021 14:32, lihuisong (C): > Hi, Thomas > > *The commit logļ¼* > In secondary process, rte_eth_dev_close() doesn't clear eth_dev->data. > If calling rte_dev_remove() after rte_eth_dev_close(), in > rte_eth_dev_pci_generic_remove() > function, the released eth device still can be found by its name in > shared memory. > As a result, the eth device will be released repeatedly. The state of > the eth device > is modified to RTE_ETH_DEV_UNUSED after rte_eth_dev_close(). So this > state can > be used to avoid this problem. > > Is that will be more clear?
Yes, that's clear (at least for me). > /* > * A released eth device can be found by its name in shared memory. > * If the state of the eth device is RTE_ETH_DEV_UNUSED, which means > * the eth device has been released. > */ > > Is it ok to use the above description as a comment in the code? Yes. One small change, I think "which" should be "it". > Hope for your reply. Thanks. Thanks