tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[RFC]Adding hooks in if_link_state_change and ether_ifdetach

Hi tech-net@ and tech-kern@,

Currently implementation, some interfaces e.g. bridge(4), vlan(4), and lagg(4)
insert their functions in if_link_state_change_process() to get change of
the link state of related interface. The functions are used together with
macros (e.g. "#if NVLAN > 0") so these do not work well when an interface
is running as a kernel module.
To solve this problem, I would like to add a hook point in
the if_link_state_change_process() and make the interfaces use it.
And ether_ifdetach() has the same issue, I am also going to fix it in
the same way.

I put the patch on the following:

Summary of the patch:
 - added functions to use hook list implemented in kern_hook.c
 - added hook list heads to struct ifnet and struct ethercom
    and functions to establish and disestablish a callback
 - used the added functions in bridge(4), vlan(4), lagg(4), and carp(4)
 - There are changes not related directly to this about ixg(4), ixv(4),
   and lagg(4)
    - Those are refactoring or bug fixes.

I would like to get your feedback because I think that it impacts
various components.

-- yamaguchi

Home | Main Index | Thread Index | Old Index