usertools: use optimized driver override scheme to bind
authorGuduri Prathyusha <gprathyusha@caviumnetworks.com>
Wed, 22 Mar 2017 14:11:29 +0000 (19:41 +0530)
committerThomas Monjalon <thomas@monjalon.net>
Tue, 25 Apr 2017 09:35:24 +0000 (11:35 +0200)
commit2fc3502935700243d9a6d903166e6fd11e429843
treea5e29cee366552cc7e4fb0722140d9630ece0bc6
parentc3ce205d5729867bd1c4c4429a80e01a528d5905
usertools: use optimized driver override scheme to bind

The current device bind model uses /sys/bus/pci/driver/new_id scheme to
bind devices to the driver. This scheme has following operations to bind
a device to the driver.
1) Write device ID and vendor ID to /sys/bus/pci/driver/new_id
2) Write PCI BDF number to /sys/bus/pci/driver/bind
3) On step (1), _All_ the devices that match the device ID and vendor ID
get bound to the driver
4) Except for requested devices, Unbind the remaining devices

In kernels >= 3.15, An alternative scheme driver_override can be used to
bind a device to driver.This scheme has following operations to bind a
device to driver.
1) Write driver to /sys/bus/pci/device/driver_override
2) Write PCI BDF number to /sys/bus/pci/driver/bind

This script detects the presence of /sys/bus/pci/device/driver_override,
if available use optimized bind scheme to bind it

Signed-off-by: Guduri Prathyusha <gprathyusha@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
usertools/dpdk-devbind.py