Skip to content

UDP/QUIC: Make sure quiche gets the entire rx buffer from the udp packet.#9765

Merged
brbzull0 merged 1 commit intoapache:masterfrom
brbzull0:quic_make_sure_quiche_gets_the_full_payload
Jun 2, 2023
Merged

UDP/QUIC: Make sure quiche gets the entire rx buffer from the udp packet.#9765
brbzull0 merged 1 commit intoapache:masterfrom
brbzull0:quic_make_sure_quiche_gets_the_full_payload

Conversation

@brbzull0
Copy link
Copy Markdown
Contributor

@brbzull0 brbzull0 commented Jun 1, 2023

It seems that it was only getting the first slice of the entire chain. Currently each of the iov buffer size is hardcoded to 2k, if happens that we need to fit more than 2k inside the buffer the current code will only hand over the first part of the chain which will make QUICHE to complain as the data is incomplete.

This change makes sure that quiche gets the entire buffer by building the entire buffer together.

Issue can be reproduced by including the --max-udp-payload-size 3k in the h2load tool. Actually, any size above 2k should hit the issue.
example:

/opt/bin/h2load -n 1 -c 1 --npn-list=h3 -H="my-hn1: test01" https://<server-ip>:4443/cache/1000 --max-udp-payload-size 3k

FYI: For now this seems fine but as soon as we introduce GRO this will more likely to change.

packet.
It seems that it was only getting the first slice of the entire chain.
Currently each of the iov buffer size is hardcoded to 2k, if happens
that we need to fit more than 2k inside the buffer the current code will
only hand over the first part of the chain which will make QUICHE to
complain as the data is incomplete.
This change makes sure that quiche gets the entire buffer.
@brbzull0 brbzull0 self-assigned this Jun 1, 2023
@brbzull0 brbzull0 marked this pull request as ready for review June 1, 2023 15:50
@brbzull0 brbzull0 requested a review from maskit June 1, 2023 15:51
@brbzull0 brbzull0 added the Bug label Jun 1, 2023
return reinterpret_cast<uint8_t *>(block->buf());
}

// Store it. Should we try to avoid allocating here?
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should we try to avoid allocating here?

Yes, it's very unfortunate to alloc another buffer and copy data. But as we talked offline, let's fix the bug for now and improve it with a GRO friendly design.

@brbzull0
Copy link
Copy Markdown
Contributor Author

brbzull0 commented Jun 1, 2023

[approve ci autest]

@brbzull0
Copy link
Copy Markdown
Contributor Author

brbzull0 commented Jun 2, 2023

[approve ci ubuntu]

@brbzull0 brbzull0 merged commit d2cfc82 into apache:master Jun 2, 2023
@zwoop zwoop added this to the 10.0.0 milestone Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants