if_lagg(4) accounting changes

Alexander V. Chernikov melifaro at FreeBSD.org
Sat Sep 13 23:20:46 UTC 2014


Hello list.

I'd like to commit some changes to lagg counters which might be worth
discussion.

Diff is available at https://reviews.freebsd.org/D781
Quoting its summary:


While counting packets using per-cpu counters might not introduce
any significant overhead at current rates, we do not need to
do such accounting at all.

lagg in general is pure control-plane interface, its action on
receive should be just to change packet src if pointer.
Its action on transmit should be just selecting output interface
based on flowid.
It should not generate any errors on its own.

In fact, RX lagg path can be skipped by setting correct ifp inside
NIC driver. TX path should be handled by generic multipath L2 nexthops
inside routing code.

This is first step for implementing this scenario.
One side effect is that we're now collecting all counters (including
errors) from underlying interfaces. Generally most networking HW vendors
implement this behavior for their equipment and this is really the
reasonable thing to do.


More information about the freebsd-net mailing list