Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp5137118img; Wed, 27 Mar 2019 02:52:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqx9K6hgu4cVC89kcyhCsSucLkMUxEaFRfvEkk8PO0Su0MC4/YtSkORN2MUV7JU3CFiGT4Z9 X-Received: by 2002:a63:d304:: with SMTP id b4mr20491767pgg.300.1553680370941; Wed, 27 Mar 2019 02:52:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553680370; cv=none; d=google.com; s=arc-20160816; b=nezjgsDFxSQPx+b2jSqfIW9hJUzQ1MMA7M3WUMkkReEhSAZvRHuHXodCHEtPgelDOy vpVQ0uYjKpzk2J+uPKb22Ai/gIQMKzRlH1y8y6OjR+byuIElEdCCKkBBL9XWmkavJ4Ca 2bWW+9XwADDqJyY7g50fB67JeuHiGiAAbH48N/t9i2OFbAUHLtwxIKo9CYhXdM1R5kSt 0sYHfFAuGsHaZNtBRzJoD0ANdJLUDdR346TbeIr0UYXGDYOH9XCQ/vQTU6UKneMoP4vI VMOT72LVFiNha8In3EEfp1ldnnkV0Orx5TiOkPdFYKq3MzpdJdLYPp6qtO6fP7g+jpR4 JX5Q== 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:dkim-signature; bh=C2M7XfpVnaKC6q2LLuPi3SVsBeVZZFaSm3Y/SueYprU=; b=FRS0Z0iuVO7la1XR/nlycOtvHEb5NFGiMZBsbH89j/c5++9RdBk+KU98nZqE0KaBrg XyuATIRpV7Yut4z7fsNdlrkvyoetDr4nfcpHoKfPVSBKLCVvsh0cIFKcxF9x+l+rn4N6 rBFNZFtrlKYIzT+85EfWvqUOwPdd/SXIttvVBxluOpjJgaB6Eq+00f9dVk3XOmpIEWwS AAbDcHU0JnRlt+PB112sT+3fNWGqM9CY9CamYz3iJzKpJJ8C743kLdQSfccSfPvtp2/K quoqr1P2RahP7z6kKN1RUkQG2Sm2KE//MIbUN+HqXxbcqsAVat6E/ACQDD9haWevtWg+ gOjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@lunn.ch header.s=20171124 header.b="1/0SjnQW"; 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 m18si17764803pgl.483.2019.03.27.02.52.35; Wed, 27 Mar 2019 02:52:50 -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; dkim=fail header.i=@lunn.ch header.s=20171124 header.b="1/0SjnQW"; 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 S1732470AbfC0Jv5 (ORCPT + 99 others); Wed, 27 Mar 2019 05:51:57 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:40222 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725768AbfC0Jv5 (ORCPT ); Wed, 27 Mar 2019 05:51:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=C2M7XfpVnaKC6q2LLuPi3SVsBeVZZFaSm3Y/SueYprU=; b=1/0SjnQWJG4xr3FKUKMcNQ/6KT oPXUd3KZN3dIQ5YGolaQ8AiHPaQd4PFj+UPBnn0keBmALrhfa7ZdzOMONZX9vMT0eoi14eoU6+Z+X t8wKeSS9rEoiglz3I9QRGJODWo+154kj4M5sM+0j4xjNvztgwhyKeO0gw6lQqB6RIEwk=; Received: from andrew by vps0.lunn.ch with local (Exim 4.89) (envelope-from ) id 1h95Do-0005e4-MP; Wed, 27 Mar 2019 10:51:48 +0100 Date: Wed, 27 Mar 2019 10:51:48 +0100 From: Andrew Lunn To: Jiri Pirko Cc: Michal Kubecek , David Miller , netdev@vger.kernel.org, Jakub Kicinski , Florian Fainelli , John Linville , Stephen Hemminger , linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next v5 08/22] ethtool: support for netlink notifications Message-ID: <20190327095148.GE15396@lunn.ch> References: <3578e5f334acf11b84e75d0ee41c072340a7b085.1553532199.git.mkubecek@suse.cz> <20190326163400.GC4958@nanopsycho.orion> <20190326181720.GO26076@unicorn.suse.cz> <20190327093843.GB6979@nanopsycho> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190327093843.GB6979@nanopsycho> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 27, 2019 at 10:38:43AM +0100, Jiri Pirko wrote: > Tue, Mar 26, 2019 at 07:17:20PM CET, mkubecek@suse.cz wrote: > >On Tue, Mar 26, 2019 at 05:34:00PM +0100, Jiri Pirko wrote: > >> Mon, Mar 25, 2019 at 06:08:18PM CET, mkubecek@suse.cz wrote: > >> >+void ethtool_notify(struct net_device *dev, struct netlink_ext_ack *extack, > >> >+ unsigned int cmd, u32 req_mask, const void *data) > >> >+{ > >> >+ if (unlikely(!ethnl_ok)) > >> > >> Why do you need this? > > > >If genetlink family registration fails, ethtool_notify() can be still > >called from other code (e.g. the ethtool ioctl interface). In such case, > >better bail out right away than fail somewhere later (probably after > >preparing the message which can't be sent anyway). > > Again, haven't seen this in any other gen netlink implementation. Why do > they not need it? Hi Jiri All other gen netlink kill the machine dead if they cannot register the socket. Andrew