netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Parav Pandit <parav@mellanox.com>
Cc: dsahern@gmail.com, netdev@vger.kernel.org, jiri@mellanox.com
Subject: Re: [PATCH iproute2-next] devlink: Increase bus,device buffer size to 64 bytes
Date: Thu, 6 Jun 2019 08:18:59 -0700	[thread overview]
Message-ID: <20190606081859.1098a856@hermes.lan> (raw)
In-Reply-To: <20190606114919.27811-1-parav@mellanox.com>

On Thu,  6 Jun 2019 06:49:19 -0500
Parav Pandit <parav@mellanox.com> wrote:

> Device name on mdev bus is 36 characters long which follow standard uuid
> RFC 4122.
> This is probably the longest name that a kernel will return for a
> device.
> 
> Hence increase the buffer size to 64 bytes.
> 
> Acked-by: Jiri Pirko <jiri@mellanox.com>
> Signed-off-by: Parav Pandit <parav@mellanox.com>
> 
> ---
>  devlink/devlink.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/devlink/devlink.c b/devlink/devlink.c
> index 436935f8..559f624e 100644
> --- a/devlink/devlink.c
> +++ b/devlink/devlink.c
> @@ -1523,7 +1523,7 @@ static void __pr_out_handle_start(struct dl *dl, struct nlattr **tb,
>  {
>  	const char *bus_name = mnl_attr_get_str(tb[DEVLINK_ATTR_BUS_NAME]);
>  	const char *dev_name = mnl_attr_get_str(tb[DEVLINK_ATTR_DEV_NAME]);
> -	char buf[32];
> +	char buf[64];
>  
>  	sprintf(buf, "%s/%s", bus_name, dev_name);
>  
> @@ -1616,7 +1616,7 @@ static void __pr_out_port_handle_start(struct dl *dl, const char *bus_name,
>  				       uint32_t port_index, bool try_nice,
>  				       bool array)
>  {
> -	static char buf[32];
> +	static char buf[64];
>  	char *ifname = NULL;
>  
>  	if (dl->no_nice_names || !try_nice ||

I will take this now no need to wait for next

  reply	other threads:[~2019-06-06 15:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-06 11:49 [PATCH iproute2-next] devlink: Increase bus,device buffer size to 64 bytes Parav Pandit
2019-06-06 15:18 ` Stephen Hemminger [this message]
2019-06-07  3:24   ` Parav Pandit

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=20190606081859.1098a856@hermes.lan \
    --to=stephen@networkplumber.org \
    --cc=dsahern@gmail.com \
    --cc=jiri@mellanox.com \
    --cc=netdev@vger.kernel.org \
    --cc=parav@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).