quiche: support connection ID longer than 8 bytes with multiple worker threads#16320
quiche: support connection ID longer than 8 bytes with multiple worker threads#16320ggreenway merged 3 commits intoenvoyproxy:mainfrom
Conversation
Signed-off-by: Dan Zhang <danzh@google.com>
|
How is a longer-than-8-byte CID generated in the first place? Aren't the CIDs generated by quiche? |
|
Awesome! So glad this is tracked down :-) @moderation can you confirm this fixes your set up for concurrency > 1? |
Google QUICHE client uses 8-byte CID, which is why we didn't catch this issue earlier. But other implementations, i.e. Cloudflare QUICHE, use longer CID to start with. |
Oh, so this is the peer's ID? How is it valid to truncate it (or hash it)? I read through https://quicwg.org/base-drafts/rfc9000.html#name-connection-id and didn't see anything about modifying the peer's CID. Is it possible that by truncating, there could be duplicates, eg the peer uses the same first 8 bytes of CID? |
|
Nevermind, this is all coming back to me now. Described here: https://quicwg.org/base-drafts/rfc9000.html#name-negotiating-connection-ids Given that envoy only looks at the first 4 bytes in the BPF to steer, would it be safer to hash all bytes beyond the first 4 into a 4-byte hash for the last 4 bytes of the CID? |
|
With @alyssawilk help I can confirm that concurrency > 1 is now working in my environment! Woohoo |
|
Awesome! Thanks so much for checking! |
Signed-off-by: Dan Zhang <danzh@google.com>
Done |
|
Thanks for fixing this! CI is failing with |
Signed-off-by: Dan Zhang <danzh@google.com>
|
Ping? |
|
I've been trying to look for ways to verify that BPF is being used. I've installed the |
Is Envoy started with multiple workers?
I don't know much about bps or any other BPF monitoring tools. Somehow never needed to do so. |
|
Yes Envoy starts with multiple workers. I'm testing on 6 core 12 thread Linux machine and on startup I get 12: And on shutdown 12: So I think it is working OK. However I thought in order for BPF filters to work either I do get the warning when running on MacOS as expected. |
Signed-off-by: Dan Zhang danzh@google.com
Commit Message: fix an issue where CID longer than 8 bytes is replaced by a hashed 8-byte CID which isn't compatible with existing BPF filter which requires stable first 4-byte in CID.
Testing: added integration tests for 9-byte CID
Fixes #15988