While here, use just static initializer for key_cb.
Details
- Reviewers
 jhb wma ae - Group Reviewers
 network - Commits
 - rG9880323a99de: netipsec: use SYSINIT(9) instead of dom_init/dom_destroy
 
Diff Detail
- Repository
 - rS FreeBSD src repository - subversion
 - Lint
 Lint Passed - Unit
 No Test Coverage - Build Status
 Buildable 43445 Build 40333: arc lint + arc unit 
Event Timeline
Added John and Wojciech, who recently committed to ipsec to confirm that my static initialization of key is fine.
| sys/netipsec/key.c | ||
|---|---|---|
| 8332 | Thanks. I'd rather change key_init() to SI_ORDER_FIRST. The plan is that: global domain init is SI_ORDER_FIRST, vnet domain init is SI_ORDER_SECOND, global protocol init is SI_ORDER_THIRD and vnet protocol init is SI_ORDER_FOURTH. netipsec doesn't have any protocols sysinited, so for it doesn't matter, but should match overall style.  | |
| 8461 | That's a good observation! As you see key_destroy() was all hidden under ifdef VIMAGE, so I expected that it has only VNET destroy stuff. But at the end it acts as if sysinit code may legitimately call on default vnet. AFAIK, key.c doesn't belong to any loadable module. This was added d8ba1ddc0f2049544d869e0f6843cdab764120c0 by @ae . I'll ask him.  | |
Split key_destroy() into VNET and global parts.  Leave a note that
global part is dead code today but exists for future.
Sorry, I didn't see your earlier updates. I think your refactors after my earlier questions look good.