Closed
Conversation
790da55 to
e97a97e
Compare
Member
Author
|
/test |
7d10b9c to
282a6ad
Compare
Member
Author
|
/test |
020a9a9 to
fc7e0f3
Compare
Member
Author
|
/test |
Member
Author
|
/ci-e2e-upgrade |
Member
Author
|
/test |
5d95e62 to
0355c81
Compare
Member
Author
|
/test |
dc6acc0 to
fa262e0
Compare
Member
Author
|
/ci-e2e-upgrade |
fa262e0 to
402fd1a
Compare
Member
Author
|
/test |
Signed-off-by: Dylan Reimerink <dylan.reimerink@isovalent.com>
Signed-off-by: Dylan Reimerink <dylan.reimerink@isovalent.com>
Signed-off-by: Dylan Reimerink <dylan.reimerink@isovalent.com>
Signed-off-by: Dylan Reimerink <dylan.reimerink@isovalent.com>
Signed-off-by: Dylan Reimerink <dylan.reimerink@isovalent.com>
Signed-off-by: Dylan Reimerink <dylan.reimerink@isovalent.com>
Signed-off-by: Dylan Reimerink <dylan.reimerink@isovalent.com>
Signed-off-by: Dylan Reimerink <dylan.reimerink@isovalent.com>
Signed-off-by: Dylan Reimerink <dylan.reimerink@isovalent.com>
Signed-off-by: Dylan Reimerink <dylan.reimerink@isovalent.com>
Signed-off-by: Dylan Reimerink <dylan.reimerink@isovalent.com>
Signed-off-by: Dylan Reimerink <dylan.reimerink@isovalent.com>
Signed-off-by: Dylan Reimerink <dylan.reimerink@isovalent.com>
Signed-off-by: Dylan Reimerink <dylan.reimerink@isovalent.com>
Signed-off-by: Dylan Reimerink <dylan.reimerink@isovalent.com>
Signed-off-by: Dylan Reimerink <dylan.reimerink@isovalent.com>
Signed-off-by: Dylan Reimerink <dylan.reimerink@isovalent.com>
Signed-off-by: Dylan Reimerink <dylan.reimerink@isovalent.com>
Signed-off-by: Dylan Reimerink <dylan.reimerink@isovalent.com>
Signed-off-by: Dylan Reimerink <dylan.reimerink@isovalent.com>
Signed-off-by: Dylan Reimerink <dylan.reimerink@isovalent.com>
Signed-off-by: Dylan Reimerink <dylan.reimerink@isovalent.com>
402fd1a to
aa156ce
Compare
Member
Author
|
/test |
Member
Author
|
Closing in favor of #40416 which significantly improves upon this PR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
At present we use
ifdefs to manually determine when a map definition should be emitted into the object file. The object file gets parsed as collection spec, then when loading every map is created and its file descriptor linked into the bytecode before loading.Given the quest for clang-freedom, we wish to be able to pre-compile our programs and only load maps for features that are enabled at load time via global variables.
This commit introduces this capability. It works by static analysis of the BPF program. By figuring out the basic blocks and finding global data accesses we can find branching instructions which are always or never taken. By excluding the "dead" parts of the program we can see which maps will and will not be in use after the verifier did dead code elimination as part of the loading process.
We then remove the unused maps from the spec before loading.
This technique works for both
ifdefs as well as load time variables. Even for the current situation it is an improvement since we only need theifdefs around code using the map. All maps can now be unconditionally defined, and developers no longer have to think about when maps are or are not loaded.Fixes: #38375