From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matan Azrad Subject: Re: [PATCH v1] net/vdev_netvsc: fix creating short name devices Date: Tue, 10 Apr 2018 15:39:50 +0000 Message-ID: References: <1523344821-8890-1-git-send-email-ophirmu@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Cc: Thomas Monjalon , Olga Shern , "stable@dpdk.org" To: Ophir Munk , "dev@dpdk.org" Return-path: In-Reply-To: Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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: >=20 > net/vdev_netvsc: shorten devices names >=20 > 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". >=20 > > -----Original Message----- > > From: Matan Azrad > > Sent: Tuesday, April 10, 2018 11:04 AM > > To: Ophir Munk ; dev@dpdk.org > > Cc: Thomas Monjalon ; Olga Shern > > ; 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 > > > --- > > > 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 =3D=3D -1 || (size_t)ret >=3D sizeof(ctx->name)) > > > ++i; > > > - ret =3D snprintf(ctx->devname, sizeof(ctx->devname), > > > "net_failsafe_%s", > > > - ctx->name); > > > + ret =3D snprintf(ctx->devname, sizeof(ctx->devname), > > > "net_failsafe_vsc%u", > > > + ctx->id); > > > if (ret =3D=3D -1 || (size_t)ret >=3D sizeof(ctx->devname)) > > > ++i; > > > ret =3D snprintf(ctx->devargs, sizeof(ctx->devargs), > > > - "fd(%d),dev(net_tap_%s,remote=3D%s)", > > > - ctx->pipe[0], ctx->name, ctx->if_name); > > > + "fd(%d),dev(net_tap_vsc%u,remote=3D%s)", > > > + ctx->pipe[0], ctx->id, ctx->if_name); > > > if (ret =3D=3D -1 || (size_t)ret >=3D sizeof(ctx->devargs)) > > > ++i; > > > if (i) { > > > -- > > > 2.7.4