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

dnsdist: Ponder implementing UDP_GRO for UDP-based sockets #14390

Open
rgacogne opened this issue Jun 27, 2024 · 0 comments
Open

dnsdist: Ponder implementing UDP_GRO for UDP-based sockets #14390

rgacogne opened this issue Jun 27, 2024 · 0 comments

Comments

@rgacogne
Copy link
Member

  • Program:dnsdist
  • Issue type: Feature request

Short description

Since 5.0, Linux implements a new UDP socket option, UDP_GRO, 1 which allows batch reading of UDP datagrams with recvmsg/recvmmsg. It would be nice to support it in DNSdist.

Usecase

All UDP-based sockets (Do53 UDP, DoQ, DoH3) could in theory benefit from this option. We already support recvmmsg for Do53 UDP and I don't think it would be too hard to implement that for DoQ and DoH3 if we see a real improvement for Do53 UDP.

cURL reports 39% faster DoH3 downloads: curl/curl#14012

Description

We would need to set the option on the socket via setsockopt, when available, make sure we have enough room in the cmsg control buffer for the additional uint16_t size field, and split the data received in our buffer according to this size (since the buffer can now hold more than one datagram).

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

No branches or pull requests

1 participant