CVSROOT: /cvs Module name: src Changes by: d...@cvs.openbsd.org 2019/07/18 23:21:25
Modified files: sys/net : if_aggr.c Log message: try to notify the partner when the port is going away or down. by notify i mean we send an lacp packet with our collecting and distributing flags cleared, which should tell the remote system that it should no longer handle packets on their port as part of their aggregation. this is implemented by "unselecting" a port. if an active port is going away, ie, being removed from an aggr via "ifconfig aggr0 -trunkport port0", all that happens is software state on our side changes and we stop considering the interface as part of the aggr interface. the partner system is otherwise oblivious and can continue to send us packets until its expiry timeout fires because it doesn't know any better. we already intercept a ports ioctl handling, so if someone goes "ifconfig portX down" while it is attached to an aggr, we can catch that before the underlying driver actually tears the rings down, and we still have a chance to try and send a packet to the peer. this is useful because our drivers generally do not drop the physical link, so again, the partner system is oblivious to the change on our side until its expiry timer fires. expiry timeouts can be up to 90 seconds away, which is a lot of traffic to blackhole. sending the notification to the parnter means they withdraw this link at the same time the local system is pulling the port out of the aggregation. hopefully. it is possible the packet is lost, but this is a good start. the only caveat to this is is my implementation ignores the transmit state machine from the lacp spec, and may cause more than 3 lacp packets per second to be transmitted to the partner system. oh well. i should look at the marker protocol too.