Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp504977pxa; Wed, 19 Aug 2020 07:26:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyX7rQ9loaoTahOR4PfzbGWTMVSdfU1XBgFOSw+zvgLwYclu7FMOruB3q/Y5Rs8qQPsguS/ X-Received: by 2002:a05:6402:1ca6:: with SMTP id cz6mr24345837edb.310.1597847189695; Wed, 19 Aug 2020 07:26:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597847189; cv=none; d=google.com; s=arc-20160816; b=R1mOQQh+RRt0AFpLIhnybtBsCANqEmc6wr1ouUuidXTLFJnWsLGmxuqRzARGBufLhE fPv4oLida3e8BUTuT3hnJfeATZtOB50HJC9njBZSuoETbR8uHzeUGoYBIoV7VHWxiBqT lOtEbBl+uar4aMcc4D19TcZYJOBHZQu6mre+83mtkbqudj7wlP6XNQtT25csbDaIBjhz HhzV+A/g/pWdc6wtHrJXS5zfBxFBep/b5m6Agatijqogp2EtmWo5emK8qoqCbpYz7ln8 rjBWytERvQ33aFJzq94VoPvAtosP5QhANJZfWKr0Iu7VjLDNUeT0I048GIjG3CwedN3+ 2/sQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=Qxip6IT3STJSq18HFrrNhwWzo+CK4/CnLK+xpBZUlsY=; b=YswZBNYWJu4fngcdriaPQfNvRjo4vnuQVF+kPR8p7tsvo4zXPnri3C4Vl4nHsKAmwE ct6g8nhWT2GRP1a+JtxdTyomYZctQSz8EnnmzhUabBMdgFIz3l68zzFz5xFse0z8Jpar hmhGn9lWTp/D6AQa3NXlXZ2YMNPaeZ4naAjtFuVpfCiJN64ZWj6pUWiQuCy3TnW2o0ol 36wCMAWcPMGulNAW7TEe9YHapRmwRW94Tiqjq3gNuwWWggO6cGRGUCs7G819dxWtkavE R3PzdTHaCFEtiMB81u6ewFzfYKAF3nVXn7ATbRO31U1JiGIpfSWqn8Qhr0AW9zFqqhSS zPyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=OW4kOZ2C; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h25si15944024eje.30.2020.08.19.07.26.05; Wed, 19 Aug 2020 07:26:29 -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; dkim=pass header.i=@nvidia.com header.s=n1 header.b=OW4kOZ2C; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728574AbgHSOXq (ORCPT + 99 others); Wed, 19 Aug 2020 10:23:46 -0400 Received: from hqnvemgate24.nvidia.com ([216.228.121.143]:1500 "EHLO hqnvemgate24.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726560AbgHSOXp (ORCPT ); Wed, 19 Aug 2020 10:23:45 -0400 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate24.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Wed, 19 Aug 2020 07:21:50 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Wed, 19 Aug 2020 07:23:43 -0700 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Wed, 19 Aug 2020 07:23:43 -0700 Received: from [10.21.180.149] (10.124.1.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 19 Aug 2020 14:23:31 +0000 Subject: Re: [PATCH net-next RFC v2 01/13] devlink: Add reload action option to devlink reload command To: Jiri Pirko CC: Jakub Kicinski , Moshe Shemesh , "David S. Miller" , Jiri Pirko , , References: <1597657072-3130-1-git-send-email-moshe@mellanox.com> <1597657072-3130-2-git-send-email-moshe@mellanox.com> <20200817163612.GA2627@nanopsycho> <3ed1115e-8b44-b398-55f2-cee94ef426fd@nvidia.com> <20200818171010.11e4b615@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <20200819124616.GA2314@nanopsycho.orion> From: Moshe Shemesh Message-ID: Date: Wed, 19 Aug 2020 17:23:25 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: <20200819124616.GA2314@nanopsycho.orion> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Originating-IP: [10.124.1.5] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To HQMAIL107.nvidia.com (172.20.187.13) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1597846910; bh=Qxip6IT3STJSq18HFrrNhwWzo+CK4/CnLK+xpBZUlsY=; h=X-PGP-Universal:Subject:To:CC:References:From:Message-ID:Date: User-Agent:MIME-Version:In-Reply-To:Content-Type: Content-Transfer-Encoding:Content-Language:X-Originating-IP: X-ClientProxiedBy; b=OW4kOZ2CANioSggdqHSSYoaHXOSeLPTyoPOFf5PTx1Nb/XTTnvu1n/5XfLfPIaEAe Zg9tYzmZ/WNMUHauEpRKpyFL7er6a1Z4E8XNOeF7GGkvrHNUXUpftJ9LRCReAGbrvB g/NTYR+1ApCr8yvINOfr1PBGyhAAIrsWhwbKgQEzdRvAvVZKhA9eKgsnIMI+0Ht7ug k+EYQAiFV6q6aGYxQeICtz7RfCm892pYzZYdD4n7QjEeRHm5DIVLpvu9T16m62VH5i f9cbwipvzfqdYxDYZ1UehK640ZYdtF7QK7LNI0usJCh+eHOhcPo7zwE8jc1Ng4GAQd S+g1CHCEFBmOA== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/19/2020 3:46 PM, Jiri Pirko wrote: > Wed, Aug 19, 2020 at 02:18:22PM CEST, moshe@nvidia.com wrote: >> On 8/19/2020 3:10 AM, Jakub Kicinski wrote: >>> On Tue, 18 Aug 2020 12:10:36 +0300 Moshe Shemesh wrote: >>>> On 8/17/2020 7:36 PM, Jiri Pirko wrote: >>>>> Mon, Aug 17, 2020 at 11:37:40AM CEST, moshe@mellanox.com wrote: >>>>>> Add devlink reload action to allow the user to request a specific reload >>>>>> action. The action parameter is optional, if not specified then devlink >>>>>> driver re-init action is used (backward compatible). >>>>>> Note that when required to do firmware activation some drivers may need >>>>>> to reload the driver. On the other hand some drivers may need to reset >>>>> Sounds reasonable. I think it would be good to indicate that though. Not >>>>> sure how... >>>> Maybe counters on the actions done ? Actually such counters can be >>>> useful on debug, knowing what reloads we had since driver was up. >>> Wouldn't we need to know all types of reset of drivers may do? >> >> Right, we can't tell all reset types driver may have, but we can tell which >> reload actions were done. >> >>> I think documenting this clearly should be sufficient. >>> >>> A reset counter for the _requested_ reset type (fully maintained by >>> core), however - that may be useful. The question "why did this NIC >>> reset itself / why did the link just flap" comes up repeatedly. >> >> I will add counters on which reload were done. reload_down()/up() can return >> which actions were actually done and devlink will show counters. > Why a counter? Just return what was done over netlink reply. Such counters can be useful for debugging, telling which reload actions were done on this dev from the point it was up.