From: Matan Azrad <matan@mellanox.com>
To: Ophir Munk <ophirmu@mellanox.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: Thomas Monjalon <thomas@monjalon.net>,
Olga Shern <olgas@mellanox.com>,
"stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v1] net/vdev_netvsc: fix creating short name devices
Date: Tue, 10 Apr 2018 15:39:50 +0000 [thread overview]
Message-ID: <AM4PR0501MB2657F90C79687E4B66B337D7D2BE0@AM4PR0501MB2657.eurprd05.prod.outlook.com> (raw)
In-Reply-To: <HE1PR0501MB231433B72EDF3F28D44628ECD1BE0@HE1PR0501MB2314.eurprd05.prod.outlook.com>
It is OK for me.
Thanks.
From: Ophir Munk, Tuesday, April 10, 2018 6:36 PM
> Hi.
> Discussed with Thomas.
> Please consider the following commit message:
>
> net/vdev_netvsc: shorten devices names
>
> Prior to this commit the vdev_netvsc PMD was creating tap and failsafe
> devices with long names, such as "net_tap_net_vdev_netvsc0" or
> "net_failsafe_net_vdev_netvsc0".
> This commits creates tap and failsafe devices with short names such as
> "net_tap_netvsc0" or "net_failsafe_netvsc0".
>
> > -----Original Message-----
> > From: Matan Azrad
> > Sent: Tuesday, April 10, 2018 11:04 AM
> > To: Ophir Munk <ophirmu@mellanox.com>; dev@dpdk.org
> > Cc: Thomas Monjalon <thomas@monjalon.net>; Olga Shern
> > <olgas@mellanox.com>; stable@dpdk.org
> > Subject: RE: [PATCH v1] net/vdev_netvsc: fix creating short name
> > devices
> >
> > Hi Ophir
> >
> > From: Ophir Munk, Tuesday, April 10, 2018 10:20 AM
> > > Prior to this commit the vdev_netvsc PMD was creating tap and
> > > failsafe devices with long names, such as "net_tap_net_vdev_netvsc0"
> > > or "net_failsafe_net_vdev_netvsc0".
> > > Long names containing more than 32 characters may be rejected by
> > > some APIs (e.g. membuf pool creation).
> >
> > Since EAL allows to use long names, I don't think it is a problem of
> > the netvsc device.
> > If a DPDK entity wants to use this name for some reason it needs to
> > adjust it to the usage.
> >
> > I agree that short names are better and may help for such like cases.
> >
> > I suggest the next title:
> > net/vdev_netvsc: use short device names
> >
> > > This commits fixes this issue by creating tap and failsafe devices
> > > with short names such as "tap_net_vsc0" or "net_failsafe_vsc0".
> > >
> > > Fixes: e7dc5d7becc5 ("net/vdev_netvsc: implement core
> > > functionality")
> > > Cc: stable@dpdk.org
> > >
> > > Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
> > > ---
> > > drivers/net/vdev_netvsc/vdev_netvsc.c | 8 ++++----
> > > 1 file changed, 4 insertions(+), 4 deletions(-)
> > >
> > > diff --git a/drivers/net/vdev_netvsc/vdev_netvsc.c
> > > b/drivers/net/vdev_netvsc/vdev_netvsc.c
> > > index db0080a..bb2f78d 100644
> > > --- a/drivers/net/vdev_netvsc/vdev_netvsc.c
> > > +++ b/drivers/net/vdev_netvsc/vdev_netvsc.c
> > > @@ -614,13 +614,13 @@ vdev_netvsc_netvsc_probe(const struct
> > > if_nameindex *iface,
> > > name, ctx->id);
> > > if (ret == -1 || (size_t)ret >= sizeof(ctx->name))
> > > ++i;
> > > - ret = snprintf(ctx->devname, sizeof(ctx->devname),
> > > "net_failsafe_%s",
> > > - ctx->name);
> > > + ret = snprintf(ctx->devname, sizeof(ctx->devname),
> > > "net_failsafe_vsc%u",
> > > + ctx->id);
> > > if (ret == -1 || (size_t)ret >= sizeof(ctx->devname))
> > > ++i;
> > > ret = snprintf(ctx->devargs, sizeof(ctx->devargs),
> > > - "fd(%d),dev(net_tap_%s,remote=%s)",
> > > - ctx->pipe[0], ctx->name, ctx->if_name);
> > > + "fd(%d),dev(net_tap_vsc%u,remote=%s)",
> > > + ctx->pipe[0], ctx->id, ctx->if_name);
> > > if (ret == -1 || (size_t)ret >= sizeof(ctx->devargs))
> > > ++i;
> > > if (i) {
> > > --
> > > 2.7.4
next prev parent reply other threads:[~2018-04-10 15:39 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-10 7:20 Ophir Munk
2018-04-10 8:04 ` Matan Azrad
2018-04-10 15:35 ` Ophir Munk
2018-04-10 15:39 ` Matan Azrad [this message]
2018-04-24 14:19 ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
2018-04-25 10:25 ` Matan Azrad
2018-04-25 10:29 ` Ferruh Yigit
2018-04-25 10:33 ` Matan Azrad
2018-04-25 10:49 ` Ferruh Yigit
2018-04-24 12:56 ` [dpdk-dev] " Ferruh Yigit
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=AM4PR0501MB2657F90C79687E4B66B337D7D2BE0@AM4PR0501MB2657.eurprd05.prod.outlook.com \
--to=matan@mellanox.com \
--cc=dev@dpdk.org \
--cc=olgas@mellanox.com \
--cc=ophirmu@mellanox.com \
--cc=stable@dpdk.org \
--cc=thomas@monjalon.net \
/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).