From: Ido Schimmel <idosch@mellanox.com>
To: Jiri Pirko <jiri@resnulli.us>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"davem@davemloft.net" <davem@davemloft.net>,
"dsahern@gmail.com" <dsahern@gmail.com>,
"jakub.kicinski@netronome.com" <jakub.kicinski@netronome.com>,
Tariq Toukan <tariqt@mellanox.com>, mlxsw <mlxsw@mellanox.com>
Subject: Re: [patch net-next v2 3/3] net: devlink: move reload fail indication to devlink core and expose to user
Date: Sun, 8 Sep 2019 10:39:32 +0000 [thread overview]
Message-ID: <20190908103928.GA21777@splinter> (raw)
In-Reply-To: <20190907205400.14589-4-jiri@resnulli.us>
On Sat, Sep 07, 2019 at 10:54:00PM +0200, Jiri Pirko wrote:
> diff --git a/include/uapi/linux/devlink.h b/include/uapi/linux/devlink.h
> index 546e75dd74ac..7cb5e8c5ae0d 100644
> --- a/include/uapi/linux/devlink.h
> +++ b/include/uapi/linux/devlink.h
> @@ -410,6 +410,8 @@ enum devlink_attr {
> DEVLINK_ATTR_TRAP_METADATA, /* nested */
> DEVLINK_ATTR_TRAP_GROUP_NAME, /* string */
>
> + DEVLINK_ATTR_RELOAD_FAILED, /* u8 0 or 1 */
> +
> /* add new attributes above here, update the policy in devlink.c */
>
> __DEVLINK_ATTR_MAX,
> diff --git a/net/core/devlink.c b/net/core/devlink.c
> index 1e3a2288b0b2..e00a4a643d17 100644
> --- a/net/core/devlink.c
> +++ b/net/core/devlink.c
> @@ -471,6 +471,8 @@ static int devlink_nl_fill(struct sk_buff *msg, struct devlink *devlink,
>
> if (devlink_nl_put_handle(msg, devlink))
> goto nla_put_failure;
> + if (nla_put_u8(msg, DEVLINK_ATTR_RELOAD_FAILED, devlink->reload_failed))
Why not use NLA_FLAG for this?
> + goto nla_put_failure;
>
> genlmsg_end(msg, hdr);
> return 0;
> @@ -2677,6 +2679,21 @@ static bool devlink_reload_supported(struct devlink *devlink)
> return devlink->ops->reload_down && devlink->ops->reload_up;
> }
next prev parent reply other threads:[~2019-09-08 10:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-07 20:53 [patch net-next v2 0/3] net: devlink: move reload fail indication to devlink core and expose to user Jiri Pirko
2019-09-07 20:53 ` [patch net-next v2 1/3] mlx4: Split restart_one into two functions Jiri Pirko
2019-09-07 20:53 ` [patch net-next v2 2/3] net: devlink: split reload op into two Jiri Pirko
2019-09-07 20:54 ` [patch net-next v2 3/3] net: devlink: move reload fail indication to devlink core and expose to user Jiri Pirko
2019-09-08 10:39 ` Ido Schimmel [this message]
2019-09-11 6:17 ` Jiri Pirko
2019-09-08 11:25 ` Ido Schimmel
2019-09-11 6:17 ` Jiri Pirko
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=20190908103928.GA21777@splinter \
--to=idosch@mellanox.com \
--cc=davem@davemloft.net \
--cc=dsahern@gmail.com \
--cc=jakub.kicinski@netronome.com \
--cc=jiri@resnulli.us \
--cc=mlxsw@mellanox.com \
--cc=netdev@vger.kernel.org \
--cc=tariqt@mellanox.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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.