refactor(bpf): Introduce route_decision struct#836
Open
jschwinger233 wants to merge 3 commits intodaeuniverse:mainfrom
Open
refactor(bpf): Introduce route_decision struct#836jschwinger233 wants to merge 3 commits intodaeuniverse:mainfrom
jschwinger233 wants to merge 3 commits intodaeuniverse:mainfrom
Conversation
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.
Background
之前 route() 返回一个 s64 承载
outbound | mark << 8 | must << 40,不好读,不好扩展。为了实现 #818 必须在 route() 结果里带上 redirect_ifindex 和 redirect_dir,之前的 64 bits 无法扩展,这个 pr 作为预备工作引入了 route_decision 结构体方便之后扩展,无业务逻辑改动。(建议按照 commit review,有个调整缩进的改动让 diff 变得不堪入目,我单独扔到一个 patch)
Checklist
Full Changelogs
Issue Reference
Closes #[issue number]
Test Result