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

Dynamic pickup of multiple provided buffers #1096

Open
pyhd opened this issue Mar 12, 2024 · 1 comment
Open

Dynamic pickup of multiple provided buffers #1096

pyhd opened this issue Mar 12, 2024 · 1 comment

Comments

@pyhd
Copy link

pyhd commented Mar 12, 2024

A big buffer (i.e. 64K) must be allocated to receive a single UDP_GRO, but in many cases only a small part of it would be used, especiall for small ACK flood. My idea is to allocate a large continuous pool (e.g. 4K-aligned buffer * 128), then for each time io_uring_prep_recvmsg_multishot can pickup multiple buffers to fit a single UDP_GRO.

Secondly, as I read the mail archive, provided buffers will be supported for the send() operation, so I guess UDP_GSO could be in the same logic.

@isilence
Copy link
Collaborator

A big buffer (i.e. 64K) must be allocated to receive a single UDP_GRO, but in many cases only a small part of it would be used, especiall for small ACK flood. My idea is to allocate a large continuous pool (e.g. 4K-aligned buffer * 128), then for each time io_uring_prep_recvmsg_multishot can pickup multiple buffers to fit a single UDP_GRO.

That's what Jens was proposing in a recent patch in the mailing list, I believe

Secondly, as I read the mail archive, provided buffers will be supported for the send() operation, so I guess UDP_GSO could be in the same logic.

sends shouldn't have the problem you describe here, as you know how many bytes you're sending and so can pack them into a single request with a multi entry iov, i.e. struct msghdr :: msg_iov

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

No branches or pull requests

2 participants