Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp4184928imm; Mon, 30 Jul 2018 10:03:37 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcZboDvl9rVP31b3ydeEbVrgTyaBH9oIHS28K/KXpNEkZhNxvGN/geit68O9+AK6sbM/mBe X-Received: by 2002:a17:902:6907:: with SMTP id j7-v6mr17109416plk.323.1532970217769; Mon, 30 Jul 2018 10:03:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532970217; cv=none; d=google.com; s=arc-20160816; b=dqTiMW21EA4YcjU7lUZZmfq9zUS4zeR8VBs3Se9pb0jPh5jrR/1xm1CwxLLVcavN/0 0mVzNl811E+VqfiIBH+WFADDz8Jip8pV75T+/fmDGkY1b6CtmwGysLa0HrMjgWIxpSwM +LcPexWi8CMIdriAVLpRpQekVy2132SlFI/TJqj/G7jibSYwW+6Ab536vkrT9b0ADRVS xD1gFEu7elJTXVl8OsLRu0F3BCL/0x196QlYtX7i5qdumgQQyBKf3LP+FdqdsmWA+ozG 8lop+JjOPjIGIGHmUuTboSZdse/89ilZzh9+9rUtDVHsoVwRn2Y0Wd+O/edjw4/eku3O gP6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=5ywJsHxWylr7e3rp/l95FJ3YanPEkC0WvrwLT6kGqNI=; b=PZWHTlDHbf940M2U533W8luEyuCuir8fIQt9ZtN5ok6nSmQp7bn2HSyo/kNWHfUl47 d5iRQjRw3L9HUXgdkIvCQ9Ypm5dvLuE8YJoLQXtgtQ75yyUhCHJYfDWxNPglZvnpXjQ7 KwAnbdwbddgQGCb5UFSksjKmuiXlGBT8roZ5WwVUTiQSJZDJ0xVS3W2/nqrmv/Kib6rc 7qfJOa/l1i3bfHB+W0qMGPdOwVWILooG5Df6uQnZCX/4nMW6TpytVFs26UHJCZ+FU6lK mo+9sMx7eX5HpSbkRb0zckER0rx2chaYO8zwydhhJKXxAbouGl4THVfqLYjRG6gazxx4 AC+g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p10-v6si10823253pgm.265.2018.07.30.10.03.23; Mon, 30 Jul 2018 10:03:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731578AbeG3ShR (ORCPT + 99 others); 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