quinn-rs / quinn

Async-friendly QUIC implementation in Rust
Apache License 2.0
3.76k stars 380 forks source link

GSO on macOS #1554

Open Ralith opened 1 year ago

Ralith commented 1 year ago

Luke Curley on the implementers' slack reports that the socket option SOL_UDP/UDP_SEGMENT can be used to set a segment size to get GSO on macOS. We should take advantage of this for better performance. Unclear if GRO might also be possible.

Ralith commented 1 year ago

Marten Seeman reports that GRO works via enabling the IPPROTO_UDP/UDP_GRO socket option.

marten-seemann commented 1 year ago

There must be a misunderstanding. I haven't figured out how GSO works on OSX. See this thread in particular.

Ralith commented 1 year ago

That link doesn't seem to do anything here, but you said:

GRO works as well. Here’s a C program that works:

// [...]
setsockopt(recv_sock, IPPROTO_UDP, UDP_GRO, &enable, sizeof(enable));
// [...]

[...] When I spin up a second machine and send UDP packets to the first one, I actually see GRO kicking in.

I understand that there's weird quirks around lo, but does that not mean it works?