Question about NETDEV_REGISTER and NETDEV_UNREGISTER events
Hello, I am having a machine with two ethernet devices. Is there a way to generate NETDEV_REGISTER or NETDEV_UNREGISTER events, besides rmmod/insmod of the device driver ? As far as I can see from the code, this is the only way that the register_netdevice() method and the unregister_netdev() method can be called: http://lxr.free-electrons.com/source/net/core/dev.c#L5196 regards Kevin
On Wed, 03 Jul 2013 16:15:02 +0300, Kevin Wilson said:
Hello, I am having a machine with two ethernet devices. Is there a way to generate NETDEV_REGISTER or NETDEV_UNREGISTER events, besides rmmod/insmod of the device driver ?
What use case do you have for generating those at other times? What are you trying to accomplish?
Hi, Hacking, learning and understanding the kernel. I noticed that there is event handler for NETDEV_REGISTER and On Wed, Jul 3, 2013 at 4:26 PM, <Valdis.Kletnieks@vt.edu> wrote:
On Wed, 03 Jul 2013 16:15:02 +0300, Kevin Wilson said:
Hello, I am having a machine with two ethernet devices. Is there a way to generate NETDEV_REGISTER or NETDEV_UNREGISTER events, besides rmmod/insmod of the device driver ?
What use case do you have for generating those at other times? What are you trying to accomplish?
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Hi, Sorry, I pushed the button of send wrongly. I noticed that there is a code where there are handlers for NETDEV_REGISTER/NETDEV_UNREGISTER: for example:fib_rules_event(), in http://lxr.free-electrons.com/source/net/core/fib_rules.c#L707 for what is this handler ? from what I understand, it is **only** for the case of rmmod/insmod of the net driver, since this is the only case that NETDEV_REGISTER/NETDEV_UNREGISTER are called. On the other hand, I am not sure that I understand why this handler does not also handle NETDEV_UP/NETDEV_DOWN in the **same** way, (attach_rules()/detach_rules()) Any ideas? regards, Kevin On Wed, Jul 3, 2013 at 4:26 PM, <Valdis.Kletnieks@vt.edu> wrote:
On Wed, 03 Jul 2013 16:15:02 +0300, Kevin Wilson said:
Hello, I am having a machine with two ethernet devices. Is there a way to generate NETDEV_REGISTER or NETDEV_UNREGISTER events, besides rmmod/insmod of the device driver ?
What use case do you have for generating those at other times? What are you trying to accomplish?
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
participants (2)
-
Kevin Wilson -
Valdis.Kletnieks@vt.edu