Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Device/Centec]Fix the bug that it gets error system-mac of centec platform #12721

Conversation

AlanYoush
Copy link
Contributor

@AlanYoush AlanYoush commented Nov 16, 2022

Why I did it

When getting system mac of centec platform, it would increase by 1 the last byte of mac, but it could not consider the case of carry.

How I did it

Firstly, I would replace the ":" with "" of mac to a string.
And then, I would convert the mac from string to int and increase by 1, at last convert it to string with inserting ":".

How to verify it

Build centec amd64 and arm64 sonic image

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211

Description for the changelog

Ensure to add label/tag for the feature raised. example - PR#2174 under sonic-utilities repo. where, Generic Config and Update feature has been labelled as GCU.

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

@AlanYoush
Copy link
Contributor Author

@qiluo-msft

@AlanYoush AlanYoush changed the title Fix the bug that it gets error system-mac of centec platform [Device/Centec]Fix the bug that it gets error system-mac of centec platform Nov 18, 2022
@AlanYoush
Copy link
Contributor Author

@qiluo-msft Please help to merge this PR, it solves the problem that it gets error system-mac for centec asic.

@AlanYoush
Copy link
Contributor Author

@xumia

@AlanYoush
Copy link
Contributor Author

@xumia Please help to merge this PR, it solves the problem that it gets error system-mac for centec asic.

@AlanYoush
Copy link
Contributor Author

@LuiSzee @lguohan Please help to review and merge this PR for centec platform. Thanks.

@lguohan lguohan merged commit 63f2ab2 into sonic-net:master Jan 18, 2023
mssonicbld pushed a commit to mssonicbld/sonic-buildimage that referenced this pull request Jan 19, 2023
…sonic-net#12721)

Why I did it
When getting system mac of centec platform, it would increase by 1 the last byte of mac, but it could not consider the case of carry.

How I did it
Firstly, I would replace the ":" with "" of mac to a string.
And then, I would convert the mac from string to int and increase by 1, at last convert it to string with inserting ":".
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202205: #13436

mssonicbld pushed a commit that referenced this pull request Jan 19, 2023
…#12721)

Why I did it
When getting system mac of centec platform, it would increase by 1 the last byte of mac, but it could not consider the case of carry.

How I did it
Firstly, I would replace the ":" with "" of mac to a string.
And then, I would convert the mac from string to int and increase by 1, at last convert it to string with inserting ":".
qiluo-msft pushed a commit that referenced this pull request Feb 2, 2023
…#12721)

Why I did it
When getting system mac of centec platform, it would increase by 1 the last byte of mac, but it could not consider the case of carry.

How I did it
Firstly, I would replace the ":" with "" of mac to a string.
And then, I would convert the mac from string to int and increase by 1, at last convert it to string with inserting ":".
mssonicbld pushed a commit to mssonicbld/sonic-buildimage that referenced this pull request Feb 3, 2023
…sonic-net#12721)

Why I did it
When getting system mac of centec platform, it would increase by 1 the last byte of mac, but it could not consider the case of carry.

How I did it
Firstly, I would replace the ":" with "" of mac to a string.
And then, I would convert the mac from string to int and increase by 1, at last convert it to string with inserting ":".
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202211: #13625

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants