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 83258A0546; Fri, 14 Feb 2020 11:25:10 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3D764100C; Fri, 14 Feb 2020 11:25:10 +0100 (CET) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 2C30C3B5 for ; Fri, 14 Feb 2020 11:25:07 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Feb 2020 02:25:07 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,440,1574150400"; d="scan'208";a="267512114" Received: from unknown (HELO dpdk-lijuan.sh.intel.com) ([10.67.119.192]) by fmsmga002.fm.intel.com with ESMTP; 14 Feb 2020 02:25:06 -0800 From: Lijuan Tu To: dts@dpdk.org Cc: Lijuan Tu Date: Sat, 15 Feb 2020 02:33:55 +0800 Message-Id: <1581705235-163463-1-git-send-email-lijuan.tu@intel.com> X-Mailer: git-send-email 1.8.3.1 Subject: [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" snice hex(mac_long) is 0x5212345678, we need "5212345678". Signed-off-by: Lijuan Tu --- framework/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/utils.py b/framework/utils.py index f6594b5..e74e6c5 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 = hex(mac_long)[2:-1].zfill(12) + mac = hex(mac_long)[2:].zfill(12) b = [] [b.append(mac[n:n+2]) for n in range(len(mac)) if n % 2 == 0 ] new_mac = ":".join(b) -- 1.8.3.1