09/03/2021 10:53, Ferruh Yigit: > On 3/9/2021 8:49 AM, oulijun wrote: > > 2021/3/9 1:33, Ferruh Yigit: > >> Similar to above comment 'rte_eth_devices' is the internal variable, > >> applications should not access it directly. > >> > > No API is available, and multiple references exist in the testpmd file. > > Technically 'rte_eth_devices' is still visible to the applications because of > the static inline functions, in theory it should be hidden. > > But this variable accessed by our test application multiple times may be the > sign that something more is missing. > > Thomas, Andrew, what to you think to try to clean this usage from testpmd and > add more APIs if needed for this?
I fully agree. The test applications and examples should help identifying gaps in the libraries. So we should not workaround the official API.