-
Notifications
You must be signed in to change notification settings - Fork 225
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
patch: rewrite bpf spec before loading to avoid bpf map lookup during runtime #376
Conversation
Tested locally, CI should be green too. |
Breakage can also be seen on main. |
I'm in Shenzhen these days. I'll take a review on weekends as long as I'm free. Thank you! |
Link to #375 |
@mzz2017 这个 PR 比较简单, 也不涉及功能性修改, 应该比较好 review :pitiful: |
I'll take a look right now. |
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.
Will this approach occupy registers for a long time? According to my previous experience, using map will reduce register usage. |
Previously we call
bpf_map_lookup
constantly to fetch tproxy_pid and tproxy_port, which can be done in a more efficient way by rewriting bpf spec. This PR improves this part without any functional change.