From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f193.google.com (mail-pf0-f193.google.com [209.85.192.193]) by dpdk.org (Postfix) with ESMTP id 8DA1A1C753 for ; Fri, 11 May 2018 17:24:53 +0200 (CEST) Received: by mail-pf0-f193.google.com with SMTP id x9-v6so2888969pfm.2 for ; Fri, 11 May 2018 08:24:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=TuBo6rjlxlg04+lgDWuO6wPDNA9n+m2mku/1v3IlTo0=; b=NsE6P8IMKCsgR+XAayx9Blz2yDJnYDEQIMCz3dH1BgPV/Q4dSBkKlc6VaGOUw1E7Jj wsqty9olqZTogRHqWsjWEr8v4eWHu2tNDwsEB0tZ713QnQT+4nAA3Dx5NZKgQQdM7zZ1 vGLcCtdNLzjWFFDoKsal1FF+LkPZXgzoK1XMUd38QhISoKmnsRC9FG/hqB2c4VLS/Lm+ 4wIaWgUmz+jJvGl1P/FEfM6u+1FzAPgh9WZ3mgo3rYA2yRy5IfxfAjTaHhHDymBWDwug klhyxJXLZ0huIA2HNsx9n7VyF++uQVgHiRS2MbyUCNIeFjgRCg57SV7E5qz2xWX3kCmZ Ih/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=TuBo6rjlxlg04+lgDWuO6wPDNA9n+m2mku/1v3IlTo0=; b=iXmnkDfpoWqf0zTLWRo8ut+ebMyCDMDcbk6YcYU1KL/JtzBPxKJG5cy1JX5Ea0R+nz xZckV9TXX0kWzHuXxQ1Gollm1K9PoI15FmITPinju22vi4aEK1tHGfntNTcazPSBzLOz /u1uIWWPCBW8yJdBXx2cjTDjD1GIAbmkujv4dHz0ZVvFWGpc6rHhLBTweTguxJ7rhTaM S/WQIB/uRMSWJA3AYLE7FaUkqlUK3ugLlf/6zXUyzWMiTixt8Y8nmHZeoHycQrILGghc hxATaiS1JfyesY5//i1QEMbG7i8lqEC5YBg1Wsv51Qe01OhHLSjkePj2bMzEBDZ640pA DM0Q== X-Gm-Message-State: ALKqPwdGj0tbVZUGzhWkVu1SJ4GOZ6q5gLU32InYNavJ1mYidefEYjcR E5ndm3ixxh30EqXaUwqN3uMi9A== X-Google-Smtp-Source: AB8JxZrwV/MrPYaUtw+ZfaFwxcpPFkeZDN4qMMnYjLtknD26bV0wgJTnZ5tJYYcGj1gCdvMVNWg2sw== X-Received: by 2002:a62:be10:: with SMTP id l16-v6mr5850990pff.180.1526052292751; Fri, 11 May 2018 08:24:52 -0700 (PDT) Received: from xeon-e3 (204-195-35-107.wavecable.com. [204.195.35.107]) by smtp.gmail.com with ESMTPSA id n10-v6sm12495239pfj.68.2018.05.11.08.24.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 11 May 2018 08:24:52 -0700 (PDT) Date: Fri, 11 May 2018 08:24:45 -0700 From: Stephen Hemminger To: Vipin Varghese Cc: ferruh.yigit@intel.com, zhihong.wang@intel.com, dev@dpdk.org Message-ID: <20180511082445.26a38561@xeon-e3> In-Reply-To: <1526028119-142177-1-git-send-email-vipin.varghese@intel.com> References: <1526028119-142177-1-git-send-email-vipin.varghese@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] net/tap: add default name to tun 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: Fri, 11 May 2018 15:24:53 -0000 On Fri, 11 May 2018 14:11:59 +0530 Vipin Varghese wrote: > The change adds default name to reflect TUN PMD instance. if option > name is not passed, the default dtun is taken. > > Signed-off-by: Vipin Varghese > --- > drivers/net/tap/rte_eth_tap.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c > index 172a7ba..fa59a76 100644 > --- a/drivers/net/tap/rte_eth_tap.c > +++ b/drivers/net/tap/rte_eth_tap.c > @@ -1665,6 +1665,9 @@ rte_pmd_tun_probe(struct rte_vdev_device *dev) > params = rte_vdev_device_args(dev); > memset(remote_iface, 0, RTE_ETH_NAME_MAX_LEN); > > + snprintf(tun_name, sizeof(tun_name), "%s%d", > + DEFAULT_TUN_NAME, tun_unit++); Use unsigned to avoid integer wraparound?