Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp475572pxk; Thu, 1 Oct 2020 07:06:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxsrZuojsz4pL3TGLIbLGxm3JUIHyADZRHGSB6vN8oPGyZKVz26So0OnVpUB3rcnp0gE/7V X-Received: by 2002:a17:906:d78d:: with SMTP id pj13mr8504735ejb.15.1601561172126; Thu, 01 Oct 2020 07:06:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601561172; cv=none; d=google.com; s=arc-20160816; b=Yja2LheTqLXVaRmuXg9cZSEZEHozL96Q4jN0FU0a8IqeEfdHzEDFMuIVCq/uC6ONvN Yf9PcGOL+VE8fVh0SO1kZOepvck3kU8HdxC1KyCziqYFdAwME8K/1Tng27eYul8f6g1i eati8vOI5njLGn8iGKeX9BRi+5MC98SHwvr86I33BBsM6u36IiUbLwF/QJcKOGJAUdQg exf9U6uqpRmOkbAv4YvbTbVFsyOsl16SVJwYGgrPK2sk2q6FNAoqhCLoO/jemapgtVCJ Wp/h1VESGQm1uEwn6ZmeisCDXckgavqCMHufpMAH0e2kEi+yrC75FIcf8H0q5MIJffci wunw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=b0LM6M8oChn3Iq83WXvfFJnzrew0zDG2oPftp5/xJSY=; b=M8LYwrB4CWyxS94UKX139+zl1VQ5dkU4prsvy4GbMBr53weNGqNuckbGHTttFvqQwC DtTri5mdO7nssTrtlXjW2HkK3QBPWZYnaN58nir19enWzoPMY4/2dJ4u7nperDVl1/bF KK1/ex+nwp7GBwBEipLy48djfuzLFmq8fKQ7k4C86itT19YLJDi5sm2MAI8IrJq72SmS J072a7Xi6u8Qn0wceRuFw83E/wrjw4rw+sV3QUWC+7lAIJArVcZUS0gz+S/HCQS7i1wU eiEP+CM5yfyGbKFDKKpRMJPEx5BP9+/Ljb04jbiSEvh76xcBeaJ2FWoAUj25gonFZsDp KEIg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=mellanox.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v12si3612122edl.552.2020.10.01.07.05.48; Thu, 01 Oct 2020 07:06:12 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=mellanox.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732664AbgJAOBa (ORCPT + 99 others); Thu, 1 Oct 2020 10:01:30 -0400 Received: from mail-il-dmz.mellanox.com ([193.47.165.129]:36683 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1732471AbgJAOAa (ORCPT ); Thu, 1 Oct 2020 10:00:30 -0400 Received: from Internal Mail-Server by MTLPINE1 (envelope-from moshe@mellanox.com) with SMTP; 1 Oct 2020 17:00:27 +0300 Received: from dev-l-vrt-136.mtl.labs.mlnx (dev-l-vrt-136.mtl.labs.mlnx [10.234.136.1]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 091E0RxA002378; Thu, 1 Oct 2020 17:00:27 +0300 Received: from dev-l-vrt-136.mtl.labs.mlnx (localhost [127.0.0.1]) by dev-l-vrt-136.mtl.labs.mlnx (8.14.7/8.14.7) with ESMTP id 091E0QHB011192; Thu, 1 Oct 2020 17:00:26 +0300 Received: (from moshe@localhost) by dev-l-vrt-136.mtl.labs.mlnx (8.14.7/8.14.7/Submit) id 091E0QPk011191; Thu, 1 Oct 2020 17:00:26 +0300 From: Moshe Shemesh To: "David S. Miller" , Jakub Kicinski , Jiri Pirko Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Moshe Shemesh Subject: [PATCH net-next 16/16] devlink: Add Documentation/networking/devlink/devlink-reload.rst Date: Thu, 1 Oct 2020 16:59:19 +0300 Message-Id: <1601560759-11030-17-git-send-email-moshe@mellanox.com> X-Mailer: git-send-email 1.8.4.3 In-Reply-To: <1601560759-11030-1-git-send-email-moshe@mellanox.com> References: <1601560759-11030-1-git-send-email-moshe@mellanox.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add devlink reload rst documentation file. Update index file to include it. Signed-off-by: Moshe Shemesh --- RFCv5 -> v1: - Rename reload_action_limit_level to reload_limit RFCv4 -> RFCv5: - Rephrase namespace chnage section - Rephrase note on actions performed RFCv3 -> RFCv4: - Remove reload action fw_activate_no_reset - Add reload actions limit levels and document the no_reset limit level constrains RFCv2 -> RFCv3: - Devlink reload returns the actions done - Replace fw_live_patch action by fw_activate_no_reset - Explain fw_activate meaning RFCv1 -> RFCv2: - Instead of reload levels driver,fw_reset,fw_live_patch have reload actions driver_reinit,fw_activate,fw_live_patch --- .../networking/devlink/devlink-reload.rst | 81 +++++++++++++++++++ Documentation/networking/devlink/index.rst | 1 + 2 files changed, 82 insertions(+) create mode 100644 Documentation/networking/devlink/devlink-reload.rst diff --git a/Documentation/networking/devlink/devlink-reload.rst b/Documentation/networking/devlink/devlink-reload.rst new file mode 100644 index 000000000000..5abc5c2c75fd --- /dev/null +++ b/Documentation/networking/devlink/devlink-reload.rst @@ -0,0 +1,81 @@ +.. SPDX-License-Identifier: GPL-2.0 + +============== +Devlink Reload +============== + +``devlink-reload`` provides mechanism to either reinit driver entities, +applying ``devlink-params`` and ``devlink-resources`` new values or firmware +activation depends on reload action selected. + +Reload actions +============== + +User may select a reload action. +By default ``driver_reinit`` action is selected. + +.. list-table:: Possible reload actions + :widths: 5 90 + + * - Name + - Description + * - ``driver-reinit`` + - Devlink driver entities re-initialization, including applying + new values to devlink entities which are used during driver + load such as ``devlink-params`` in configuration mode + ``driverinit`` or ``devlink-resources`` + * - ``fw_activate`` + - Firmware activate. Activates new firmware if such image is stored and + pending activation. If no limitation specified this action may involve + firmware reset. If no new image pending this action will reload current + firmware image. + +Note that even though user asks for a specific action, the driver +implementation might require to perform another action alongside with +it. For example, some driver do not support driver reinitialization +being performed without fw activation. Therefore, the devlink reload +command returns the list of actions which were actrually performed. + +Reload limits +============= + +By default reload actions are not limited and driver implementation may +include reset or downtime as needed to perform the actions. + +However, some drivers support action limits, which limit the action +implementation to specific constrains. + +.. list-table:: Possible reload limits + :widths: 5 90 + + * - Name + - Description + * - ``no_reset`` + - No reset allowed, no down time allowed, no link flap and no + configuration is lost. + +Change namespace +================ + +The netns option allow user to be able to move devlink instances into +namespaces during devlink reload operation. +By default all devlink instances are created in init_net and stay there. + +example usage +------------- + +.. code:: shell + + $ devlink dev reload help + $ devlink dev reload DEV [ netns { PID | NAME | ID } ] [ action { driver_reinit | fw_activate } ] [ limit no_reset ] + + # Run reload command for devlink driver entities re-initialization: + $ devlink dev reload pci/0000:82:00.0 action driver_reinit + reload_actions_performed: + driver_reinit + + # Run reload command to activate firmware: + # Note that mlx5 driver reloads the driver while activating firmware + $ devlink dev reload pci/0000:82:00.0 action fw_activate + reload_actions_performed: + driver_reinit fw_activate diff --git a/Documentation/networking/devlink/index.rst b/Documentation/networking/devlink/index.rst index 7684ae5c4a4a..d82874760ae2 100644 --- a/Documentation/networking/devlink/index.rst +++ b/Documentation/networking/devlink/index.rst @@ -20,6 +20,7 @@ general. devlink-params devlink-region devlink-resource + devlink-reload devlink-trap Driver-specific documentation -- 2.18.2