-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Loader modularization #30280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Loader modularization #30280
Conversation
Commits 4c7104b, 68e8cf8 do not match "(?m)^Signed-off-by:". Please follow instructions provided in https://docs.cilium.io/en/stable/contributing/development/contributing_guide/#developer-s-certificate-of-origin |
68e8cf8
to
ae50dbe
Compare
22e49b7
to
a65974a
Compare
/test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, pulled in Timo as well to have more loader 👀 on this change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cilium-dbg related changes lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Left a few suggestions, but these can be picked up in follow-ups as well.
a65974a
to
e1e7ed2
Compare
/test |
This commit unexports all types and functions on the package itself except for the Loader interface. All functions accessed from outside the package now are methods of this interface. This makes the API boundary of the loader package more explicit and easier to reason about and refactor. It is also a first step towards turning the loader package into a module. Signed-off-by: Dylan Reimerink <dylan.reimerink@isovalent.com>
This commit changes the loader into a cell. The Datapath object depends on it and re-distributes it still (for now). All locations that created a loader now reuse the loader instance from hive. The exception being tests which did not yet use hive. Signed-off-by: Dylan Reimerink <dylan.reimerink@isovalent.com>
e1e7ed2
to
3b31891
Compare
/test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sig-agent
✔️
Nice - thanks Dylan!
This PR turns the eBPF loader in
pkg/datapath/loader
into a Hive cell. It also unexported all symbols where possible. Global functions which were called outside of the package have been moved to the Loader interface so we have a single clear API boundary, making it easier to improve upon in the future.This step will also make it easier to move non-loader logic outside of the package by allowing us to then still depend on the logic via hive.
Part of #30024