Netdev Archive on lore.kernel.org
 help / color / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
To: Vasundhara Volam <vasundhara-v.volam@broadcom.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org,
	Jiri Pirko <jiri@mellanox.com>,
	Michael Chan <michael.chan@broadcom.com>
Subject: Re: [PATCH v2 net-next 1/4] devlink: Add new "allow_fw_live_reset" generic device parameter.
Date: Sun, 24 May 2020 06:53:35 +0200
Message-ID: <20200524045335.GA22938@nanopsycho> (raw)
In-Reply-To: <1590214105-10430-2-git-send-email-vasundhara-v.volam@broadcom.com>

Sat, May 23, 2020 at 08:08:22AM CEST, vasundhara-v.volam@broadcom.com wrote:
>Add a new "allow_fw_live_reset" generic device bool parameter. When
>parameter is set, user is allowed to reset the firmware in real time.
>
>This parameter is employed to communicate user consent or dissent for
>the live reset to happen. A separate command triggers the actual live
>reset.
>
>Cc: Jiri Pirko <jiri@mellanox.com>
>Signed-off-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com>
>Signed-off-by: Michael Chan <michael.chan@broadcom.com>
>---
>v2: Rename param name to "allow_fw_live_reset" from
>"enable_hot_fw_reset".
>Update documentation for the param in devlink-params.rst file.
>---
> Documentation/networking/devlink/devlink-params.rst | 6 ++++++
> include/net/devlink.h                               | 4 ++++
> net/core/devlink.c                                  | 5 +++++
> 3 files changed, 15 insertions(+)
>
>diff --git a/Documentation/networking/devlink/devlink-params.rst b/Documentation/networking/devlink/devlink-params.rst
>index d075fd0..ad54dfb 100644
>--- a/Documentation/networking/devlink/devlink-params.rst
>+++ b/Documentation/networking/devlink/devlink-params.rst
>@@ -108,3 +108,9 @@ own name.
>    * - ``region_snapshot_enable``
>      - Boolean
>      - Enable capture of ``devlink-region`` snapshots.
>+   * - ``allow_fw_live_reset``
>+     - Boolean
>+     - Firmware live reset allows users to reset the firmware in real time.
>+       For example, after firmware upgrade, this feature can immediately reset
>+       to run the new firmware without reloading the driver or rebooting the

This does not tell me anything about the reset being done on another
host. You need to emhasize that, in the name of the param too.



