Use MAC from EEPROM for PortChannels#1786
Closed
andriymoroz-mlnx wants to merge 1 commit intosonic-net:201803from
Closed
Use MAC from EEPROM for PortChannels#1786andriymoroz-mlnx wants to merge 1 commit intosonic-net:201803from
andriymoroz-mlnx wants to merge 1 commit intosonic-net:201803from
Conversation
Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>
qiluo-msft
reviewed
Jun 12, 2018
| MAC_ADDRESS=$(ip link show eth0 | grep ether | awk '{print $2}') | ||
|
|
||
| if [ "$SONIC_ASIC_TYPE" == "mellanox" ]; then | ||
| MAC_ADDRESS=$(od -vt x1 -An /sys/bus/i2c/devices/8-0051/eeprom | xargs printf "0x%s " | xargs printf "%02x:" | awk 'BEGIN { FS=":"; i=8+1+2+1} {while(i<NF) {type=$i; len=("0x"$(i+1));if(type!="24") {i=i+2+len} else {print substr($0, (i+1)*3+1, len*3-1); break}}}') |
Collaborator
There was a problem hiding this comment.
Consider to use python -c to simplify the manipulation.
Collaborator
Author
There was a problem hiding this comment.
yes, but it was 2 stages shorter before I noticed we do not have hexdump in the containers...
qiluo-msft
approved these changes
Jun 12, 2018
Collaborator
qiluo-msft
left a comment
There was a problem hiding this comment.
I would approve consider the critical requirement time. However, code improvement is highly suggested.
Collaborator
|
I think the PR is incomplete. what about router interface mac address? I do not think it is correct to have same mac for peering router interface. |
lguohan
requested changes
Jun 13, 2018
Collaborator
lguohan
left a comment
There was a problem hiding this comment.
does not seem to be complete.
Collaborator
Author
|
Recreated against master branch |
stephenxs
added a commit
to stephenxs/sonic-buildimage
that referenced
this pull request
Jun 29, 2021
3226163 [BufferOrch] Don't call SAI API for BUFFER_POOL/PROFILE handling in case the op is DEL and the SAI OID is NULL (sonic-net#1786) 6c88e47 [Dynamic Buffer Calc][Mellanox] Bug fixes and enhancements for the lua plugins for buffer pool calculation and headroom checking (sonic-net#1781) e86b900 [MPLS] sonic-swss changes for MPLS (sonic-net#1686) 4c8e2b5 [Dynamic Buffer Calc] Avoid creating lossy PG for admin down ports during initialization (sonic-net#1776) 3602124 [VS test stability] Skip flaky test for DPB (sonic-net#1807) c37cc1c Support for in-band-mgmt via management VRF (sonic-net#1726) 1e3a532 Fix config prompt question issue (sonic-net#1799) Signed-off-by: Stephen Sun <stephens@nvidia.com>
5 tasks
qiluo-msft
pushed a commit
that referenced
this pull request
Aug 31, 2021
) 7041400 [config reload] Call systemctl reset-failed for snmp,telemetry,mgmt-framework services (#1773) (#1786) 399d370 Fix logic in RIF counters print (#1732) 8329544 [vnet_route_check] don't hardcode prefix length of /24 (#1756) 193b028 [neighbor-advertiser] delete the tunnel maps appropriately (#1663) 2c82bcf [neighbor_advertiser] Use existing tunnel if present for creating tunnel mappings (#1589) 8e22960 [202012][Config] Update config command of Kdump. (#1778) be3e5c6 [show][config] cli refactor for muxcable with abstract class implementation from vendors (#1722) (#1782)
theasianpianist
pushed a commit
to theasianpianist/sonic-buildimage
that referenced
this pull request
Feb 5, 2022
…ase the op is DEL and the SAI OID is NULL (sonic-net#1786) - What I did Don't call SAI API for BUFFER_POOL/PROFILE handling in case the op is DEL and the SAI OID is NULL in order to avoid orchagent from exiting. We need it only in 202106 or above. In 202012 the orchagent won't exit in such case. - Why I did it Handle rare cases which cause SAI error eventually makes orchagent to exit. - How I verified it Manually test. Signed-off-by: Stephen Sun <stephens@nvidia.com>
noaOrMlnx
pushed a commit
to noaOrMlnx/sonic-buildimage
that referenced
this pull request
Nov 24, 2025
…AD automatically (sonic-net#1786) #### Why I did it src/sonic-utilities ``` * 5a188737 - (HEAD -> 202412, origin/202412) Add `show srv6 static-sids` and `show srv6 locators` (sonic-net#253) (11 hours ago) [mssonicbld] ``` #### How I did it #### How to verify it #### Description for the changelog
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Andriy Moroz c_andriym@mellanox.com
- What I did
Updated teams start script to pass MAC from EEPROM to the portchannels config template for Mellanox platforms
- How I did it
updated start.sh which runs on container
- How to verify it
Start SONiC and make sure MACs on PortChannel (and members) are similar to one returned by command
od -vt x1 -An /sys/bus/i2c/devices/8-0051/eeprom | xargs printf "0x%s " | xargs printf "%02x:" | awk 'BEGIN { FS=":"; i=8+1+2+1} {while(i<NF) {type=$i; len=("0x"$(i+1));if(type!="24") {i=i+2+len} else {print substr($0, (i+1)3+1, len3-1); break}}}'
some bits in last byte may differ