Page MenuHomeFreeBSD

PR 219829 Handle device removal and removal+add cases to fix infinity rate.
ClosedPublic

Authored by ota_j.email.ne.jp on Jun 11 2020, 3:05 AM.

Details

Summary

The problem happens when a device is 1. removed, 2. removed and added back,
and 3. removed and a different one is added.

The case 2 applies to PR 219829 case.
One can reproduce the problem by creating, using, and destroying wlan or
tap devises as these are the easy one to add and remove on the fly.

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=219829

Test Plan

Set up an interface that can be destroyed like tap or wlan.
% systat -if 1
% ifconfig wlan0 destroy
% ifconfig ... etc to recreate wlan0

This makes the some devices' peak too high.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

ota_j.email.ne.jp retitled this revision from PR 219829 -Handle device removal and removal+add cases to fix infinity rate. to PR 219829 Handle device removal and removal+add cases to fix infinity rate..Jun 11 2020, 3:41 AM
ota_j.email.ne.jp edited the summary of this revision. (Show Details)
bcr added a subscriber: bcr.

OK from manpages.

Drop unnecessary NULL check. This is a field on a struct and won't be NULL.

Added static to implementatoin; follow style of other existing static functions.

Looks good.
I'll do some runtime tests before committing.

This revision is now accepted and ready to land.Jul 11 2020, 11:28 AM

Used wrong user for accepting...