public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
To: David Ahern <dsahern@gmail.com>
Cc: netdev@vger.kernel.org, idosch@mellanox.com,
	jakub.kicinski@netronome.com, mlxsw@mellanox.com, andrew@lunn.ch,
	vivien.didelot@savoirfairelinux.com, f.fainelli@gmail.com,
	michael.chan@broadcom.com, ganeshgr@chelsio.com,
	saeedm@mellanox.com, simon.horman@netronome.com,
	pieter.jansenvanvuuren@netronome.com, john.hurley@netronome.com,
	dirk.vandermerwe@netronome.com, alexander.h.duyck@intel.com,
	ogerlitz@mellanox.com, vijaya.guvva@cavium.com,
	satananda.burla@cavium.com, raghu.vatsavayi@cavium.com,
	felix.manlunas@cavium.com, gospo@broadcom.com,
	sathya.perla@broadcom.com, vasundhara-v.volam@broadcom.com,
	tariqt@mellanox.com, eranbe@mellanox.com,
	jeffrey.t.kirsher@intel.com, roopa@cumulusnetworks.com
Subject: Re: [patch iproute2/net-next 2/2] devlink: introduce support for showing port number and split subport number
Date: Thu, 24 May 2018 08:39:52 +0200	[thread overview]
Message-ID: <20180524063952.GC2295@nanopsycho> (raw)
In-Reply-To: <fdd0bb05-b5c1-7805-e8e8-30b6580ca4fd@gmail.com>

Wed, May 23, 2018 at 10:05:49PM CEST, dsahern@gmail.com wrote:
>On 5/20/18 2:15 AM, Jiri Pirko wrote:
>> From: Jiri Pirko <jiri@mellanox.com>
>> 
>> Signed-off-by: Jiri Pirko <jiri@mellanox.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.

That attribute name is "port_number". As the other attributes are
named "port_something", and the "something" is printed out here, the
"number" is consistent with it. Each line represents a port with a list
of attributes.

>
># ./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
>

  reply	other threads:[~2018-05-24  6:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-20  8:15 [patch iproute2/net-next 0/2] devlink: add port flavours/number/split_subport Jiri Pirko
2018-05-20  8:15 ` [patch iproute2/net-next 1/2] devlink: introduce support for showing port flavours Jiri Pirko
2018-05-23 20:03   ` David Ahern
2018-05-20  8:15 ` [patch iproute2/net-next 2/2] devlink: introduce support for showing port number and split subport number Jiri Pirko
2018-05-23 20:05   ` David Ahern
2018-05-24  6:39     ` Jiri Pirko [this message]
2018-05-25 14:19       ` David Ahern

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=20180524063952.GC2295@nanopsycho \
    --to=jiri@resnulli.us \
    --cc=alexander.h.duyck@intel.com \
    --cc=andrew@lunn.ch \
    --cc=dirk.vandermerwe@netronome.com \
    --cc=dsahern@gmail.com \
    --cc=eranbe@mellanox.com \
    --cc=f.fainelli@gmail.com \
    --cc=felix.manlunas@cavium.com \
    --cc=ganeshgr@chelsio.com \
    --cc=gospo@broadcom.com \
    --cc=idosch@mellanox.com \
    --cc=jakub.kicinski@netronome.com \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=john.hurley@netronome.com \
    --cc=michael.chan@broadcom.com \
    --cc=mlxsw@mellanox.com \
    --cc=netdev@vger.kernel.org \
    --cc=ogerlitz@mellanox.com \
    --cc=pieter.jansenvanvuuren@netronome.com \
    --cc=raghu.vatsavayi@cavium.com \
    --cc=roopa@cumulusnetworks.com \
    --cc=saeedm@mellanox.com \
    --cc=satananda.burla@cavium.com \
    --cc=sathya.perla@broadcom.com \
    --cc=simon.horman@netronome.com \
    --cc=tariqt@mellanox.com \
    --cc=vasundhara-v.volam@broadcom.com \
    --cc=vijaya.guvva@cavium.com \
    --cc=vivien.didelot@savoirfairelinux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox