From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED,USER_AGENT_NEOMUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 03AFEFD21E1 for ; Mon, 30 Jul 2018 17:01:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BA97720881 for ; Mon, 30 Jul 2018 17:01:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BA97720881 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731600AbeG3ShR (ORCPT ); Mon, 30 Jul 2018 14:37:17 -0400 Received: from mx2.suse.de ([195.135.220.15]:34274 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726765AbeG3ShR (ORCPT ); Mon, 30 Jul 2018 14:37:17 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 9796FAE5C; Mon, 30 Jul 2018 17:01:22 +0000 (UTC) Received: by unicorn.suse.cz (Postfix, from userid 1000) id E11AEA0BE8; Mon, 30 Jul 2018 19:01:21 +0200 (CEST) Date: Mon, 30 Jul 2018 19:01:21 +0200 From: Michal Kubecek To: Jiri Pirko Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, David Miller , Florian Fainelli , Roopa Prabhu , Jakub Kicinski , "John W. Linville" Subject: Re: [RFC PATCH net-next v2 06/17] ethtool: support for netlink notifications Message-ID: <20180730170121.e6k5slbhdamclnt6@unicorn.suse.cz> References: <20180730131655.GA10626@nanopsycho> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180730131655.GA10626@nanopsycho> User-Agent: NeoMutt/20170912 (1.9.0) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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