From: Ophir Munk Date: Tue, 10 Apr 2018 07:20:21 +0000 (+0000) Subject: net/vdev_netvsc: shorten devices names X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=519fb2858ed5da31693a4863ca86775e99a33e20;p=dpdk.git 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". Signed-off-by: Ophir Munk Acked-by: Matan Azrad --- diff --git a/drivers/net/vdev_netvsc/vdev_netvsc.c b/drivers/net/vdev_netvsc/vdev_netvsc.c index f902dbe27a..f83aab4feb 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) {