quiche: use max header size configured in HCM#15912
quiche: use max header size configured in HCM#15912alyssawilk merged 66 commits intoenvoyproxy:mainfrom
Conversation
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
|
/retest |
|
Retrying Azure Pipelines: |
|
@snowp want me to take this one back? |
|
@alyssawilk Sure, go for it :) |
Signed-off-by: Dan Zhang <danzh@google.com>
alyssawilk
left a comment
There was a problem hiding this comment.
Cool, looking good.
I do think we should up the risk level to medium given the client connect() change.
| #include "envoy/event/dispatcher.h" | ||
| #include "envoy/network/connection.h" | ||
|
|
||
| #define QUICHE_INCLUDE_1 "quiche/quic/core/quic_connection.h" |
There was a problem hiding this comment.
What's this all about? Can we have macro comments?
There was a problem hiding this comment.
This is to avoid having duplicated #pragma GCC diagnostic... block in files includes QUICHE files. The block is moved to source/common/quic/quic_includes_ignores.h which only needs to be included at the end of the #include section. #define QUICHE_INCLUDE_1/2/...N is used in place of #include before each QUICHE header files.
Commented about its usage.
There was a problem hiding this comment.
Do we have a plan to get rid of these? cc @DavidSchinazi yak shaver extrordinare
There was a problem hiding this comment.
What's the goal of this macro? What's wrong with having duplicated pragmas?
There was a problem hiding this comment.
Do we have a plan to get rid of these? cc @DavidSchinazi yak shaver extrordinare
AFAIK, -Winvalid-offsetof will persist because it is caused by a QUIC frame memory optimization.
There was a problem hiding this comment.
What's the goal of this macro? What's wrong with having duplicated pragmas?
These pragmas are repeated in many files. And adding/removing a compiler option requires changing all the places. The goal of quic_includes_ignores.h is to avoid the duplication to improve both readability and maintainability. Though the macros are written in a very native way due to my limited preprocessor skill.
There was a problem hiding this comment.
2 things:
- QUICHE_INCLUDE_1 is the only one of these that is used. We probably don't need 2 to 5
- The header include that needs the pragma seems to be only quiche/quic/core/quic_connection.h; can we add a wrapper header with appropriate pragmas and have that include be the one that is included through the rest of Envoy code? Or have these pragmas added to quiche/quic/core/quic_connection.h via a quiche patch that Envoy adds while fetching the quiche dependency via bazel?
The best course of action would be to fix QUICHE. Until then, I guess duplicate pragmas are fine.
There was a problem hiding this comment.
- QUICHE_INCLUDE_1 is the only one of these that is used. We probably don't need 2 to 5
The plan is to use QUICHE_INCLUDE_X in other files as well, they includes more QUICHE files which also needs the pragma diagnose ignore.
- The header include that needs the pragma seems to be only quiche/quic/core/quic_connection.h; can we add a wrapper header with appropriate pragmas and have that include be the one that is included through the rest of Envoy code? Or have these pragmas added to quiche/quic/core/quic_connection.h via a quiche patch that Envoy adds while fetching the quiche dependency via bazel?
quic_connection.h is not the only one that needs the pragma, but most of them.
There was a problem hiding this comment.
I see what you're trying to do. I'd say just use the pragmas directly in places that need them for now (and remove quic_includes_ignores.h), and I can take an action item to fix QUICHE. The correct fix here is to make QUICHE build without warnings, not to disable them in Envoy.
Signed-off-by: Dan Zhang <danzh@google.com>
alyssawilk
left a comment
There was a problem hiding this comment.
Sorry looks like this needs a main merge as well?
| #include "envoy/event/dispatcher.h" | ||
| #include "envoy/network/connection.h" | ||
|
|
||
| #define QUICHE_INCLUDE_1 "quiche/quic/core/quic_connection.h" |
There was a problem hiding this comment.
Do we have a plan to get rid of these? cc @DavidSchinazi yak shaver extrordinare
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
|
/retest |
|
Retrying Azure Pipelines: |
Signed-off-by: Dan Zhang <danzh@google.com>
alyssawilk
left a comment
There was a problem hiding this comment.
Looks great - almost there!
| // Already detached from quic connection. | ||
| return; | ||
| } | ||
| if (!initialized_) { |
There was a problem hiding this comment.
Can we get here? I thought quicConnection would return null above if not initialized.
There was a problem hiding this comment.
Good point! We need to distinguish between already closed and not initialized. In latter case, we need to retain close type and close in OnCanWrite().
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
alyssawilk
left a comment
There was a problem hiding this comment.
LGTM, assuming we're going to debug the re-excluded tests in follow-ups :-)
Commit Message: use max header size in HCM config to initialize quic session. Additional Description: change QuicSession::Initialize() and filter chain creation order to set max header list size for each session before Initialize(). Move Initialize() of Http3 connection from CodecClient to CodecClientProd. Added CodecClient::connect() interface. Change EnvoyQuicConnection not to directly inherit from QuicConnection. And renamed it. Fix a use-after-free bug in FakeUpstream which causes ASAN failure. Risk Level: low Testing: more protocol H3 tests Part of envoyproxy#2557 envoyproxy#12930 envoyproxy#14829 Signed-off-by: Dan Zhang <danzh@google.com> Signed-off-by: Gokul Nair <gnair@twitter.com>
Commit Message: use max header size in HCM config to initialize quic session. Additional Description: change QuicSession::Initialize() and filter chain creation order to set max header list size for each session before Initialize(). Move Initialize() of Http3 connection from CodecClient to CodecClientProd. Added CodecClient::connect() interface. Change EnvoyQuicConnection not to directly inherit from QuicConnection. And renamed it. Fix a use-after-free bug in FakeUpstream which causes ASAN failure. Risk Level: low Testing: more protocol H3 tests Part of envoyproxy#2557 envoyproxy#12930 envoyproxy#14829 Signed-off-by: Dan Zhang <danzh@google.com> Signed-off-by: Gokul Nair <gnair@twitter.com>
Commit Message: use max header size in HCM config to initialize quic session.
Additional Description:
change QuicSession::Initialize() and filter chain creation order to set max header list size for each session before Initialize(). Move Initialize() of Http3 connection from CodecClient to CodecClientProd.
Added CodecClient::connect() interface.
Change EnvoyQuicConnection not to directly inherit from QuicConnection. And renamed it.
Fix a use-after-free bug in FakeUpstream which causes ASAN failure.
Risk Level: low
Testing: more protocol H3 tests
Part of #2557 #12930 #14829