[dts] [PATCH] framework/utils: fix issue of mac conversion.
Tu, Lijuan
lijuan.tu at intel.com
Sat Feb 15 11:22:15 CET 2020
Applied, thanks
> -----Original Message-----
> From: Tu, Lijuan
> Sent: Saturday, February 15, 2020 2:34 AM
> To: dts at dpdk.org
> Cc: Tu, Lijuan <lijuan.tu at 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 at 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
More information about the dts
mailing list