To whom it may concern.
usertools/dpdk-devbind.py currently does not recognize interfaces that are part of a bond as active. that can be a nuisance if you are using something like libmoon which proactively rebinds drivers for all "not active" interfaces. yes, i am aware of the dpdk contribution guideline. no, i am not going to jump through linux-kernel level hoops for a trivial 9-sloc-python driveby-contrib. yes, that glorious code is all written by me, i promise i didnt steal it, and whoever takes pity and merges it is free to claim full credits for it. (if you feel bad about claiming credits for something you didnt write, perhaps find more useful names for "f" and "l" and/or add some comment above it...) yes, i promise i will read and respect the contrib guide if i ever want to contrib code that took longer to write than it takes to read the contrib guide. regards, x23 diff --git a/usertools/dpdk-devbind.py b/usertools/dpdk-devbind.py index 4d9c1be666..d02552de33 100755 --- a/usertools/dpdk-devbind.py +++ b/usertools/dpdk-devbind.py @@ -244,6 +244,16 @@ def get_device_details(devices_type): if rt_info[i] == "dev": ssh_if.append(rt_info[i + 1]) + bdir = "/proc/net/bonding" + if os.path.exists(bdir): + for bn in os.listdir(bdir): + f = open(os.path.join(bdir, bn)) + bs = f.read() + f.close() + for l in bs.splitlines(): + if l[:17] == "Slave Interface: ": + ssh_if.append(l[17:]) + # based on the basic info, get extended text details for d in devices.keys(): if not device_type_match(devices[d], devices_type):