On Wed, Dec 13, 2023 at 11:31:50AM +0100, Petr Machata wrote:
Hmm, maybe we could side-step the issue? I suspect that vast majority of
what bonding uses are just generic helpers. log_test, check_err, that
sort of stuff. Unless I missed something, all of them set NUM_NETIFS=0.
Those things could all be in the generic net/lib.sh. So long-term it
might be possible for bonding to do the trick with symlinking, except
with just net/lib.sh, not both libs.
I think that most of forwarding/lib.sh actually belongs to net/lib.sh.
We reinvent a lot of that functionality in various net/ tests, because,
presumably, people find it odd to source forwarding/lib.sh. If it all
lived in net/, we could reuse all these tools instead of cut'n'pasting
them from one test to the other. Stuff like the mcast_packet_test,
start/stop_traffic, etc., would probably stay in forwarding.
So that's long-term. And short-term we can live with the ugly-as-sin
workaround that I propose?
For bonding only I think this is a good resolution. For other driver tests
that may still need to include forwarding/lib.sh. I think the way Benjamin
suggested is a good choice.
Thanks
Hangbin