-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Refactor proxy handling and improve monitor messages #10906
Refactor proxy handling and improve monitor messages #10906
Conversation
test-me-please |
Coverage increased (+0.02%) to 44.631% when pulling bccf7ce379e939a3e7c77711792de818777581a1 on joestringer:submit/defer-proxy-to-hostdev-ingress into 462da1d on cilium:master. |
65b7a66
to
d7cefa1
Compare
test-me-please |
Also seeing lots of messages like this now which aren't overly informative, I wonder if we should avoid logging them:
(Just noticed while testing; don't know for sure it's this PR yet but I will confirm before setting this for further review) |
d7cefa1
to
95dae1e
Compare
test-me-please |
Hit #10763 . Otherwise should be ready for review. |
@pchaigno this will conflict with your host firewall PR, so let's co-ordinate on how to rebase. This one is a lot smaller so it may make sense for me to just rebase on top of your changes. The logic here is using |
95dae1e
to
826ed7f
Compare
test-me-please |
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.
Not marked as pending review, but here are a few nits anyway.
Also there's a conflict on bpf/lib/l3.h. Plus I guess the conflicts with Paul's PR to solve somehow.
826ed7f
to
bccf7ce
Compare
test-me-please |
I pinged @pchaigno offline and we agreed that I should swap the |
Signed-off-by: Joe Stringer <[email protected]>
This makes it easier to ensure that only the relevant changes are imported into headers in other upcoming changes. No functional changes. Signed-off-by: Joe Stringer <[email protected]>
Depending on the path through the datapath, skb->cb[0] may be used either for proxy magic port state transfer or encryption. Make these a bit more explicit using macros and enums. No functional changes. Signed-off-by: Joe Stringer <[email protected]>
Send a trace notification when traffic that should be encrypted, or traffic with no encrypt/proxy logic, passes through the hostdev prog. Signed-off-by: Joe Stringer <[email protected]>
This logic was configuring the mark from the bpf_hostdev_ingress program. Future commits will plan to replace this logic with socket assign logic, so factor it out into the proxy.h header so that all proxy redirect logic will be in one header. Signed-off-by: Joe Stringer <[email protected]>
These messages would always show up in monitor output, sometimes multiple times, because we were capturing the full content of the packet. Reduce this to a standard debug message. Signed-off-by: Joe Stringer <[email protected]>
This will make a subsequent change easier to manage. Signed-off-by: Joe Stringer <[email protected]>
In the case where we will already return CTX_ACT_OK to pass traffic through from the TC egress of the cilium_host device onto the TC ingress (and hence bpf_hostdev_ingress) prog of the cilium_net device, defer the logic for configuring the mark appropriately until the hostdev program. This way, future code that refactors the implementation (which relies on executing in tc ingress) may be easily written on top. Signed-off-by: Joe Stringer <[email protected]>
bccf7ce
to
518cc59
Compare
test-me-please |
Suggested review commit-by-commit.
Intended functional changes:
These changes are intermediate refactors to simplify the upcoming BPF tproxy PR, also to help bisect any potential regressions.
Related: #9921