netgraph(4) initialization order
Scott Long
scottl at freebsd.org
Wed Jan 5 13:33:42 PST 2005
Roman Kurakin wrote:
> Scott Long:
>
>> Maksim Yevmenkin wrote:
>>
>>> Scott Long wrote:
>>>
>>>> Maksim Yevmenkin wrote:
>>>>
>>>>> Dear Hackers,
>>>>>
>>>>> any objections to the attached patch?
>>>>>
>>>>
>>>> Yes, as I stated in another email, I think that the core netgraph
>>>> module should be initialized before the SI_SUB_DRIVERS step. I
>>>> propose creating a new sysinit called SI_SUB_NETGRAPH with a value
>>>> of 0x30100000. That way it comes after SI_SUB_IF and before
>>>> SI_SUB_DRIVERS. This make fiddling with SI_ORDER_* unneccesary.
>>>
>>>
>>>
>>> how about new attached patch?
>>>
>>> thanks,
>>> max
>>
>>
>>
>> Exactly what I had in mind =-) Have you tested this out to make sure
>> it fixes the problem cases?
>
>
> But this wouldn't save from the same problem it the future.
>
> rik
>
What same problem? This ensures that the netgraph core gets initialized
before any driver. Keeping it at SI_SUB_DRIVERS and trying to order the
it via SI_ORDER_* is risky because you can't guarantee that some other
driver won't try to also take SI_ORDER_FIRST.
Scott
More information about the freebsd-current
mailing list