test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts]  [PATCH] framework/utils: fix issue of mac conversion.
@ 2020-02-14 18:33 Lijuan Tu
  2020-02-15 10:22 ` Tu, Lijuan
  0 siblings, 1 reply; 2+ messages in thread
From: Lijuan Tu @ 2020-02-14 18:33 UTC (permalink / raw)
  To: dts; +Cc: Lijuan Tu

snice hex(mac_long) is 0x5212345678, we need "5212345678".

Signed-off-by: Lijuan Tu <lijuan.tu@intel.com>
---
 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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dts] [PATCH] framework/utils: fix issue of mac conversion.
  2020-02-14 18:33 [dts] [PATCH] framework/utils: fix issue of mac conversion Lijuan Tu
@ 2020-02-15 10:22 ` Tu, Lijuan
  0 siblings, 0 replies; 2+ messages in thread
From: Tu, Lijuan @ 2020-02-15 10:22 UTC (permalink / raw)
  To: dts

Applied, thanks

> -----Original Message-----
> From: Tu, Lijuan
> Sent: Saturday, February 15, 2020 2:34 AM
> To: dts@dpdk.org
> Cc: Tu, Lijuan <lijuan.tu@intel.com>
> Subject: [dts] [PATCH] framework/utils: fix issue of mac conversion.
> 
> snice hex(mac_long) is 0x5212345678, we need "5212345678".
> 
> Signed-off-by: Lijuan Tu <lijuan.tu@intel.com>
> ---
>  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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-02-15 10:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-14 18:33 [dts] [PATCH] framework/utils: fix issue of mac conversion Lijuan Tu
2020-02-15 10:22 ` Tu, Lijuan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).