Re: [PATCH iproute-next v2] devlink: add support for port params get/set

From: David Ahern
Date: Fri Jan 29 2021 - 11:32:09 EST


On 1/25/21 6:48 AM, Oleksandr Mazur wrote:
> Add implementation for the port parameters getting/setting.
> Add bash completion for port param.
> Add man description for port param.
>

Add example commands here - both set and show. Include a json version of
the show.

> Signed-off-by: Oleksandr Mazur <oleksandr.mazur@xxxxxxxxxxx>
> ---
> V2:
> 1) Add bash completion for port param;
> 2) Add man decsription / examples for port param;
>
> bash-completion/devlink | 55 ++++++++
> devlink/devlink.c | 275 +++++++++++++++++++++++++++++++++++++++-
> man/man8/devlink-port.8 | 65 ++++++++++
> 3 files changed, 389 insertions(+), 6 deletions(-)
>

> diff --git a/devlink/devlink.c b/devlink/devlink.c
> index a2e06644..0fc1d4f0 100644
> --- a/devlink/devlink.c
> +++ b/devlink/devlink.c
> @@ -2706,7 +2706,8 @@ static void pr_out_param_value(struct dl *dl, const char *nla_name,
> }
> }
>
> -static void pr_out_param(struct dl *dl, struct nlattr **tb, bool array)
> +static void pr_out_param(struct dl *dl, struct nlattr **tb, bool array,
> + bool is_port_param)
> {
> struct nlattr *nla_param[DEVLINK_ATTR_MAX + 1] = {};
> struct nlattr *param_value_attr;
> @@ -2714,6 +2715,7 @@ static void pr_out_param(struct dl *dl, struct nlattr **tb, bool array)
> int nla_type;
> int err;
>
> +

stray newline here