>+       system.
>diff --git a/include/net/devlink.h b/include/net/devlink.h
>index 8ffc1b5c..488b61c 100644
>--- a/include/net/devlink.h
>+++ b/include/net/devlink.h
>@@ -406,6 +406,7 @@ enum devlink_param_generic_id {
> 	DEVLINK_PARAM_GENERIC_ID_FW_LOAD_POLICY,
> 	DEVLINK_PARAM_GENERIC_ID_RESET_DEV_ON_DRV_PROBE,
> 	DEVLINK_PARAM_GENERIC_ID_ENABLE_ROCE,
>+	DEVLINK_PARAM_GENERIC_ID_ALLOW_FW_LIVE_RESET,
> 
> 	/* add new param generic ids above here*/
> 	__DEVLINK_PARAM_GENERIC_ID_MAX,
>@@ -443,6 +444,9 @@ enum devlink_param_generic_id {
> #define DEVLINK_PARAM_GENERIC_ENABLE_ROCE_NAME "enable_roce"
> #define DEVLINK_PARAM_GENERIC_ENABLE_ROCE_TYPE DEVLINK_PARAM_TYPE_BOOL
> 
>+#define DEVLINK_PARAM_GENERIC_ALLOW_FW_LIVE_RESET_NAME "allow_fw_live_reset"
>+#define DEVLINK_PARAM_GENERIC_ALLOW_FW_LIVE_RESET_TYPE DEVLINK_PARAM_TYPE_BOOL
>+
> #define DEVLINK_PARAM_GENERIC(_id, _cmodes, _get, _set, _validate)	\
> {									\
> 	.id = DEVLINK_PARAM_GENERIC_ID_##_id,				\
>diff --git a/net/core/devlink.c b/net/core/devlink.c
>index 7b76e5f..8544f23 100644
>--- a/net/core/devlink.c
>+++ b/net/core/devlink.c
>@@ -3011,6 +3011,11 @@ static int devlink_nl_cmd_flash_update(struct sk_buff *skb,
> 		.name = DEVLINK_PARAM_GENERIC_ENABLE_ROCE_NAME,
> 		.type = DEVLINK_PARAM_GENERIC_ENABLE_ROCE_TYPE,
> 	},
>+	{
>+		.id = DEVLINK_PARAM_GENERIC_ID_ALLOW_FW_LIVE_RESET,
>+		.name = DEVLINK_PARAM_GENERIC_ALLOW_FW_LIVE_RESET_NAME,
>+		.type = DEVLINK_PARAM_GENERIC_ALLOW_FW_LIVE_RESET_TYPE,
>+	},
> };
> 
> static int devlink_param_generic_verify(const struct devlink_param *param)
>-- 
>1.8.3.1
>

  reply index

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-23  6:08 [PATCH v2 net-next 0/4] bnxt_en: Add new "allow_fw_live_reset" generic devlink parameter Vasundhara Volam
2020-05-23  6:08 ` [PATCH v2 net-next 1/4] devlink: Add new "allow_fw_live_reset" generic device parameter Vasundhara Volam
2020-05-24  4:53   ` Jiri Pirko [this message]
2020-05-24  6:29     ` Vasundhara Volam
2020-05-25 17:26       ` Jiri Pirko
2020-05-26  4:28         ` Vasundhara Volam
2020-05-26  4:47           ` Jiri Pirko
2020-05-26  6:42             ` Vasundhara Volam
2020-05-26 13:40               ` Jiri Pirko
2020-05-26 14:23                 ` Vasundhara Volam
2020-05-27  3:37                   ` Vasundhara Volam
2020-05-27 20:14                     ` Jakub Kicinski
2020-05-27 20:57                       ` Michael Chan
2020-05-27 21:16                         ` Jakub Kicinski
2020-05-28  1:50                           ` Vasundhara Volam
2020-05-28 19:05                             ` Jakub Kicinski
2020-05-29 14:29                               ` Vasundhara Volam
2020-06-01  6:40                           ` Jiri Pirko
2020-06-01  6:39                         ` Jiri Pirko
2020-06-01  8:50                           ` Vasundhara Volam
2020-06-01  9:49                             ` Jiri Pirko
2020-06-01  9:57                               ` Vasundhara Volam
2020-06-01 10:05                                 ` Jiri Pirko
2020-06-01 21:44                           ` Jakub Kicinski
2020-06-02  6:28                             ` Jiri Pirko
2020-06-01  7:18                   ` Jiri Pirko
2020-06-01  8:53                     ` Vasundhara Volam
2020-06-01  9:50                       ` Jiri Pirko
2020-06-01  9:59                         ` Vasundhara Volam
2020-06-01 10:05                           ` Jiri Pirko
2020-05-23  6:08 ` [PATCH v2 net-next 2/4] bnxt_en: Update firmware spec. to 1.10.1.40 Vasundhara Volam
2020-05-23  6:08 ` [PATCH v2 net-next 3/4] bnxt_en: Use allow_fw_live_reset generic devlink parameter Vasundhara Volam
2020-05-23  6:08 ` [PATCH v2 net-next 4/4] bnxt_en: Check if fw_live_reset is allowed before doing ETHTOOL_RESET Vasundhara Volam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200524045335.GA22938@nanopsycho \
    --to=jiri@resnulli.us \
    --cc=davem@davemloft.net \
    --cc=jiri@mellanox.com \
    --cc=michael.chan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    --cc=vasundhara-v.volam@broadcom.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Netdev Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/netdev/0 netdev/git/0.git
	git clone --mirror https://lore.kernel.org/netdev/1 netdev/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 netdev netdev/ https://lore.kernel.org/netdev \
		netdev@vger.kernel.org
	public-inbox-index netdev

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.netdev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git