[dpdk-dev] [Linuxarm] Re: [PATCH V2] app/testpmd: support Tx mbuf free on demand cmd

oulijun oulijun at huawei.com
Fri Mar 12 11:29:21 CET 2021



在 2021/3/10 15:59, Thomas Monjalon 写道:
> 10/03/2021 02:48, oulijun:
>> Can we add an API such as rte_eth_get_device(pord_id)
>>
>> for example:
>> struct rte_eth_dev *
>> rte_eth_get_device(uint16_t port_id)
>> {
>>          return &rte_eth_devices[port_id];
>> }
> An application is not supposed to access the struct rte_eth_dev.
> Which info do you need from this struct?
Applications cannot directly access the global variable 
rte_eth_devices[]. To obtain information about rte_eth_dev, they need to 
access the global variable through APIs instead of directly.
> _______________________________________________
> Linuxarm mailing list -- linuxarm at openeuler.org
> To unsubscribe send an email to linuxarm-leave at openeuler.org



More information about the dev mailing list