From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 306E31BAFB for ; Fri, 11 Jan 2019 20:49:20 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Jan 2019 11:49:19 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,466,1539673200"; d="scan'208";a="309674440" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga006.fm.intel.com with ESMTP; 11 Jan 2019 11:49:19 -0800 Received: from fmsmsx153.amr.corp.intel.com (10.18.125.6) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.408.0; Fri, 11 Jan 2019 11:49:18 -0800 Received: from fmsmsx117.amr.corp.intel.com ([169.254.3.160]) by FMSMSX153.amr.corp.intel.com ([169.254.9.27]) with mapi id 14.03.0415.000; Fri, 11 Jan 2019 11:49:18 -0800 From: "Wiles, Keith" To: Stephen Hemminger CC: "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH 2/6] net/tap: allow full length names Thread-Index: AQHUqdiL+mQsdRsO2Ea2w/ft77IwjqWq+z6AgAAEb4CAAAA4AA== Date: Fri, 11 Jan 2019 19:49:18 +0000 Message-ID: <12FC3ED6-D38B-4362-A368-B90BDCFD37EC@intel.com> References: <20190111180659.5972-1-stephen@networkplumber.org> <20190111180659.5972-3-stephen@networkplumber.org> <4AD48FCF-86CB-4C59-AF54-00850FA476D5@intel.com> <20190111114831.04e12ba4@hermes.lan> In-Reply-To: <20190111114831.04e12ba4@hermes.lan> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.254.35.122] Content-Type: text/plain; charset="us-ascii" Content-ID: <1772FF70D1B27645B2CE933B28CE0A7A@intel.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 2/6] net/tap: allow full length names 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 Jan 2019 19:49:20 -0000 > On Jan 11, 2019, at 1:48 PM, Stephen Hemminger wrote: >=20 > On Fri, 11 Jan 2019 19:32:39 +0000 > "Wiles, Keith" wrote: >=20 >>> On Jan 11, 2019, at 12:06 PM, Stephen Hemminger wrote: >>>=20 >>> The code for set_interface_name was incorrectly assuming that >>> space for null byte was necessary with snprintf/strlcpy. >>>=20 >>> Fixes: 02f96a0a82d1 ("net/tap: add TUN/TAP device PMD") >>> Signed-off-by: Stephen Hemminger >>> --- >>> drivers/net/tap/rte_eth_tap.c | 6 +++--- >>> 1 file changed, 3 insertions(+), 3 deletions(-) >>>=20 >>> diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_ta= p.c >>> index 1c00681ba0eb..d7f77d664502 100644 >>> --- a/drivers/net/tap/rte_eth_tap.c >>> +++ b/drivers/net/tap/rte_eth_tap.c >>> @@ -1892,10 +1892,10 @@ set_interface_name(const char *key __rte_unused= , >>> char *name =3D (char *)extra_args; >>>=20 >>> if (value) >>> - strlcpy(name, value, RTE_ETH_NAME_MAX_LEN - 1); >>> + strlcpy(name, value, RTE_ETH_NAME_MAX_LEN); >>> else >>> - snprintf(name, RTE_ETH_NAME_MAX_LEN - 1, "%s%d", >>> - DEFAULT_TAP_NAME, (tap_unit - 1)); >>> + snprintf(name, RTE_ETH_NAME_MAX_LEN, "%s%d", >>> + DEFAULT_TAP_NAME, tun_unit - 1); =20 >>=20 >> Was this meant to change from tap_unit to tun_unit here, if so why? >=20 > Accident. tun_unit disappears in later patch. OK, great Regards, Keith