From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id C8674A054E; Sat, 15 Feb 2020 11:22:20 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id AE48F1BDAE; Sat, 15 Feb 2020 11:22:20 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 579AA3B5 for ; Sat, 15 Feb 2020 11:22:19 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Feb 2020 02:22:18 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,444,1574150400"; d="scan'208";a="282072958" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by FMSMGA003.fm.intel.com with ESMTP; 15 Feb 2020 02:22:18 -0800 Received: from fmsmsx602.amr.corp.intel.com (10.18.126.82) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sat, 15 Feb 2020 02:22:18 -0800 Received: from fmsmsx602.amr.corp.intel.com (10.18.126.82) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Sat, 15 Feb 2020 02:22:18 -0800 Received: from shsmsx106.ccr.corp.intel.com (10.239.4.159) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Sat, 15 Feb 2020 02:22:17 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.222]) by SHSMSX106.ccr.corp.intel.com ([169.254.10.225]) with mapi id 14.03.0439.000; Sat, 15 Feb 2020 18:22:16 +0800 From: "Tu, Lijuan" To: "dts@dpdk.org" Thread-Topic: [dts] [PATCH] framework/utils: fix issue of mac conversion. Thread-Index: AQHV4yENUlFVTYq59EKy6cUWi6dG8agcDU8A Date: Sat, 15 Feb 2020 10:22:15 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BBC8567@SHSMSX101.ccr.corp.intel.com> References: <1581705235-163463-1-git-send-email-lijuan.tu@intel.com> In-Reply-To: <1581705235-163463-1-git-send-email-lijuan.tu@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH] framework/utils: fix issue of mac conversion. X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" Applied, thanks > -----Original Message----- > From: Tu, Lijuan > Sent: Saturday, February 15, 2020 2:34 AM > To: dts@dpdk.org > Cc: Tu, Lijuan > Subject: [dts] [PATCH] framework/utils: fix issue of mac conversion. >=20 > snice hex(mac_long) is 0x5212345678, we need "5212345678". >=20 > Signed-off-by: Lijuan Tu > --- > framework/utils.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/framework/utils.py b/framework/utils.py index f6594b5..e74e6= c5 > 100644 > --- a/framework/utils.py > +++ b/framework/utils.py > @@ -256,7 +256,7 @@ def convert_mac2str(mac_long): > """ > convert the MAC type from the int into the string. > """ > - mac =3D hex(mac_long)[2:-1].zfill(12) > + mac =3D hex(mac_long)[2:].zfill(12) > b =3D [] > [b.append(mac[n:n+2]) for n in range(len(mac)) if n % 2 =3D=3D 0 ] > new_mac =3D ":".join(b) > -- > 1.8.3.1