Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2941984pxa; Tue, 18 Aug 2020 02:07:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxzT2Dr7HZrTak//P5ZPEjqyt7MlCu06KwMpBTMHZSIHLAKPdTCr9qc1NlBfUCtk3yiPXa1 X-Received: by 2002:a17:906:138b:: with SMTP id f11mr18540189ejc.310.1597741656582; Tue, 18 Aug 2020 02:07:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597741656; cv=none; d=google.com; s=arc-20160816; b=WWk0NuaxipGwZAbugOphH2bjYr/6KIY1aZL2MzGCPEptgLoRJ4f2UrY98+sq/1AWvf 31uBqwB/50wMrRe0ChZCDyVZ9KXmTuHFtBIuoMNuCIPplwhrT5Hkj/Ftc4p5Md33QiVy OqnfZrjLfS2botskEHpnnsiQy8H6PJrhi9PL5XEJnojNBEpxeRN4SIf6hB2sYHZ4HTD6 vsHxPxUdmNG6va2CrDkRFUs55e9wMjXOHHrcHC+4YvUksqiJhrE3bdnboxCkhV7d4tQv m8MeLfh9tf4mXAbVGy3tJw1dr2lrmZhmmSeODEWzJfzVHAcIZI1FKxcFgJqXgvac9j/+ cYng== 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=HttBBno2RrdfqVBFotFLEqVwUaVEe8oX4DoTjrSxv9w=; b=LJo2VkepOMYQdHMUBDw/rIjZK2WlxLDtm6ThpHos8VprmUKTaPv8G9WsB7GjgPtamC JphpB+PoZ0bxEIKLF4MiY4LeiiuOsVzuSLovbqP3qQfub4LDPhigWSR+ETslF26PFQSN MAjejZKvk9PEvmkekzjXnbSaAM69Dashg3hPMU+Wntj6GM+juuzWXCmLMLTP+dY8yt/i S5UiKOu6JcRoj744Gfj3y1AYqsJ6safHKYzfa/aJcL/d+NVIDlMssWmZ97Pv+/N9J+6M MG/A2+ll0WsW6AAz9VU0gZZXLIFvq+rTnB6OLZGzDPtMM7EjSSUzPcnjIr2D5mY9tnKR Wmgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=YxtEA4x1; 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 s18si12552973eja.619.2020.08.18.02.07.11; Tue, 18 Aug 2020 02:07:36 -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=YxtEA4x1; 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 S1726519AbgHRJG1 (ORCPT + 99 others); Tue, 18 Aug 2020 05:06:27 -0400 Received: from hqnvemgate25.nvidia.com ([216.228.121.64]:13380 "EHLO hqnvemgate25.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726043AbgHRJG0 (ORCPT ); Tue, 18 Aug 2020 05:06:26 -0400 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate25.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Tue, 18 Aug 2020 02:05:28 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Tue, 18 Aug 2020 02:06:26 -0700 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Tue, 18 Aug 2020 02:06:26 -0700 Received: from [10.21.180.203] (10.124.1.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Tue, 18 Aug 2020 09:06:16 +0000 Subject: Re: [PATCH net-next RFC v2 01/13] devlink: Add reload action option to devlink reload command To: Jakub Kicinski , Moshe Shemesh CC: "David S. Miller" , Jiri Pirko , , References: <1597657072-3130-1-git-send-email-moshe@mellanox.com> <1597657072-3130-2-git-send-email-moshe@mellanox.com> <20200817091615.37e76ca3@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> From: Moshe Shemesh Message-ID: <9fbad1d6-7052-225a-7d62-9d29548d6342@nvidia.com> Date: Tue, 18 Aug 2020 12:06:13 +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: <20200817091615.37e76ca3@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: quoted-printable Content-Language: en-US X-Originating-IP: [10.124.1.5] X-ClientProxiedBy: HQMAIL101.nvidia.com (172.20.187.10) To HQMAIL107.nvidia.com (172.20.187.13) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1597741528; bh=HttBBno2RrdfqVBFotFLEqVwUaVEe8oX4DoTjrSxv9w=; 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=YxtEA4x1mszR7M0/a+ZkzDE7cg06avnU3+2OWGw8K0hTsFeWpyAfcWoht6or+7zPs zm+DtdSn0Plr8R6NJe2J6+z1vUaPPnocX4Dd06PmMtj+WYZMjM7lcdMv8dNDEyscd2 37GTGNZBw0Mb5KUWVt3Y46SNAEOvz7Cg2219UP4Uglycq8pASc7wY0WDIbCxguECcj Dzf9/pXUIHGsx2lRez/E9DJ+Mia0njUQ/SiZ0jxrlxdW0fPhtXA/KdJQauV6/6CCYz nU+o5vOlYTBWV9WnYYLQGV4Fimwv6mWCeIht5bQYKDVpZIFLm7PZHI2/HNUwLpisEE W0VuLCW3qRlIw== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/17/2020 7:16 PM, Jakub Kicinski wrote: > > On Mon, 17 Aug 2020 12:37:40 +0300 Moshe Shemesh 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 >> the firmware to reinitialize the driver entities. > See, this is why I wanted to keep --live as a separate option. > Normally the driver is okay to satisfy more actions than requested, > e.g. activate FW even if only driver_reinit was requested. > > fw_live_patch does not have this semantics, it explicitly requires > driver to not impact connectivity much. No "can do more resets than > requested" here. Hence the --live part would be better off as a > separate argument (at least in uAPI, the in-kernel interface we can > change later if needed). Yes, it does have a different semantics, kind of no reset allowed. On the other hand, it is not related to driver_reinit, only fw_activate. So the uAPI should be: =C2=A0=C2=A0=C2=A0 devlink dev reload DEV [ netns { PID | NAME | ID } ] [ = action {=20 driver_reinit | fw_activate [--live] } ] Or maybe better than "live" say explicitly "no reset": =C2=A0=C2=A0=C2=A0 devlink dev reload DEV [ netns { PID | NAME | ID } ] [ = action {=20 driver_reinit | fw_activate [--no_reset] } ] >> Reload actions supported are: >> driver_reinit: driver entities re-initialization, applying devlink-param >> and devlink-resource values. >> fw_activate: firmware activate. >> fw_live_patch: firmware live patching.