-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Docs: clarify QUIC BPF operation #15845
Comments
Yeah in addition to documentation, I agree we should have logging on which mode, and potentially even have it be configurable with error message if the kernel doesn't support it, not run as root, etc. |
I'll throw this Dan's way as part of the docs clean up for Alpha |
Actually @DavidSchinazi since you were looking for things to pick up, could you take on logging BPF success/failure to make it clear if it's working or not? |
I'm adding some of the above comments to my docs PR, and just tagging moderation as co-author. I think with that and a log message we can close this one off. |
Adding a log message when that function fails sounds good. @RenjieTang could you take this on please? |
/assign @RenjieTang |
When the BPF socket option is added, it will be applied in ActiveQuicListener constructor at https://github.com/envoyproxy/envoy/blob/main/source/common/quic/active_quic_listener.cc#L57, which calls down to SocketOptionImpl::setOption(), where a syscall return value is checked and warning logged. So it looks like we are doing the correct logging? I'm confused on why these logs didn't show up in the output. |
So running as non-root there's no warning becasue BPFwon't install with concurrency =1, so fine I can update docs and add an info log about that. I'm still not seeing warnings or errors when I run with c=2 and I'm not running as root. I wonder if this is the casue of #15988 that we don't have permissions to install the filter but we're not getting an error somehow? Or maybe the assertions about root aren't correct? |
By running bazel-bin/source/exe/envoy-static --config-path configs/envoyproxy_io_proxy_http3_downstream.template.yaml -l warn --concurrency 2 |
Adding an informative log since I ended up confused when trying to sort out #15845 and needed to fix #15926 accordingly. Risk Level: n/a (adding info log) Testing: manual Signed-off-by: Alyssa Wilk <[email protected]>
yeah, I think BPF works at least on our workstations without special permissions, so I'm going to update the docs PR to remove the "requires root" and just say "it tries, and may require root and will log warnings if it fails" and call it a day. |
Adding an informative log since I ended up confused when trying to sort out envoyproxy#15845 and needed to fix envoyproxy#15926 accordingly. Risk Level: n/a (adding info log) Testing: manual Signed-off-by: Alyssa Wilk <[email protected]> Signed-off-by: Gokul Nair <[email protected]>
Adding an informative log since I ended up confused when trying to sort out envoyproxy#15845 and needed to fix envoyproxy#15926 accordingly. Risk Level: n/a (adding info log) Testing: manual Signed-off-by: Alyssa Wilk <[email protected]> Signed-off-by: Gokul Nair <[email protected]>
Unhiding HTTP/3 upstream and downstream configuration, linking to example configs, and updating docs for HTTP/3 alpha. Risk Level: n/a Testing: n/a Docs Changes: yes Release Notes: inline #14829 #2557 #15845 Fixes #12923 Co-Authored-By: Michael Payne [email protected] Signed-off-by: Alyssa Wilk <[email protected]>
Title: Docs: clarify QUIC BPF operation
Description:
Prompted by the Twitter chat at https://twitter.com/mattklein123/status/1378172039870091265 I looked into the runtime flag that allows QUIC routing in the kernal via BPF - https://github.com/envoyproxy/envoy/blob/main/source/common/runtime/runtime_features.cc#L82
Installing BPF rules like this requires one of:
sudo setcap cap_bpf+ep <envoy binary>
sudo cap_net_admin,cap_sys_admin+ep <envoy binary>
From initial testing Envoy doesn't display any different output when launched in different modes. QUIC / h3 listeners work whether Envoy was launched with the elevated permissions or not.
It would be good to clarify in the docs what steps need to be taken to enable QUIC BPF kernel routing and what platforms work and don't work. It looks like this is Linux only at the moment. It might be worthwhile logging whether the BPF rule has been installed successfully - https://github.com/envoyproxy/envoy/blob/main/source/common/quic/active_quic_listener.cc#L234-L298
Relevant Links:
Handy reference on determine what Linux Capabilities your system supports - https://linux-audit.com/linux-capabilities-101/
/cc @ggreenway @alyssawilk @danzh2010 @mattklein123
The text was updated successfully, but these errors were encountered: