dpdk-devbind.py ./. bonding interfaces
Checks
Commit Message
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
Comments
On Sat, 25 Jun 2022 01:13:01 +0200
qcqx-obaq.6cba8489@hashmail.org wrote:
> 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
Sounds like a libmoon bug, not a DPDK bug.
There are many more types of joined devices in Linux, and just doing
bonding seems wrong.
Also, since your patch is missing Signed-off-by with a valid name,
it can not be accepted.
@@ -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):