test suite reviews and discussions
 help / color / 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, back to index

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

test suite reviews and discussions

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/dts/0 dts/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dts dts/ http://inbox.dpdk.org/dts \
		dts@dpdk.org
	public-inbox-index dts


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dts


AGPL code for this site: git clone https://public-inbox.org/ public-inbox