[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <fdd0bb05-b5c1-7805-e8e8-30b6580ca4fd@gmail.com>
Date: Wed, 23 May 2018 14:05:49 -0600
From: David Ahern <dsahern@...il.com>
To: Jiri Pirko <jiri@...nulli.us>, netdev@...r.kernel.org
Cc: idosch@...lanox.com, jakub.kicinski@...ronome.com,
mlxsw@...lanox.com, andrew@...n.ch,
vivien.didelot@...oirfairelinux.com, f.fainelli@...il.com,
michael.chan@...adcom.com, ganeshgr@...lsio.com,
saeedm@...lanox.com, simon.horman@...ronome.com,
pieter.jansenvanvuuren@...ronome.com, john.hurley@...ronome.com,
dirk.vandermerwe@...ronome.com, alexander.h.duyck@...el.com,
ogerlitz@...lanox.com, vijaya.guvva@...ium.com,
satananda.burla@...ium.com, raghu.vatsavayi@...ium.com,
felix.manlunas@...ium.com, gospo@...adcom.com,
sathya.perla@...adcom.com, vasundhara-v.volam@...adcom.com,
tariqt@...lanox.com, eranbe@...lanox.com,
jeffrey.t.kirsher@...el.com, roopa@...ulusnetworks.com
Subject: Re: [patch iproute2/net-next 2/2] devlink: introduce support for
showing port number and split subport number
On 5/20/18 2:15 AM, Jiri Pirko wrote:
> From: Jiri Pirko <jiri@...lanox.com>
>
> Signed-off-by: Jiri Pirko <jiri@...lanox.com>
> ---
> devlink/devlink.c | 6 ++++++
> include/uapi/linux/devlink.h | 2 ++
> 2 files changed, 8 insertions(+)
>
> diff --git a/devlink/devlink.c b/devlink/devlink.c
> index df2c66dac1c7..b0ae17767dab 100644
> --- a/devlink/devlink.c
> +++ b/devlink/devlink.c
> @@ -1737,9 +1737,15 @@ static void pr_out_port(struct dl *dl, struct nlattr **tb)
>
> pr_out_str(dl, "flavour", port_flavour_name(port_flavour));
> }
> + if (tb[DEVLINK_ATTR_PORT_NUMBER])
> + pr_out_uint(dl, "number",
> + mnl_attr_get_u32(tb[DEVLINK_ATTR_PORT_NUMBER]));
"number" is a label means nothing. "port" is more descriptive.
# ./devlink port
pci/0000:03:00.0/1: type eth netdev swp17 flavour physical number 17
pci/0000:03:00.0/3: type eth netdev swp18 flavour physical number 18
pci/0000:03:00.0/5: type eth netdev swp19 flavour physical number 19
pci/0000:03:00.0/7: type eth netdev swp20 flavour physical number 20
pci/0000:03:00.0/9: type eth netdev swp21 flavour physical number 21
...
pci/0000:03:00.0/61: type eth netdev swp1s0 flavour physical number 1
split_group 1 subport 0
pci/0000:03:00.0/62: type eth netdev swp1s1 flavour physical number 1
split_group 1 subport 1
Powered by blists - more mailing lists