]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
LACP: When suppressing distributing, return ENOBUFS
authorAndrew Gallatin <gallatin@FreeBSD.org>
Wed, 18 Nov 2020 14:55:49 +0000 (14:55 +0000)
committerAndrew Gallatin <gallatin@FreeBSD.org>
Wed, 18 Nov 2020 14:55:49 +0000 (14:55 +0000)
commit8732245d29a1b1ab78433880fe6f75359cc44d43
treead183811149b36a1700f0ebc3087ca2ffc994db5
parent4f8f476e73e55a95b15caad7187bd3863abfa520
LACP: When suppressing distributing, return ENOBUFS

When links come and go, lacp goes into a "suppress distributing" mode
where it drops traffic for 3 seconds. When in this mode, lagg/lacp
historiclally drops traffic with ENETDOWN. That return value causes TCP
to close any connection where it gets that value back from the lower
parts of the stack.  This means that any TCP connection with active
traffic during a 3-second windown when an LACP link comes or goes
would get closed.

TCP treats return values of ENOBUFS as transient errors, and re-schedules
transmission later. So rather than returning ENETDOWN, lets
return ENOBUFS instead.  This allows TCP connections to be preserved.

I've tested this by repeatedly bouncing links on a Netlfix CDN server
under a moderate (20Gb/s) load and overved ENOBUFS reported back to
the TCP stack (as reported by a RACK TCP sysctl).

Reviewed by: jhb, jtl, rrs
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D27188
sys/net/ieee8023ad_lacp.c
sys/net/ieee8023ad_lacp.h
sys/net/if_lagg.c