|
|
Subscribe / Log in / New account

iproute2 and libbpf: vendoring on the small scale

iproute2 and libbpf: vendoring on the small scale

Posted Nov 14, 2020 8:40 UTC (Sat) by madhatter (subscriber, #4665)
Parent article: iproute2 and libbpf: vendoring on the small scale

It seems to me that the underlying problem is that the person who decided to refactor iproute2 to use libbpf started with the latest version of libbpf. At that point, the problem was baked in, and waiting to hatch.

If you're going to try to do this kind of thing, and thus add a dependency, start with the oldest version of the library used by any still-supported version of a major distro. If you want to use newer features, that's fine, you can do feature-detection at compile time and use newer stuff if (and only if) it's there (as danobi mentions the bpftrace people do, in a comment above). Distros that happen to be on newer versions can thus take advantage of that, without introducing show-stoppers for distros that don't.

If instead you start off your refactoring by requiring a library version that's not even in the very latest version of a major distro, you're heading for trouble. When you hit it, saying it's the distro user's fault, and that they need to upgrade the library, isn't going to impress the user community, or speed up acceptance of your work.


to post comments

iproute2 and libbpf: vendoring on the small scale

Posted Nov 14, 2020 16:41 UTC (Sat) by ballombe (subscriber, #9523) [Link]

I do not know the specific, but I have done similar tasks.
At some point you hit bugs or missing feature in the library you intent to use, so you send patches for those and depend on the first version of the library that have the fix or needed feature, even though it was not what was planned.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds