From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0051.outbound.protection.outlook.com [104.47.1.51]) by dpdk.org (Postfix) with ESMTP id CC11E1B98F; Tue, 10 Apr 2018 17:36:01 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=EfA9T6N6Ul9ABx1vtasNfW/bl5viCJp2OceS3uDhxMk=; b=IX21WnHvI2IfmteFNHJ03MntKGDTVTAgbxJjXDhto8h2WdMKfkjP6V4x0y/pgK6D+6upTPbm3GgnVhREEoybghrJOewUE4bPAhf5IpH7VK2iJOt8Q9EFInA9zkGJG6stV0aWo5lmVkaa7jvPa7XYQ1FRo7lbPvCPACL7nH41r1M= Received: from HE1PR0501MB2314.eurprd05.prod.outlook.com (10.168.34.19) by HE1PR0501MB2073.eurprd05.prod.outlook.com (10.167.245.155) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.653.12; Tue, 10 Apr 2018 15:36:00 +0000 Received: from HE1PR0501MB2314.eurprd05.prod.outlook.com ([fe80::d405:aec8:cd2f:85cc]) by HE1PR0501MB2314.eurprd05.prod.outlook.com ([fe80::d405:aec8:cd2f:85cc%18]) with mapi id 15.20.0653.015; Tue, 10 Apr 2018 15:36:00 +0000 From: Ophir Munk To: Matan Azrad , "dev@dpdk.org" CC: Thomas Monjalon , Olga Shern , "stable@dpdk.org" Thread-Topic: [PATCH v1] net/vdev_netvsc: fix creating short name devices Thread-Index: AQHT0JxrOoeqxmdUUkuFgwR9GGGLeqP5o8wAgAB985A= Date: Tue, 10 Apr 2018 15:35:59 +0000 Message-ID: References: <1523344821-8890-1-git-send-email-ophirmu@mellanox.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=ophirmu@mellanox.com; x-originating-ip: [193.47.165.251] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; HE1PR0501MB2073; 7:hlCD4He2K5xbb1dIH8aaWf2KaaGwmKeX++86d5+aMJXHdPsMD18iGsriL/lywAZGXWcB6YIVSS4cHlVW1OnqaYPCteCLzt12MxkjqAK+spDPVjdALrOw+vgtyml7qfbbrvsSH5ddK2SZ8m9zzQgPmL1aYa2fDHWm7Ke0se0r9rb0aj1VXeeCs3pc6ar3NzIjXvYHRO3wVoCi+jYu5D24A0vViZwvLdlpCly1VnOaM5414BYYGVSfYmDgKgztLRvC x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(3008032)(48565401081)(2017052603328)(7153060)(7193020); SRVR:HE1PR0501MB2073; x-ms-traffictypediagnostic: HE1PR0501MB2073: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231221)(944501327)(52105095)(93006095)(93001095)(10201501046)(3002001)(6055026)(6041310)(20161123562045)(20161123560045)(20161123558120)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:HE1PR0501MB2073; BCL:0; PCL:0; RULEID:; SRVR:HE1PR0501MB2073; x-forefront-prvs: 0638FD5066 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39380400002)(366004)(346002)(376002)(396003)(39860400002)(199004)(189003)(13464003)(74316002)(55016002)(446003)(102836004)(5250100002)(7736002)(99286004)(476003)(305945005)(486006)(14454004)(2501003)(6116002)(86362001)(106356001)(478600001)(8676002)(68736007)(6246003)(81166006)(3846002)(6436002)(3280700002)(33656002)(2900100001)(9686003)(97736004)(66066001)(2906002)(53546011)(25786009)(6506007)(53936002)(76176011)(81156014)(110136005)(54906003)(5660300001)(8936002)(26005)(11346002)(229853002)(3660700001)(316002)(7696005)(105586002)(4326008); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR0501MB2073; H:HE1PR0501MB2314.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: iglL/pf2HMAGIYgLGbXEWtXdFW6/zrgbwux68PXtONOjTllGygof/5wVO5hMpTqbizYY0IwS0Bd/XtHh4x91bk8qiLxq82TBtcPrXZYxDa6yEFNvjLoxacvYW7m/gxtKm+MPMJZlRWZ3ciJ3yUiS2yvGtjrBaZ1t2+9K3L1OuAm4UOPkK7KsaPe7xgkSbdXeOt7Ulg+cpBka11j0Nu19/qjmd+enNFcLOYzhREA/9j05+FrF3mmh8UiF7AZidVHyu98o2v09qkTaOagKxDnrRcSdw92ncsa+78sIRZ0hMkYgUylK+iAOVfZ6KLSpwjK/b84yLEnzGJ//H5eKKYfWPqiy1HuDdj0Ed5A2vfP0u9PaJSnpEhsO7Xs0A6ARw1Y8OdbTltpkAHUvaakkNOF7Yx3SolsU0tTNnHYee/Fi+mI= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 909ca3e4-3860-4670-e680-08d59ef8c2e7 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 909ca3e4-3860-4670-e680-08d59ef8c2e7 X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Apr 2018 15:36:00.0598 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0501MB2073 Subject: Re: [dpdk-dev] [PATCH v1] net/vdev_netvsc: fix creating short name devices X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Apr 2018 15:36:02 -0000 Hi.=20 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 ; dev@dpdk.org > Cc: Thomas Monjalon ; Olga Shern > ; stable@dpdk.org > Subject: RE: [PATCH v1] net/vdev_netvsc: fix creating short name devices >=20 > Hi Ophir >=20 > 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). >=20 > 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 adjus= t it > to the usage. >=20 > I agree that short names are better and may help for such like cases. >=20 > I suggest the next title: > net/vdev_netvsc: use short device names >=20 > > 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