Netdev List
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: Parav Pandit <parav@mellanox.com>, netdev@vger.kernel.org
Cc: stephen@networkplumber.org, jiri@mellanox.com, dsahern@kernel.org
Subject: Re: [PATCH net-next iproute2] devlink: Show devlink port number
Date: Tue, 9 Jul 2019 11:11:24 -0600	[thread overview]
Message-ID: <cb5ec628-9274-5c09-1412-2c80b12890e2@gmail.com> (raw)
In-Reply-To: <20190709163352.20371-1-parav@mellanox.com>

On 7/9/19 10:33 AM, Parav Pandit wrote:
> @@ -2806,6 +2806,11 @@ 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]) {
> +		uint32_t port_number =
> +			mnl_attr_get_u32(tb[DEVLINK_ATTR_PORT_NUMBER]);

declare and assign separately; nothing is gained when it is split across
lines like that.

> +		pr_out_uint(dl, "port", port_number);
> +	}
>  	if (tb[DEVLINK_ATTR_PORT_SPLIT_GROUP])
>  		pr_out_uint(dl, "split_group",
>  			    mnl_attr_get_u32(tb[DEVLINK_ATTR_PORT_SPLIT_GROUP]));


  reply	other threads:[~2019-07-09 17:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-09 16:33 [PATCH net-next iproute2] devlink: Show devlink port number Parav Pandit
2019-07-09 17:11 ` David Ahern [this message]
2019-07-09 17:21   ` Parav Pandit
2019-07-09 17:26 ` [PATCH net-next iproute2 v1] " Parav Pandit
2019-07-09 22:33   ` 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=cb5ec628-9274-5c09-1412-2c80b12890e2@gmail.com \
    --to=dsahern@gmail.com \
    --cc=dsahern@kernel.org \
    --cc=jiri@mellanox.com \
    --cc=netdev@vger.kernel.org \
    --cc=parav@mellanox.com \
    --cc=stephen@networkplumber.org \
    /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