Skip to content
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

send large max_datagram_frame size, introduce a DatagramTooLargeError error #4143

Merged
merged 1 commit into from
Dec 2, 2023

Conversation

chungthuang
Copy link
Contributor

The size can be overwritten to a lower value for testing. This implements the suggestion from #3300 (comment).

@google-cla
Copy link

google-cla bot commented Oct 30, 2023

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Copy link
Member

@marten-seemann marten-seemann left a comment

Choose a reason for hiding this comment

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

You'll need to sign the CLA as well.

internal/wire/datagram_frame.go Outdated Show resolved Hide resolved
@marten-seemann marten-seemann linked an issue Oct 31, 2023 that may be closed by this pull request
@chungthuang chungthuang force-pushed the chungthuang/issue-3300 branch 2 times, most recently from a3ee3f7 to 87bf7a7 Compare October 31, 2023 15:41
@chungthuang
Copy link
Contributor Author

Hi @marten-seemann, thanks for reviewing. Do you have other feedback for this PR?

@marten-seemann
Copy link
Member

The size can be overwritten to a lower value for testing.

Do you want to add a test case?

@chungthuang
Copy link
Contributor Author

chungthuang commented Nov 7, 2023

The size can be overwritten to a lower value for testing.

Do you want to add a test case?

257b644 adds a test case to make sure peer's max DATAGRAM size is respected.
I think the other case of making sure only DATAGRAM frame that can fit into a packet is sent is already covered in https://github.com/quic-go/quic-go/blob/master/packet_packer_test.go#L594.

internal/qerr/errors.go Outdated Show resolved Hide resolved
internal/qerr/errors.go Outdated Show resolved Hide resolved
internal/wire/datagram_frame.go Show resolved Hide resolved
integrationtests/self/datagram_test.go Outdated Show resolved Hide resolved
@chungthuang
Copy link
Contributor Author

Hi @marten-seemann, I can squash the commits if you don't have other feedback.

@chungthuang
Copy link
Contributor Author

Hi @marten-seemann, just want to check if this is good to merge soon?

errors.go Show resolved Hide resolved
@marten-seemann marten-seemann changed the title Allow any size of DATAGRAM frame that can fit into a QUIC packet (#3300) send large max_datagram_frame size, introduce a DatagramTooLargeError error Dec 1, 2023
@marten-seemann
Copy link
Member

Sorry for the delay @chungthuang! Tests are failing, can you please take a look?

…c-go#3300)

The size can be overwritten to a lower value for testing.
@chungthuang
Copy link
Contributor Author

Sorry for the delay @chungthuang! Tests are failing, can you please take a look?

No worries. The tests were failing because internal/wire/transport_parameter_test.go was still using protocol.MaxDatagramFrameSize. This is fixed now.

Copy link

codecov bot commented Dec 1, 2023

Codecov Report

Attention: 10 lines in your changes are missing coverage. Please review.

Comparison is base (a360354) 83.75% compared to head (6de8be9) 83.72%.
Report is 9 commits behind head on master.

Files Patch % Lines
connection.go 0.00% 6 Missing ⚠️
errors.go 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4143      +/-   ##
==========================================
- Coverage   83.75%   83.72%   -0.02%     
==========================================
  Files         150      150              
  Lines       15411    15434      +23     
==========================================
+ Hits        12906    12922      +16     
- Misses       2007     2014       +7     
  Partials      498      498              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@chungthuang
Copy link
Contributor Author

Looks like all tests passed, but I don't have permission to merge.

@marten-seemann marten-seemann merged commit 7b9d21f into quic-go:master Dec 2, 2023
19 checks passed
@gr0l0rg
Copy link

gr0l0rg commented Dec 2, 2023

FINALLY! Thank you @chungthuang for the great work. Hope v0.41 is released soon enough to try it.

@Wasem9926
Copy link

[email protected]

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.

Allow max datagram frame size to be configurable
4 participants