[dpdk-dev] [PATCH] usertools: enhance device bind script module detection

Pavan Nikhilesh Bhagavatula pbhagavatula at marvell.com
Mon Oct 28 15:50:04 CET 2019


>21/09/2019 20:16, pbhagavatula at marvell.com:
>> From: Pavan Nikhilesh <pbhagavatula at marvell.com>
>>
>> Some kernel modules have '-' in their name when populated in
>> '/sys/bus/pci/drivers/' where as the kernel always populates
>> '/sys/modules/' with '_'.
>> Replace '-' in module name with '_' to avoid script complaining
>> that module not loaded.
>
>Sorry it does not look obvious to me.
>Please, could you describe what is wrong and what is the real cause?
>

dpdk-devbind.py can also be used to bind devices to kernel modules.
Some kernel modules are registered with '-' in their name and are populated 
with '-' in '/sys/bus/pci/drivers/' but kernel populates the name in /sys/modules/ as '_'

This confuses the current script making it unable to bind to such modules. The patch 
addresses it by always replacing '-' with '_' when looking in /sys/modules/

Hope this clears things up.

Pavan.


More information about the dev mailing list