[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200917124753.7bc1d2a9@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date: Thu, 17 Sep 2020 12:47:53 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Shannon Nelson <snelson@...sando.io>
Cc: netdev@...r.kernel.org, davem@...emloft.net
Subject: Re: [PATCH v4 net-next 2/5] devlink: collect flash notify params
into a struct
On Wed, 16 Sep 2020 20:02:01 -0700 Shannon Nelson wrote:
> The dev flash status notify function parameter lists are getting
> rather long, so add a struct to be filled and passed rather than
> continuously changing the function signatures.
>
> Signed-off-by: Shannon Nelson <snelson@...sando.io>
> ---
> include/net/devlink.h | 21 ++++++++++++
> net/core/devlink.c | 80 +++++++++++++++++++++++--------------------
> 2 files changed, 63 insertions(+), 38 deletions(-)
>
> diff --git a/include/net/devlink.h b/include/net/devlink.h
> index f206accf80ad..9ab2014885cb 100644
> --- a/include/net/devlink.h
> +++ b/include/net/devlink.h
> @@ -391,6 +391,27 @@ struct devlink_param_gset_ctx {
> enum devlink_param_cmode cmode;
> };
>
> +/**
> + * struct devlink_flash_notify - devlink dev flash notify data
> + * @cmd: devlink notify command code
> + * @status_msg: current status string
> + * @component: firmware component being updated
> + * @done: amount of work completed of total amount
> + * @total: amount of work expected to be done
> + * @timeout: expected max timeout in seconds
> + *
> + * These are values to be given to userland to be displayed in order
> + * to show current activity in a firmware update process.
> + */
> +struct devlink_flash_notify {
> + enum devlink_command cmd;
I'd leave out cmd out of the params structure, otherwise I'll be
slightly awkward for drivers to fill in given the current helpers
are per cmd.
> + const char *status_msg;
> + const char *component;
> + unsigned long done;
> + unsigned long total;
> + unsigned long timeout;
> +};
Powered by blists - more mailing lists