lkml.org 
[lkml]   [2018]   [Jul]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [RFC PATCH net-next v2 06/17] ethtool: support for netlink notifications
    On Mon, Jul 30, 2018 at 03:16:55PM +0200, Jiri Pirko wrote:
    > Mon, Jul 30, 2018 at 02:53:12PM CEST, mkubecek@suse.cz wrote:
    >
    > [...]
    >
    > >diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
    > >index c1295c7a452e..c4b0c575d57e 100644
    > >--- a/include/linux/netdevice.h
    > >+++ b/include/linux/netdevice.h
    > >@@ -2444,6 +2444,7 @@ enum netdev_cmd {
    > > NETDEV_CVLAN_FILTER_DROP_INFO,
    > > NETDEV_SVLAN_FILTER_PUSH_INFO,
    > > NETDEV_SVLAN_FILTER_DROP_INFO,
    > >+ NETDEV_ETHTOOL,
    >
    > I don't understand why this goes through netdev notifier. What's the
    > reason?

    To allow triggering a notification from other code (ethtool ioctl or
    e.g. netdev_features_change()) when netlink interface is built as a
    module. If it's a (performance?) problem, an alternative could be having
    a global pointer which would be either null or point to ethtool_notify()
    depending on whether the module is loaded (and ready).

    (Which made me realize I forgot to handle a race between module
    unloading and processing a notification.)

    Another question is if we really need the option to build the netlink
    interface as a module. I must admit my main motivation to have it as
    a module is that it makes testing and debugging easier.

    Michal

    \
     
     \ /
      Last update: 2018-07-30 19:01    [W:3.826 / U:0.000 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site