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=-2.5 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED, USER_AGENT_MUTT autolearn=unavailable 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 2F0DDC43381 for ; Wed, 27 Mar 2019 09:26:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F305E2075C for ; Wed, 27 Mar 2019 09:26:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=resnulli-us.20150623.gappssmtp.com header.i=@resnulli-us.20150623.gappssmtp.com header.b="zBR+Qy2n" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727488AbfC0J0F (ORCPT ); Wed, 27 Mar 2019 05:26:05 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:34889 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725827AbfC0J0E (ORCPT ); Wed, 27 Mar 2019 05:26:04 -0400 Received: by mail-wr1-f68.google.com with SMTP id w1so17674862wrp.2 for ; Wed, 27 Mar 2019 02:26:03 -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=8LLwSdyPWGqlp4Bzp0+4r35rrwN84Sc823Flf31HzUU=; b=zBR+Qy2ngxhlmx0bhOflb4EWbBzIQufoYWEwQINj49YmvS3Bbprw9iODeMCa0l3Fe4 DdNbtQqBFMI/+8/XrdXwZiay/wy78XrjX00M6rl1aPJMjFJFU5uUdjd6i7q/hha2Ujpb ubXYr4sMIZ9K0qI1H5C7M7hAEw46TFL1jPz7US5iQpft3UbE26M+JaAcuRhDLvNt0Ipg N6/7UYgt4hLglA6+0DulTF0zcKIT5PrTYIMNkodN5O6uBCBZox4RFXgD3BdOjIEoEN5k dPdeIzruXQrwnd2Ao8weoqcRXmI36LdCqFgqoLX9IZdt7B+kpuc+isZPl12B7Zbn3hiv pRwQ== 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=8LLwSdyPWGqlp4Bzp0+4r35rrwN84Sc823Flf31HzUU=; b=SQuYRfWqvFn9h6qF+W6VJbGu7Hx5oZoyhvEviB60azFKOEMFF/rOeGTwzQDiREwYFP AyemKDOjOgjYJ7WGLfPsF6ILeSZnhNyEgEFBDXeXPBHmzoLcVB2iOaw6u4093s4Du/87 N3uW75OnbKCICJsw9RsPV4vdKiHH2j8LrG7yPtm/Qobel5dEn2MpN7tuXBDfy1L7DCIY WzkJuDaSwTACCsaH4F+L/VtG8aTprl4Wqib3vYGK18aTuhviFWlQGPPJ6y1pjyhrzFvH 0JQgljGwq6P4dEwdsIlavIDmI1g1QwKxnzy2wKAi4+IRgHgDwNeaDMrwEUaYdn+Acb0C l2tQ== X-Gm-Message-State: APjAAAWDuGifG0k7e9MNEzRDfGxjB8o+4tfmtljwZxLT7k4yF5NENdFx GIMZdvHkwS7rX0uFqWZ/NGPGKQ== X-Google-Smtp-Source: APXvYqx5+UgOTEkgqNoPRdEA6PfMKLBY51gkuoT74RPOQF4oXbubFck41RwE4OPOvsryrr1zHW3ucg== X-Received: by 2002:a05:6000:5:: with SMTP id h5mr21844046wrx.271.1553678763176; Wed, 27 Mar 2019 02:26:03 -0700 (PDT) Received: from localhost (ip-94-113-223-73.net.upcbroadband.cz. [94.113.223.73]) by smtp.gmail.com with ESMTPSA id z7sm2500551wrt.10.2019.03.27.02.26.02 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 27 Mar 2019 02:26:02 -0700 (PDT) Date: Wed, 27 Mar 2019 10:26:02 +0100 From: Jiri Pirko To: Michal Kubecek Cc: David Miller , netdev@vger.kernel.org, Jakub Kicinski , Andrew Lunn , Florian Fainelli , John Linville , Stephen Hemminger , linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next v5 05/22] ethtool: introduce ethtool netlink interface Message-ID: <20190327092602.GA6979@nanopsycho> References: <8795d07d3315b232b4e7ebc7d109c9aa3185e555.1553532199.git.mkubecek@suse.cz> <20190326163640.GD4958@nanopsycho.orion> <20190326173215.GM26076@unicorn.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190326173215.GM26076@unicorn.suse.cz> User-Agent: Mutt/1.11.3 (2019-02-01) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Tue, Mar 26, 2019 at 06:32:15PM CET, mkubecek@suse.cz wrote: >On Tue, Mar 26, 2019 at 05:36:40PM +0100, Jiri Pirko wrote: >> Mon, Mar 25, 2019 at 06:08:09PM CET, mkubecek@suse.cz wrote: >> >+/* genetlink setup */ >> >+ >> >+static const struct genl_ops ethtool_genl_ops[] = { >> >> Please be consistent with prefixes. Either use "ethtool_" or "ethnl_" >> for all functions and variables in this code. > >OK > >> >+/* module setup */ >> >+ >> >+static int __init ethnl_init(void) >> >+{ >> >+ int ret; >> >+ >> >+ ret = genl_register_family(ðtool_genl_family); >> >+ if (WARN(ret < 0, "ethtool: genetlink family registration failed")) >> >> Why do you need this warning? Please avoid it. > >I'm confused now... few days ago you replied "+1" to the idea: > > http://lkml.kernel.org/r/20190321162105.GU2087@nanopsycho > >I agreed that panic() (which is what e.g. rtnetlink does) would be an >overkill but I would be definitely opposed to not having anything in the >log at all and just silently going on without the interface (which may >result in misconfigured network). I believe that if this fails, it is >a sign of something going very wrong inside the kernel so that the "W" >taint flag would be appropriate. Okay. Fair. It's just that I looked over the code and did not find any other genl_register_family() call with WARN. > >Michal