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=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, URIBL_BLOCKED,USER_AGENT_MUTT autolearn=ham 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 B7734C43381 for ; Thu, 21 Feb 2019 07:11:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 82AAA2084F for ; Thu, 21 Feb 2019 07:11:44 +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="URkcv20h" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726798AbfBUHKc (ORCPT ); Thu, 21 Feb 2019 02:10:32 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:35639 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726292AbfBUHKc (ORCPT ); Thu, 21 Feb 2019 02:10:32 -0500 Received: by mail-wm1-f65.google.com with SMTP id y15so8824948wma.0 for ; Wed, 20 Feb 2019 23:10:30 -0800 (PST) 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=ffIB9vD48HLLeZEi1EzliAXjc2Qb9iQuq6Rkzz/6D6o=; b=URkcv20hLCmqdvNklUh5tdP+e9TE0FIv9xGVQUK/prSdAnTCvp3TI7M7AyE/6qmbaO Lhl1EeeNlE5zS+LLQbdQXhhZTDo2adwOyfcTfuaiWup5/DMmB5y34XpNy7dBUpfmQ9zy 7IudfXhaEYomgUNOUkNFZILfjqirIxpfwfJv8Y2ZOm2xdDcJ4Dma0ZwWCyD8rmYmhIXz U3imrSU4QnjnBe+c5RFjzGZl3IiafPQfm1W4+KNvM/eiXUm920BIJWaImDMoA1sNXZzf 6rBMAq+kBUCYx1q1MKKnzyvTFiD+6tvCw15wO3bu+09xhSW79PkAiS7qzcXTocMDptEm 0XyA== 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=ffIB9vD48HLLeZEi1EzliAXjc2Qb9iQuq6Rkzz/6D6o=; b=ivOefmC8ccCLy2FCWb4+VExMNumlGRjEPWgvGLGyeotHGOSuoLR4FiF1OUFgL/cfRg YlLbGdY1vYINd6ffrj6b0JJSLj/3roCLCD6SmMTGaEwV/X4/ylkZLzyjTt470A0P+2aU tP6k6+HBm24QwTIiCtf39TbmPU8lIZviR2L+rPo5ve+lvkZsKKCvB4WHhV8dhxZBvDVO qaMGp8KKJo6tojIUEgUCxHClZShedZen8Tti7/5eA0xIV5IxzGeXQciZQH42l34U/u3l FjgznVpEK+seGyLRFSkbk5EWesYz55xvG2smfpEO/lEL07h7KGfIR9OF2398BvbCx3dp Ho5Q== X-Gm-Message-State: AHQUAuap/qa1yA0P6RVdsOHljhb4EZ5MttiOT0lXvddsN2wHY85G7FcR V6lSfaxi5pBAbUgoACABrRzRrA== X-Google-Smtp-Source: AHgI3IbRcIuxsDVT3gShlh5oqP43eNFjeTnxKc/ltbQ9TfWaojqi3VsvCYWwPA5wcyk/sybE8oqiMw== X-Received: by 2002:a1c:ef13:: with SMTP id n19mr9022562wmh.70.1550733030012; Wed, 20 Feb 2019 23:10:30 -0800 (PST) Received: from localhost (ip-213-220-234-21.net.upcbroadband.cz. [213.220.234.21]) by smtp.gmail.com with ESMTPSA id e193sm11436144wmg.18.2019.02.20.23.10.29 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 Feb 2019 23:10:29 -0800 (PST) Date: Thu, 21 Feb 2019 08:00:50 +0100 From: Jiri Pirko To: Florian Fainelli Cc: Jakub Kicinski , davem@davemloft.net, netdev@vger.kernel.org, oss-drivers@netronome.com, mkubecek@suse.cz, andrew@lunn.ch Subject: Re: [PATCH net-next 3/3] nfp: devlink: allow flashing the device via devlink Message-ID: <20190221070050.GA2312@nanopsycho> References: <20190214214046.19182-1-jakub.kicinski@netronome.com> <20190214214046.19182-4-jakub.kicinski@netronome.com> <20190215101514.GD2343@nanopsycho> <20190215074429.6890e47e@cakuba.netronome.com> <20190219091942.GA3080@nanopsycho> <20190219164926.23981359@cakuba.netronome.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Thu, Feb 21, 2019 at 03:59:05AM CET, f.fainelli@gmail.com wrote: > > >On 2/19/2019 4:49 PM, Jakub Kicinski wrote: >> On Tue, 19 Feb 2019 10:19:42 +0100, Jiri Pirko wrote: >>> Fri, Feb 15, 2019 at 04:44:29PM CET, jakub.kicinski@netronome.com wrote: >>>> On Fri, 15 Feb 2019 11:15:14 +0100, Jiri Pirko wrote: >>>>>> static const struct ethtool_ops nfp_net_ethtool_ops = { >>>>> >>>>> Why don't you use the compat fallback? I think you should. >>>> >>>> You and Michal both asked the same so let me answer the first to ask :) >>>> - if devlink is built as a module the fallback is not reachable. >>> >>> So the fallback is not really good as you can't use it for real drivers >>> anyway. Odd. Maybe we should compile devlink in without possibility to >>> have it as module. >> >> Ack, I'll make devlink a bool. > >Meh how about those poor and memory constrained embedded systems? >Ideally ethtool should/could have been modular as well, but that ship >has now sailed. > >> >> I need a little extra time, I forgot that nfp's flower offload still >> doesn't register all ports (using your port flavour infrastructure). >> > >We have had similar issues with PHYLIB before where we wanted >net/core/ethtool.c to be able to call into generic PHYLIB functions to >obtain PHY statistics, an inline helper that de-references the PHY >device's driver function pointers solved that (look for >phy_ethtool_get_{strings,sset,stats}) while letting PHYLIB remain modular. > >devlink_compat_flash_update() is a bit big to be inlined, but why not? Others compat functions are going to come. > >If we make sure we always provide a devlink_mutex and devlink_list that >symbols such that this builds wheter CONFIG_DEVLINK=y|m then everything >else can be determined at runtime whether devlink.ko is loaded or not. > >Does that make sense? >-- >Florian