numam-dpdk/usertools
Pavan Nikhilesh 4362312431 usertools: fix device binding module detection
Some kernel modules use '-' in their name when registering through
`pci_register_driver` and the same name  is populated in
'/sys/bus/pci/drivers/'.
But the kernel always populates modules names replacing '-' with '_'
in '/sys/module/'.

Example:
	# ./usertools/dpdk-devbind.py -b octeontx2-nicpf 0002:03:00.0
	Error: Driver 'octeontx2-nicpf' is not loaded.

	# ls /sys/bus/pci/drivers/octeontx2-nicpf
	bind  module  new_id  remove_id  uevent  unbind
	# ls /sys/module/octeontx2_nicpf/
	drivers  uevent  version

The patch addresses it by always replacing '-' with '_' when looking in
'/sys/module/'

Signed-off-by: Phanendra Vukkisala <pvukkisala@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
2019-11-27 00:00:24 +01:00
..
cpu_layout.py usertools: change to SPDX license identifier 2018-04-11 01:48:12 +02:00
dpdk-devbind.py usertools: fix device binding module detection 2019-11-27 00:00:24 +01:00
dpdk-pmdinfo.py usertools: fix pmdinfo with python 3 and pyelftools>=0.24 2019-10-27 21:35:51 +01:00
dpdk-setup.sh usertools: add baseband device binding 2019-07-04 23:44:58 +02:00
dpdk-telemetry-client.py usertools: fix telemetry client with python 3 2019-10-27 21:38:40 +01:00
meson.build build: replace license text with SPDX tag 2018-01-30 21:58:59 +01:00