From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 0E4941CB4E for ; Sat, 12 May 2018 08:22:09 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 May 2018 23:22:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,391,1520924400"; d="scan'208";a="48661144" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by FMSMGA003.fm.intel.com with ESMTP; 11 May 2018 23:22:08 -0700 Received: from bgsmsx103.gar.corp.intel.com (10.223.4.130) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 11 May 2018 23:22:07 -0700 Received: from bgsmsx101.gar.corp.intel.com ([169.254.1.242]) by BGSMSX103.gar.corp.intel.com ([169.254.4.161]) with mapi id 14.03.0319.002; Sat, 12 May 2018 11:52:04 +0530 From: "Varghese, Vipin" To: Stephen Hemminger CC: "Yigit, Ferruh" , "Wang, Zhihong" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] net/tap: add default name to tun Thread-Index: AQHT6QPu3/Dscts5ckWGb7W4Vv80bKQqSiaAgAFWx7A= Date: Sat, 12 May 2018 06:22:03 +0000 Message-ID: <4C9E0AB70F954A408CC4ADDBF0F8FA7D4D1EAA04@BGSMSX101.gar.corp.intel.com> References: <1526028119-142177-1-git-send-email-vipin.varghese@intel.com> <20180511082445.26a38561@xeon-e3> In-Reply-To: <20180511082445.26a38561@xeon-e3> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiODhkODQyZmEtZWNiMi00Mjk1LThjYmUtOTg0NzE2YTZjODljIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjIuNS4xOCIsIlRydXN0ZWRMYWJlbEhhc2giOiJod21IeHpFZFkwVk5NUitpeWxLTFE5cFBxQ3BxVkxjMkNZSXMzK0FoK3RsUis4WXo3YlBTTFpHcTB4eFgxZGpLIn0= dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [10.223.10.10] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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: Sat, 12 May 2018 06:22:10 -0000 Thanks Stephen, for pointing this out. I have shared a V2 for the same. > -----Original Message----- > From: Stephen Hemminger [mailto:stephen@networkplumber.org] > Sent: Friday, May 11, 2018 8:55 PM > To: Varghese, Vipin > Cc: Yigit, Ferruh ; Wang, Zhihong > ; dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH] net/tap: add default name to tun >=20 > On Fri, 11 May 2018 14:11:59 +0530 > Vipin Varghese wrote: >=20 > > 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 =3D 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++); >=20 > Use unsigned to avoid integer wraparound?