[PATCH] usertools: rewrite pmdinfo

Ferruh Yigit ferruh.yigit at xilinx.com
Tue Sep 13 15:50:00 CEST 2022


On 9/13/2022 12:49 PM, Robin Jarry wrote:
> CAUTION: This message has originated from an External Source. Please use proper judgment and caution when opening attachments, clicking links, or responding to this email.
> 
> 
> Ferruh Yigit, Sep 13, 2022 at 13:29:
>> Hi Robin,
>>
>> Thanks for the work.
>>
>> One of the major usecase of the script is to get information from binary
>> drivers. So intentions of the script is to run it on drivers more than
>> applications (dpdk-testpmd).
>>
>> When I run it on one of the .so drivers, it is generating some warnings
>> [1], is this expected?
>>
>> [1]
>> $ ./usertools/dpdk-pmdinfo.py ./build/drivers/librte_net_ixgbe.so
>>
>>
>> warning: cannot find librte_ethdev.so.23
>> warning: cannot find librte_eal.so.23
>> warning: cannot find librte_kvargs.so.23
>> warning: cannot find librte_telemetry.so.23
>> warning: cannot find librte_net.so.23
>> warning: cannot find librte_mbuf.so.23
>> warning: cannot find librte_mempool.so.23
>> warning: cannot find librte_ring.so.23
>> warning: cannot find librte_meter.so.23
>> warning: cannot find librte_bus_pci.so.23
>> warning: cannot find librte_pci.so.23
>> warning: cannot find librte_bus_vdev.so.23
>> warning: cannot find librte_hash.so.23
>> warning: cannot find librte_rcu.so.23
>> warning: cannot find librte_security.so.23
>> warning: cannot find librte_cryptodev.so.23
>> [
>>     {
>>       "name": "net_ixgbe_vf",
>>       "params": "pflink_fullchk=<0|1>",
>>       "kmod": "* igb_uio | vfio-pci",
>>       "devices": [
>> ...
>> ...
> 
> Hi Ferruh,
> 
> yes it tries to parse all required (DT_NEEDED) dynamic libraries as did
> the previous version of the script. The warnings are displayed when
> a needed lib is not found.
> 
> You can fix that by exporting LD_LIBRARY_PATH:
> 
> $ LD_LIBRARY_PATH=build/lib/:build/drivers/ usertools/dpdk-pmdinfo.py build/drivers/librte_net_ixgbe.so | head
> [
>    {
>      "name": "net_ixgbe_vf",
>      "params": "pflink_fullchk=<0|1>",
>      "kmod": "* igb_uio | vfio-pci",
>      "devices": [
>        {
>          "vendor_id": "8086",
>          "device_id": "10ed",
>          "subsystem_device_id": "ffff",
> ...
> ...
> 
> If the libraries are installed in a standard path, it should not be
> necessary to export LD_LIBRARY_PATH.

I confirm warnings are gone when `LD_LIBRARY_PATH` is provided, but why 
current version doesn't require `LD_LIBRARY_PATH`?

Also can it be possible to parse 'DT_NEEDED' for applications, but 
ignore it for dynamic libraries?


More information about the dev mailing list