Page MenuHomeFreeBSD

IfAPI: Add if_maddr_empty() to check for any maddrs
ClosedPublic

Authored by jhibbits on Apr 10 2023, 7:14 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Jan 18, 2:36 PM
Unknown Object (File)
Sat, Jan 4, 7:16 PM
Unknown Object (File)
Fri, Dec 27, 11:26 PM
Unknown Object (File)
Dec 25 2024, 9:04 AM
Unknown Object (File)
Dec 14 2024, 3:23 AM
Unknown Object (File)
Oct 10 2024, 2:48 PM
Unknown Object (File)
Oct 10 2024, 2:48 PM
Unknown Object (File)
Oct 10 2024, 2:48 PM

Details

Summary

if_llmaddr_count() only counts link-level multicast addresses.
hv_netvsc(4) needs to know if there are any multicast addresses. Since
hv_netvsc(4) is the only instance where this would be used, make it a
simple boolean. If others need a if_maddr_count(), that can be added in
the future.

Diff Detail

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

Event Timeline

Ping? Would a simple boolean be better than a count?

Ping? Would a simple boolean be better than a count?

grep the code it seems hv_netvsc(4) is the only consumer of this, and it is used in the slow path (configuration). Then the boolean one will be much simpler and straight.

I do not have strong options. Either a count or boolean is OK.

CC @glebius if he has some thought about this.

sys/net/if_var.h
660
jhibbits retitled this revision from IfAPI: Add if_maddr_count() to count all multicast addresses to IfAPI: Add if_maddr_empty() to check for any maddrs.
jhibbits edited the summary of this revision. (Show Details)

Switch to a boolean, if_maddr_empty() instead.

This revision is now accepted and ready to land.May 2 2023, 3:53 PM