Intel Striving To Overhaul Their Multiple Ethernet Linux Drivers: "The Great Code Dedup"
Intel engineers maintain multiple Ethernet drivers in the Linux kernel for their wide-range of networking hardware from consumer to high-end data center wares. There's been an ongoing effort to overhaul their Ethernet driver management to reduce code duplication between the different drivers for better code sharing and with an end goal of more unification.
Sent out on Thursday was the sixth iteration of this ongoing work that is dubbed "The Great Code Dedup" for de-duplicating all of the redundant code between Intel's several Ethernet Linux drivers.
Intel networking driver engineer Alexander Lobakin explained in that latest patch series:
At the moment the patches lead to over 2k lines of code being dropped while adding just 1k lines of new code for the proposed "libie" commonized code.
In the end this should lead to better drive maintenance and code sharing for the Intel Ethernet drivers. It will be interesting to see what next features they have in mind for their Ethernet drivers once this "Great Code Dedup" is complete.
Sent out on Thursday was the sixth iteration of this ongoing work that is dubbed "The Great Code Dedup" for de-duplicating all of the redundant code between Intel's several Ethernet Linux drivers.
Intel networking driver engineer Alexander Lobakin explained in that latest patch series:
"Not a secret there's a ton of code duplication between two and more Intel ethernet modules. Before introducing new changes, which would need to be copied over again, start decoupling the already existing duplicate functionality into a new module, which will be shared between several Intel Ethernet drivers. The first name that came to my mind was "libie" -- "Intel Ethernet common library". Also this sounds like "lovelie" (-> one word, no "lib I E" pls) and can be expanded as "lib Internet Explorer" :P
The series is only the beginning. From now on, adding every new feature or doing any good driver refactoring will remove much more lines than add for quite some time. There's a basic roadmap with some deduplications planned already, not speaking of that touching every line now asks: "can I share this?". The final destination is very ambitious: have only one unified driver for at least i40e, ice, iavf, and idpf with a struct ops for each generation. That's never gonna happen, right? But you still can at least try.
PP conversion for iavf lands within the same series as these two are tied closely. libie will support Page Pool model only, so that a driver can't use much of the lib until it's converted. iavf is only the example, the rest will eventually be converted soon on a per-driver basis. That is when it gets really interesting. Stay tech."
At the moment the patches lead to over 2k lines of code being dropped while adding just 1k lines of new code for the proposed "libie" commonized code.
In the end this should lead to better drive maintenance and code sharing for the Intel Ethernet drivers. It will be interesting to see what next features they have in mind for their Ethernet drivers once this "Great Code Dedup" is complete.
18 Comments