Skip to content

Conversation

@jeongseokson
Copy link
Contributor

@jeongseokson jeongseokson commented Mar 6, 2023

Commit Message:
This commit prepares Envoy for HTTP Datagrams and the Capsule Protocol (RFC 9297) support. The added CapsuleProtocolHandler is used to decode received HTTP/3 Datagrams into Capsules, and encode Capsules into HTTP/3 Datagrams in the EnvoyQuicClientStream and EnvoyQuicServerStream.

This commit does not enable HTTP Datagrams support in Envoy, so it does not change the behavior of Envoy under any circumstances. A subsequent CL will enable the feature with CONNECT-UDP support.

Additional Description:
Risk Level: Low. The current commit does not change the behavior of Envoy.
Testing: unit tests
Docs Changes: N/A
Release Notes: Add a build feature envoy_http_datagrams to allow disabling HTTP Datagram support.

CapsuleProtocolHandler decodes received HTTP/3 Datagrams into Capsules,
and encodes Capsules into HTTP/3 Datagrams. This commit does not change
the behavior of Envoy. See the comments in EnvoyQuicClientSession and
EnvoyQuicServerSession classes for more details.

Signed-off-by: Jeongseok Son <jeongseok.son@gmail.com>
@jeongseokson
Copy link
Contributor Author

/assign @DavidSchinazi

Hi David, can you review the commit in this PR? I left a few questions you could answer in some TODOs.

@alyssawilk
Copy link
Contributor

Exciting! I'll let @DavidSchinazi do first pas.
Also interested in his and @RyanTheOptimist 's take on if this will eventually be a large enough code path we may want to have a compile-out option for EM binary size

@jeongseokson
Copy link
Contributor Author

Thanks for pointing it out, Ryan. I will fix the clang-tidy errors as well as the msan/asan ones.

Signed-off-by: Jeongseok Son <jeongseok.son@gmail.com>
Copy link
Contributor

@DavidSchinazi DavidSchinazi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this! First pass complete

Signed-off-by: Jeongseok Son <jeongseok.son@gmail.com>
Signed-off-by: Jeongseok Son <jeongseok.son@gmail.com>
Signed-off-by: Jeongseok Son <jeongseok.son@gmail.com>
@alyssawilk
Copy link
Contributor

/wait on CI (though you can ping David if you think it's ready for another review pass)

@jeongseokson
Copy link
Contributor Author

Thanks for the reminder, Alyssa. David will take a look at it soon. I will fix the CI errors in the meantime.

Signed-off-by: Jeongseok Son <jeongseok.son@gmail.com>
Copy link
Contributor

@DavidSchinazi DavidSchinazi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice progress!

Signed-off-by: Jeongseok Son <jeongseok.son@gmail.com>
Signed-off-by: Jeongseok Son <jeongseok.son@gmail.com>
@alyssawilk
Copy link
Contributor

/wait on CI

Signed-off-by: Jeongseok Son <jeongseok.son@gmail.com>
@jeongseokson
Copy link
Contributor Author

/wait on CI

@RyanTheOptimist
Copy link
Contributor

@jeongseokson GitHub UI/Usability is kinda terrible. But if you reply to comments from the "Files Changed" view instead of the "Conversation" view, you can do "Start Review" in which case all of your comments will be sent in a single email instead of one email per comment. Just FYI

@jeongseokson
Copy link
Contributor Author

@RyanTheOptimist Ah! I didn't know that. Thanks for the information, Ryan.

@RyanTheOptimist
Copy link
Contributor

@RyanTheOptimist Ah! I didn't know that. Thanks for the information, Ryan.

Sure thing! It's completely undiscoverable. sigh I'm glad we have GitHub but sometimes I find it really annoying.

@jeongseokson jeongseokson changed the title http3: add support for HTTP Datagrams http3: prepare for HTTP Datagrams support Mar 15, 2023
Signed-off-by: Jeongseok Son <jeongseok.son@gmail.com>
Copy link
Contributor

@RyanTheOptimist RyanTheOptimist left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great. Just a few small comments.

Signed-off-by: Jeongseok Son <jeongseok.son@gmail.com>
Copy link
Contributor

@RyanTheOptimist RyanTheOptimist left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! @alyssawilk to give this a final review.

@jeongseokson
Copy link
Contributor Author

/retest

@repokitteh-read-only
Copy link

Retrying Azure Pipelines:
Retried failed jobs in: envoy-presubmit

🐱

Caused by: a #25925 (comment) was created by @jeongseokson.

see: more, trace.

@alyssawilk
Copy link
Contributor

@mattklein123 you Ok with datagram support 1) being added and 2) being treated like HTTP/3 and getting google-only sign off rather than requiring cross-company LGTMs?

Copy link
Contributor

@alyssawilk alyssawilk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great overall, just a few final comments
/wait

mobile/.bazelrc Outdated
build --define envoy_mobile_listener=disabled
build --define=library_autolink=disabled
build --define=envoy_mobile_swift_cxx_interop=enabled
build --define=envoy_enable_http_datagram=disabled
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @RenjieTang we'll want to do this for android/iOS when this is imported

@mattklein123
Copy link
Member

@mattklein123 you Ok with datagram support 1) being added and 2) being treated like HTTP/3 and getting google-only sign off rather than requiring cross-company LGTMs?

Sure SGTM!

Signed-off-by: Jeongseok Son <jeongseok.son@gmail.com>
Signed-off-by: Jeongseok Son <jeongseok.son@gmail.com>
Signed-off-by: Jeongseok Son <jeongseok.son@gmail.com>
@jeongseokson
Copy link
Contributor Author

/retest

@repokitteh-read-only
Copy link

Retrying Azure Pipelines:
Retried failed jobs in: envoy-presubmit

🐱

Caused by: a #25925 (comment) was created by @jeongseokson.

see: more, trace.

Signed-off-by: Jeongseok Son <jeongseok.son@gmail.com>
Signed-off-by: Jeongseok Son <jeongseok.son@gmail.com>
Copy link
Contributor Author

@jeongseokson jeongseokson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the comments, Alyssa. Please take a look at the commits and let me know if you have any further comments.

@jeongseokson
Copy link
Contributor Author

/retest

@repokitteh-read-only
Copy link

Retrying Azure Pipelines:
Retried failed jobs in: envoy-presubmit

🐱

Caused by: a #25925 (comment) was created by @jeongseokson.

see: more, trace.

Copy link
Contributor

@alyssawilk alyssawilk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah thanks for the rename and with one more offline round wiht Ryan on multiple headers I've got no objections. I'll defer to him for merge :-)

@alyssawilk alyssawilk removed their assignment Mar 21, 2023
Copy link
Contributor

@RyanTheOptimist RyanTheOptimist left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Thanks for doing this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants