Page MenuHomeFreeBSD

rtsock: subscribe to ifnet eventhandlers instead of direct calls.
ClosedPublic

Authored by melifaro on Aug 9 2022, 9:08 PM.
Tags
None
Referenced Files
F82869530: D36095.id109200.diff
Fri, May 3, 9:38 AM
Unknown Object (File)
Thu, May 2, 10:11 AM
Unknown Object (File)
Thu, May 2, 5:28 AM
Unknown Object (File)
Mar 28 2024, 11:17 AM
Unknown Object (File)
Jan 3 2024, 8:55 AM
Unknown Object (File)
Jan 2 2024, 10:13 PM
Unknown Object (File)
Dec 12 2023, 12:56 PM
Unknown Object (File)
Nov 30 2023, 4:20 AM
Subscribers

Details

Summary

Stop treating rtsock as a "special" consumer and use already-provided
ifaddr arrival/departure notifications.

MFC after: 2 weeks

Test Plan
21:05 [0] m@devel0 route -n monitor

-> ifconfig vtnet0.2 create

got message of size 24 on Tue Aug  9 21:05:44 2022
RTM_IFANNOUNCE: interface arrival/departure: len 24, if# 3, what: arrival

got message of size 168 on Tue Aug  9 21:05:54 2022
RTM_IFINFO: iface status change: len 168, if# 3, link: up, flags:<BROADCAST,RUNNING,SIMPLEX,MULTICAST>

-> ifconfig vtnet0.2 destroy

got message of size 24 on Tue Aug  9 21:05:54 2022
RTM_IFANNOUNCE: interface arrival/departure: len 24, if# 3, what: departure

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 46813
Build 43702: arc lint + arc unit

Event Timeline

melifaro added a reviewer: network.
sys/net/rtsock.c
288

Just following our today conversation. Here we should either use EVENTHANDLER_DEFINE() or actually implement proper EVENTHANDLER_SYSINIT(). Did you check that EVENTHANDLER_DEFINE() will or will not work here?

This revision is now accepted and ready to land.Aug 11 2022, 2:37 PM