Skip to content

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

@rgacogne

Description

@rgacogne
  • 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).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions