Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp5146957img; Wed, 27 Mar 2019 03:05:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqw4zgde43zYqA26TSzu99oGtm1XgAfXrtfdX0eKkqDBXBE4BVCzMppWspxOeQf4F218WYoz X-Received: by 2002:a65:6383:: with SMTP id h3mr32698341pgv.11.1553681144801; Wed, 27 Mar 2019 03:05:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553681144; cv=none; d=google.com; s=arc-20160816; b=0ogf01qt/GshTZ0IqBQ35I4EXI0z3cB0O/EF+DlIWj9ihebHOO+OfCk6qhUuW1/q4m CO/S4GSV9zz1wpcoubAVUFbRo3l24WuhonJP8ffFb8202/HVdzFzteUs1KihbAHwnat7 kk4uLth9CYwXZbAVhN5KBvmkCo+Db5WVMCFncuKcq2kXL1J6yvWOg/5XacNFyL2JRZSr mS597KKzbcEaOTkGyzAy3TQ0MX4c4/w2YxWeIW9JgaKDlY1heWR6n//e9wi2gZFGCRaC yus/qQX9tJaXNCpjO+ngsffKbx7wX68dmBHuTro3IBF6mtDzatw8VcnY9+cJSGJbHwOa uvsQ== 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=+Ngg8dVEnWPMGor+nIV4V2v+8f2pclCfsBtCpdi6Jbc=; b=yPvOEFLJOX8xH9rM7JuO6vtonJgk5mkkKU7EX2nI+Vb2CK+6XIBLw+YF260kWq6IiJ l29SxnS3e+ru3aY6X01TScj88N0tZ+uLV2Yj0o++3zg4CUoKqlLAIFGtNUeSyaGvHrAo ++dJ2X0egH89ALVbjKGbx2/v7cHwHFyrK0KGEtAQ5XyZT+HLO6ZWIC6uwe7AZbVtbw3M fe5E3bIhwfPPAwqvciY6c/OORgOi9r4s6v4rcpWPWIzpzgQNECqkzcnAYBoVd/gscOe3 oRcJ2UUEjRluvzLIgk84poF/5ZUI807E9QxfdOhbry+Dlo9TOZt98T/Oic3L56lNFVhV Nqog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@resnulli-us.20150623.gappssmtp.com header.s=20150623 header.b=iuZvIrac; 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 c14si17398763pgt.556.2019.03.27.03.05.28; Wed, 27 Mar 2019 03:05:44 -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=pass header.i=@resnulli-us.20150623.gappssmtp.com header.s=20150623 header.b=iuZvIrac; 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 S1732800AbfC0KEo (ORCPT + 99 others); Wed, 27 Mar 2019 06:04:44 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:35252 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731664AbfC0KEo (ORCPT ); Wed, 27 Mar 2019 06:04:44 -0400 Received: by mail-wr1-f67.google.com with SMTP id w1so17822608wrp.2 for ; Wed, 27 Mar 2019 03:04:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=resnulli-us.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=+Ngg8dVEnWPMGor+nIV4V2v+8f2pclCfsBtCpdi6Jbc=; b=iuZvIracgjguJPsJ/z/h1PhxSafhOzr1WHs3aKRwhCRoLl2sDOQGjpLyTERZnccfNk 9gYlhx4cSUWxB0oV2exkNi32kY13LNIY3lUjYkHRC0cQJffVX7pBuyxrZSBkw93NkL3M FDPPEZ12IVQzjCrPK3be+CYtg9GphN70HXIUJlBh3X1ixIGupscJuPorJ9xDLfoE0DbX IGaxIoJ/xqqPJGMF5HQ4cB5PwAwY565yU9l6EyG3+pkLXAxZ89OTCiz5xbIabW+WwmOw +K3Vyfv9HlLMEgWfiSUjkcF9/79BKOQ7MQYt9z+R14e2/JZEApfT1cUntfCRfws5/zrp uozQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=+Ngg8dVEnWPMGor+nIV4V2v+8f2pclCfsBtCpdi6Jbc=; b=bsANO/dc2sd3tKbVyrK/mnlrIFsrOELfn7Aoztn9Z+j6/MiFWX+/Z23LK1WTdCtwP8 2IQSRx7fq4lIGOjMqFiU1bT2mO0rz8CWsm6Y8PM7ggovRUaFupgfUiNmhkLKMGKJ6XmR yOzzarum+YxG3tgJdXSH5W1v9e81lTzQ1dFUOKyJhJvaFHd9OcLxDVPzANsLzrl6jdOJ blouRo3pTl2oFfaXhUdg2cPFBoFKIIfFNLXNfRmlgrqn/6ae36iq+Yv7Tzk9bOlL3XbB n7ZPWs2CNjuKhmL2JHu6rcaGvgcKB+o57kq6wjWWUZTQDqJJV+qdxiay/gpxXXbfT7XY 6a3w== X-Gm-Message-State: APjAAAXVDexlF4SUAe/KSGP2d9mcjNYs2JpUCD+UPJ6y2nTcHwa0Cpm1 MVVqr6w2nZEICwR5/M29n1yU4g== X-Received: by 2002:a05:6000:124a:: with SMTP id j10mr23653836wrx.24.1553681082668; Wed, 27 Mar 2019 03:04:42 -0700 (PDT) Received: from localhost (ip-94-113-223-73.net.upcbroadband.cz. [94.113.223.73]) by smtp.gmail.com with ESMTPSA id h131sm5657809wmh.1.2019.03.27.03.04.42 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 27 Mar 2019 03:04:42 -0700 (PDT) Date: Wed, 27 Mar 2019 11:04:41 +0100 From: Jiri Pirko To: Andrew Lunn 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: <20190327100441.GE6979@nanopsycho> References: <3578e5f334acf11b84e75d0ee41c072340a7b085.1553532199.git.mkubecek@suse.cz> <20190326163400.GC4958@nanopsycho.orion> <20190326181720.GO26076@unicorn.suse.cz> <20190327093843.GB6979@nanopsycho> <20190327095148.GE15396@lunn.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190327095148.GE15396@lunn.ch> User-Agent: Mutt/1.11.3 (2019-02-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Wed, Mar 27, 2019 at 10:51:48AM CET, andrew@lunn.ch wrote: >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 Wait, what do you mean be "kill the machine dead"? >the socket. Example: static int __init devlink_init(void) { return genl_register_family(&devlink_nl_family); }