Page MenuHomeFreeBSD

ip_mroute: refactor bw_meter API
ClosedPublic

Authored by wma on May 11 2021, 10:41 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 21, 6:48 AM
Unknown Object (File)
Wed, Nov 13, 7:28 PM
Unknown Object (File)
Oct 22 2024, 2:50 PM
Unknown Object (File)
Oct 2 2024, 8:46 AM
Unknown Object (File)
Sep 27 2024, 3:28 PM
Unknown Object (File)
Sep 27 2024, 1:15 PM
Unknown Object (File)
Sep 20 2024, 2:45 AM
Unknown Object (File)
Sep 4 2024, 4:56 PM
Subscribers

Details

Summary

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 a preparation for complete locking rework here 
which is now highly inefficient.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

wma requested review of this revision.May 11 2021, 10:41 AM
mw requested changes to this revision.May 14 2021, 10:03 AM
mw added inline comments.
sys/netinet/ip_mroute.c
1893

Wouldn't callout_drain be a safer option here?

2016

The formatting looks broken in the above block.

2046

Unrelated change, please drop this addition.

sys/netinet/ip_mroute.h
289

s/Grater/Greater/

This revision now requires changes to proceed.May 14 2021, 10:03 AM
sys/netinet/ip_mroute.c
1768

Please move || operator to the previous line.

1825

no need to break line for == flags. Also, please move operators to the preceding line when line-breaking.

This revision is now accepted and ready to land.May 16 2021, 6:32 AM
This revision was automatically updated to reflect the committed changes.