* [PATCH iproute2-next] devlink: Increase bus,device buffer size to 64 bytes
@ 2019-06-06 11:49 Parav Pandit
2019-06-06 15:18 ` Stephen Hemminger
0 siblings, 1 reply; 3+ messages in thread
From: Parav Pandit @ 2019-06-06 11:49 UTC (permalink / raw)
To: dsahern; +Cc: netdev, stephen, jiri, Parav Pandit
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 ||
--
2.19.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH iproute2-next] devlink: Increase bus,device buffer size to 64 bytes
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
2019-06-07 3:24 ` Parav Pandit
0 siblings, 1 reply; 3+ messages in thread
From: Stephen Hemminger @ 2019-06-06 15:18 UTC (permalink / raw)
To: Parav Pandit; +Cc: dsahern, netdev, jiri
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH iproute2-next] devlink: Increase bus,device buffer size to 64 bytes
2019-06-06 15:18 ` Stephen Hemminger
@ 2019-06-07 3:24 ` Parav Pandit
0 siblings, 0 replies; 3+ messages in thread
From: Parav Pandit @ 2019-06-07 3:24 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: dsahern@gmail.com, netdev@vger.kernel.org, Jiri Pirko
> -----Original Message-----
> From: Stephen Hemminger <stephen@networkplumber.org>
> Sent: Thursday, June 6, 2019 8:49 PM
> To: Parav Pandit <parav@mellanox.com>
> Cc: dsahern@gmail.com; netdev@vger.kernel.org; Jiri Pirko
> <jiri@mellanox.com>
> Subject: Re: [PATCH iproute2-next] devlink: Increase bus,device buffer size to
> 64 bytes
>
> 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
Ok. thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-06-07 3:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2019-06-07 3:24 ` Parav Pandit
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).