]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
ip_mroute: refactor bw_meter API
authorWojciech Macek <wma@FreeBSD.org>
Wed, 5 May 2021 03:28:56 +0000 (05:28 +0200)
committerWojciech Macek <wma@FreeBSD.org>
Thu, 20 May 2021 08:13:55 +0000 (10:13 +0200)
commitd1cd99b147411b331a9bff659533780ef297ef58
treec214b4ba7bb06a0eda711645376f410943cbee83
parent20eb969793921dce9e524d19fc02b84cabd98f74
ip_mroute: refactor bw_meter API

API should work as following:
- periodicaly report Lower-or-EQual bandwidth (LEQ) connections
  over kernel socket, if user application registered for such
  per-flow notifications
- report Grater-or-EQual (GEQ) bandwidth as soon as it reaches
  specified value in configured time window

Custom implementation of callouts was removed. There is no
point of doing calout-wheel here as generic callouts are
doing exactly the same. The performance is not critical
for such reporting, so the biggest concern should be
to have a code which can be easily maintained.

This is ia preparation for locking rework which is highly inefficient.

Approved by:    mw
Sponsored by:   Stormshield
Obtained from:  Semihalf
Differential Revision:  https://reviews.freebsd.org/D30210
sys/netinet/ip_mroute.c
sys/netinet/ip_mroute.h