Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp570281pxa; Wed, 5 Aug 2020 08:06:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzM/yV2ZadwK+SVLeRkD7PFSWUoXkPqVrDPeC915XbgE1gz5ataWVsPBnNSiQXl8HXw8uhP X-Received: by 2002:a17:906:289a:: with SMTP id o26mr3506703ejd.309.1596640010770; Wed, 05 Aug 2020 08:06:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596640010; cv=none; d=google.com; s=arc-20160816; b=o/1Om/EzQwUSFPKB7ycr72IrRTZ9xpmUpKiIT0wYGMXL6ER0lnR5pusCPvb6Htdl9m KxHsfc+QPlHf5BnzwWjtdhPUXlnL7JBMmTPXcPtdB6289GfgsemsWhVGZStNsft8QLyZ rY+7qGm3K+62F9E0nDekOGxok2uhNzoKhL/n1zzHPgCi7V64/WohOhFNcS7P7zT22NfY GLCsTwr7Nw71P35SmNtdBp548pALKxZSpODMFBn26iJi2j3CZXPzo8KtU0jEPVbZ9GzB rI8qz/Dyjrac8O2Xljvv6631zMWBiD3kxN1G7L6b1D7iF7NMYTQ1mUa0zhFJUB7/DE+w N9yQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=6D8WLOjQn9SQwj50IOgCHLv2ukqkRpA5oJN9c9hB56A=; b=HKLoOWh2VW2A6QM3v3pusQv9A/ujPRW05HZSEwrkncHKZwP//SJVRFTwd6yDWZ69b1 sjSn8q4PCxdwuLdV3YmRLWknxovbsZY8RvvFQAltfSTcpIRKq5ifzwyAlgdf+1sKF8Rb O9Nog8f0AWMCjNof7ywzo7W1+ZzG9/45qaYcLv1j3o7ypbycPUunDhxEwJ+8YnL6yGBc OhI90VuZeaw3aZra2T/fRvVEumJ0ffLCJYgKy9JsBEVhK1EvcDBIadWLGWKBxBufMqlH xPOfGSi5BNpDsPBG0j5KziADmmqCj86o4TNc2ykOGWvxPzfK2b1dAQPgka/Fi3vJwCLL lmwQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v5si1406250ejg.368.2020.08.05.08.04.42; Wed, 05 Aug 2020 08:06:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728346AbgHEO0V (ORCPT + 99 others); Wed, 5 Aug 2020 10:26:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35454 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728021AbgHEMfj (ORCPT ); Wed, 5 Aug 2020 08:35:39 -0400 X-Greylist: delayed 3285 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Wed, 05 Aug 2020 04:39:24 PDT Received: from smtp.tuxdriver.com (tunnel92311-pt.tunnel.tserv13.ash1.ipv6.he.net [IPv6:2001:470:7:9c9::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E36FDC034603; Wed, 5 Aug 2020 04:39:20 -0700 (PDT) Received: from [2605:a601:a627:ca00:664d:4b4b:674f:5257] (helo=localhost) by smtp.tuxdriver.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1k3Gu7-0002qe-90; Wed, 05 Aug 2020 06:44:16 -0400 Date: Wed, 5 Aug 2020 06:44:09 -0400 From: Neil Horman To: David Miller Cc: izabela.bakollari@gmail.com, nhorman@tuxdriver.com, kuba@kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kernel-mentees@lists.linuxfoundation.org Subject: Re: [PATCHv2 net-next] dropwatch: Support monitoring of dropped frames Message-ID: <20200805104409.GA118086@localhost.localdomain> References: <20200707171515.110818-1-izabela.bakollari@gmail.com> <20200804160908.46193-1-izabela.bakollari@gmail.com> <20200804.161414.149428114422381017.davem@davemloft.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200804.161414.149428114422381017.davem@davemloft.net> X-Spam-Score: -2.0 (--) X-Spam-Status: No Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 04, 2020 at 04:14:14PM -0700, David Miller wrote: > From: izabela.bakollari@gmail.com > Date: Tue, 4 Aug 2020 18:09:08 +0200 > > > @@ -1315,6 +1334,53 @@ static int net_dm_cmd_trace(struct sk_buff *skb, > > return -EOPNOTSUPP; > > } > > > > +static int net_dm_interface_start(struct net *net, const char *ifname) > > +{ > > + struct net_device *nd = dev_get_by_name(net, ifname); > > + > > + if (nd) > > + interface = nd; > > + else > > + return -ENODEV; > > + > > + return 0; > > +} > > + > > +static int net_dm_interface_stop(struct net *net, const char *ifname) > > +{ > > + dev_put(interface); > > + interface = NULL; > > + > > + return 0; > > +} > > Where is the netdev notifier that will drop this reference if the network > device is unregistered? > See the changes to dropmon_net_event in the patch. Its there under the case for NETDEV_UNREGISTER Neil