bpf: use ebpf.VariableSpec API for rewriting global constants#35988
bpf: use ebpf.VariableSpec API for rewriting global constants#35988ti-mo merged 3 commits intocilium:mainfrom
Conversation
43cd12b to
8329972
Compare
|
/test |
8329972 to
a312d6f
Compare
|
/test |
a312d6f to
bc75729
Compare
|
/test |
bc75729 to
5bf52ac
Compare
|
/test |
5bf52ac to
acfbdff
Compare
|
/test |
00a6ad6 to
d4587e3
Compare
|
/test |
d4587e3 to
451e557
Compare
|
/test |
julianwiedmann
left a comment
There was a problem hiding this comment.
Changes lgtm, one nit below. But CI is not very happy ...
You'd also need to rebase once more, I just added an additional NATIVE_DEV_IFINDEX usage in the datapath :disappear:.
dylandreimerink
left a comment
There was a problem hiding this comment.
Changes look good to me
451e557 to
e9a85d5
Compare
Looks like I wrongly removed the ifindex override from
All good, thanks for the heads up. 👍 |
|
/test |
sayboras
left a comment
There was a problem hiding this comment.
Looks good for ebpf go.mod, understand that the v0.17.0 will be released soon.
|
One more rebase to pick up #36235 should heal CI 🤞 |
Signed-off-by: Timo Beckers <[email protected]>
…lobals This commit removes compatibility with kernels 5.1 and older. From this point on, Cilium relies on a read-only map to hold its datapath configuration data, and config values will no longer be inlined into the bytecode. This patch uses the new ebpf.VariableSpec abstraction for applying configuration data to a CollectionSpec. It also expands supported data types for runtime substitution to signed integers and booleans, where before only unsigned integers were allowed. Signed-off-by: Timo Beckers <[email protected]>
…NDEX This is an example of converting a legacy preprocessor macro to a runtime configurable. The default value of a configurable after declaring it with DECLARE_CONFIG() is zero, so no need to assign dummy values. Use ASSIGN_CONFIG to override the contents in tests after importing a declaration. To avoid large refactors and churn, define e.g. THIS_INTERFACE_IFINDEX as a macro around an accessor like CONFIG(interface_ifindex). The section in TestWriteStaticData was removed because it only really checked whether the logic in loader.ELFVariableSubstitutions roughly matches the one in cfg.writeStaticData, which is of dubious benefit. A follow-up patch will remove ELFVariableSubstitutions, so let's put it out of its misery instead of rejigging it even more. Signed-off-by: Timo Beckers <[email protected]>
e9a85d5 to
39bc851
Compare
|
/test |
Uh oh!
There was an error while loading. Please reload this page.