quinn icon indicating copy to clipboard operation
quinn copied to clipboard

GSO on macOS

Open Ralith opened this issue 2 years ago • 4 comments
trafficstars

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 avatar May 03 '23 20:05 Ralith

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

Ralith avatar May 05 '23 23:05 Ralith

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

marten-seemann avatar May 08 '23 05:05 marten-seemann

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?

Ralith avatar May 08 '23 06:05 Ralith