Skip to content

Commit

Permalink
Merge branch '202012' of https://github.com/Azure/sonic-buildimage in…
Browse files Browse the repository at this point in the history
…to 202012-nb-inno3
  • Loading branch information
andrewsapronov committed Oct 4, 2022
2 parents 2b215f9 + a16843a commit b8c67bd
Show file tree
Hide file tree
Showing 210 changed files with 4,584 additions and 2,661 deletions.
4 changes: 2 additions & 2 deletions .azure-pipelines/azure-pipelines-UpgrateVersion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ resources:
repositories:
- repository: buildimage
type: github
name: Azure/sonic-buildimage
name: sonic-net/sonic-buildimage
ref: master
endpoint: build
endpoint: sonic-net

pool: sonicbld

Expand Down
4 changes: 2 additions & 2 deletions .azure-pipelines/build-commonlib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ resources:
repositories:
- repository: buildimage
type: github
name: Azure/sonic-buildimage
name: sonic-net/sonic-buildimage
ref: master
endpoint: build
endpoint: sonic-net

jobs:
- template: .azure-pipelines/template-commonlib.yml@buildimage
4 changes: 2 additions & 2 deletions .azure-pipelines/docker-sonic-slave-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ resources:
repositories:
- repository: buildimage
type: github
name: Azure/sonic-buildimage
name: sonic-net/sonic-buildimage
ref: master
endpoint: build
endpoint: sonic-net

parameters:
- name: arch
Expand Down
4 changes: 2 additions & 2 deletions .azure-pipelines/official-build-cisco-8000.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ stages:
fi
cd $(dirname $filename)
echo "PWD=$(pwd)"
ls -l *.deb
ls -l cisco-*.deb
while read -r package; do
# Cisco version format: <VERSION>-sai-<sai-ver>-<distribution>-<COMMIT HASH>
# The <sai-ver> may contain several values in one build, the part is skipped when publishing to storage
Expand All @@ -93,7 +93,7 @@ stages:
package_url="$PACKAGE_URL/sai/ciscosai/master/$version/$package"
echo "Override package $package from $package_url"
wget "$package_url$StorageSASKey" -O "$package"
done < <(ls *.deb)
done < <(ls cisco-*.deb)
env:
StorageSASKey: $(StorageSASKey)
condition: ne(variables['Build.Reason'], 'PullRequest')
Expand Down
4 changes: 2 additions & 2 deletions .azure-pipelines/official-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ resources:
repositories:
- repository: buildimage
type: github
name: Azure/sonic-buildimage
name: sonic-net/sonic-buildimage
ref: master
endpoint: build
endpoint: sonic-net

trigger: none
pr: none
Expand Down
4 changes: 2 additions & 2 deletions .azure-pipelines/run-test-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ parameters:
steps:
- checkout: self
clean: true
displayName: 'checkout sonic-mgmt repo'
displayName: 'checkout sonic-buildimage repo'

- task: DownloadPipelineArtifact@2
inputs:
Expand All @@ -31,7 +31,7 @@ steps:
pushd /data/sonic-mgmt
git remote update
git reset --hard origin/master
git reset --hard origin/202012
sed -i s/use_own_value/${username}/ ansible/veos_vtb
echo aaa > ansible/password.txt
docker exec sonic-mgmt bash -c "pushd /data/sonic-mgmt/ansible;./testbed-cli.sh -d /data/sonic-vm -m $(inventory) -t $(testbed_file) -k ceos refresh-dut ${{ parameters.tbname }} password.txt" && sleep 180
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: automerge
uses: 'pascalgn/automerge-action@v0.13.1'
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
GITHUB_TOKEN: '${{ secrets.TOKEN }}'
MERGE_LABELS: 'automerge'
MERGE_METHOD: 'squash'
MERGE_FILTER_AUTHOR: 'mssonicbld'
Expand Down
6 changes: 5 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
url = https://github.com/Azure/sonic-mgmt-framework
[submodule "src/sonic-telemetry"]
path = src/sonic-telemetry
url = https://github.com/Azure/sonic-telemetry
url = https://github.com/sonic-net/sonic-gnmi
[submodule "Switch-SDK-drivers"]
path = platform/mellanox/sdk-src/sx-kernel/Switch-SDK-drivers
url = https://github.com/Mellanox/Switch-SDK-drivers
Expand All @@ -90,3 +90,7 @@
path = src/linkmgrd
url = https://github.com/Azure/sonic-linkmgrd.git
branch = 202012
[submodule "src/dhcprelay"]
path = src/dhcprelay
url = https://github.com/sonic-net/sonic-dhcp-relay.git
branch = 202012
8 changes: 4 additions & 4 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ resources:
repositories:
- repository: sonic-mgmt
type: github
name: Azure/sonic-mgmt
endpoint: build
name: sonic-net/sonic-mgmt
endpoint: sonic-net
ref: refs/heads/202012
- repository: buildimage
type: github
name: Azure/sonic-buildimage
endpoint: build
name: sonic-net/sonic-buildimage
endpoint: sonic-net
ref: master

variables:
Expand Down
7 changes: 6 additions & 1 deletion check_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ def main():
passwd_prompt = 'Password:'
cmd_prompt = "{}@sonic:~\$ $".format(args.u)
grub_selection = "The highlighted entry will be executed"
firsttime_prompt = 'firsttime_exit'

i = 0
while True:
Expand All @@ -43,14 +44,18 @@ def main():

# install sonic image
while True:
i = p.expect([login_prompt, passwd_prompt, grub_selection, cmd_prompt])
i = p.expect([login_prompt, passwd_prompt, firsttime_prompt, grub_selection, cmd_prompt])
if i == 0:
# send user name
p.sendline(args.u)
elif i == 1:
# send password
p.sendline(args.P)
elif i == 2:
# fix a login timeout issue, caused by the login_prompt message mixed with the output message of the rc.local
time.sleep(1)
p.sendline()
elif i == 3:
# select onie install
p.sendline()
else:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# PG lossless profiles.
# speed cable size xon xoff threshold xon_offset
50000 5m 4608 4608 33792 0 4608
100000 5m 4608 4608 49408 0 4608
50000 40m 4608 4608 36352 0 4608
100000 40m 4608 4608 54528 0 4608
50000 300m 4608 4608 55296 0 4608
100000 300m 4608 4608 92672 0 4608
50000 5m 4608 4608 160000 0 4608
100000 5m 4608 4608 160000 0 4608
50000 40m 4608 4608 160000 0 4608
100000 40m 4608 4608 160000 0 4608
50000 300m 4608 4608 160000 0 4608
100000 300m 4608 4608 160000 0 4608
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# PG lossless profiles.
# speed cable size xon xoff threshold xon_offset
50000 5m 4608 4608 79872 0 4608
100000 5m 4608 4608 54528 0 4608
50000 40m 4608 4608 39936 0 4608
100000 40m 4608 4608 60416 0 4608
50000 300m 4608 4608 61440 0 4608
100000 300m 4608 4608 103680 0 4608
50000 5m 4608 4608 160000 0 4608
100000 5m 4608 4608 160000 0 4608
50000 40m 4608 4608 160000 0 4608
100000 40m 4608 4608 160000 0 4608
50000 300m 4608 4608 160000 0 4608
100000 300m 4608 4608 160000 0 4608
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@
"3": "3",
"4": "4",
"5": "5",
"6": "6",
"6": "1",
"7": "7",
"8": "1"
},
Expand Down

This file was deleted.

This file was deleted.

67 changes: 36 additions & 31 deletions device/celestica/x86_64-cel_e1031-r0/sonic_platform/sfp.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

try:
import time
from ctypes import create_string_buffer
from ctypes import c_char
from sonic_platform_base.sfp_base import SfpBase
from sonic_platform_base.sonic_sfp.sff8472 import sff8472InterfaceId
from sonic_platform_base.sonic_sfp.sff8472 import sff8472Dom
Expand Down Expand Up @@ -121,8 +121,8 @@
SFP_VOLT_WIDTH = 2
SFP_CHANNL_MON_OFFSET = 100
SFP_CHANNL_MON_WIDTH = 6
SFP_CHANNL_STATUS_OFFSET = 110
SFP_CHANNL_STATUS_WIDTH = 1
SFP_STATUS_CONTROL_OFFSET = 110
SFP_STATUS_CONTROL_WIDTH = 1
SFP_TX_DISABLE_HARD_BIT = 7
SFP_TX_DISABLE_SOFT_BIT = 6

Expand Down Expand Up @@ -869,7 +869,7 @@ def get_rx_los(self):
elif self.sfp_type == SFP_TYPE:
offset = 256
dom_channel_monitor_raw = self._read_eeprom_specific_bytes(
(offset + SFP_CHANNL_STATUS_OFFSET), SFP_CHANNL_STATUS_WIDTH)
(offset + SFP_STATUS_CONTROL_OFFSET), SFP_STATUS_CONTROL_WIDTH)
if dom_channel_monitor_raw is not None:
rx_los_data = int(dom_channel_monitor_raw[0], 16)
rx_los_list.append(rx_los_data & 0x02 != 0)
Expand Down Expand Up @@ -901,7 +901,7 @@ def get_tx_fault(self):
elif self.sfp_type == SFP_TYPE:
offset = 256
dom_channel_monitor_raw = self._read_eeprom_specific_bytes(
(offset + SFP_CHANNL_STATUS_OFFSET), SFP_CHANNL_STATUS_WIDTH)
(offset + SFP_STATUS_CONTROL_OFFSET), SFP_STATUS_CONTROL_WIDTH)
if dom_channel_monitor_raw is not None:
tx_fault_data = int(dom_channel_monitor_raw[0], 16)
tx_fault_list.append(tx_fault_data & 0x04 != 0)
Expand Down Expand Up @@ -936,7 +936,7 @@ def get_tx_disable(self):
elif self.sfp_type == SFP_TYPE:
offset = 256
dom_channel_monitor_raw = self._read_eeprom_specific_bytes(
(offset + SFP_CHANNL_STATUS_OFFSET), SFP_CHANNL_STATUS_WIDTH)
(offset + SFP_STATUS_CONTROL_OFFSET), SFP_STATUS_CONTROL_WIDTH)
if dom_channel_monitor_raw is not None:
tx_disable_data = int(dom_channel_monitor_raw[0], 16)
tx_disable_list.append(tx_disable_data & 0xC0 != 0)
Expand Down Expand Up @@ -1170,31 +1170,36 @@ def tx_disable(self, tx_disable):
Returns:
A boolean, True if tx_disable is set successfully, False if not
"""
sysfs_sfp_i2c_client_eeprom_path = self.port_to_eeprom_mapping[self.port_num]
status_control_raw = self._read_eeprom_specific_bytes(
SFP_CHANNL_STATUS_OFFSET, SFP_CHANNL_STATUS_WIDTH)
if status_control_raw is not None:
# Set bit 6 for Soft TX Disable Select
# 01000000 = 64 and 10111111 = 191
tx_disable_bit = 64 if tx_disable else 191
status_control = int(status_control_raw[0], 16)
tx_disable_ctl = (status_control | tx_disable_bit) if tx_disable else (
status_control & tx_disable_bit)
try:
sysfsfile_eeprom = open(
sysfs_sfp_i2c_client_eeprom_path, mode="r+b", buffering=0)
buffer = create_string_buffer(1)
buffer[0] = chr(tx_disable_ctl)
# Write to eeprom
sysfsfile_eeprom.seek(SFP_CHANNL_STATUS_OFFSET)
sysfsfile_eeprom.write(buffer[0])
except Exception:
return False
finally:
if sysfsfile_eeprom:
sysfsfile_eeprom.close()
time.sleep(0.01)
return True
if not self.get_presence():
return False

if self.dom_tx_disable_supported:
# SFP status/control register at address A2h, byte 110
offset = 256
sysfs_sfp_i2c_client_eeprom_path = self.port_to_eeprom_mapping[self.port_num]
status_control_raw = self._read_eeprom_specific_bytes(
(offset + SFP_STATUS_CONTROL_OFFSET), SFP_STATUS_CONTROL_WIDTH)
if status_control_raw is not None:
# Set bit 6 for Soft TX Disable Select
# 01000000 = 64 and 10111111 = 191
tx_disable_bit = 64 if tx_disable else 191
status_control = int(status_control_raw[0], 16)
tx_disable_ctl = (status_control | tx_disable_bit) if tx_disable else (
status_control & tx_disable_bit)
try:
sysfsfile_eeprom = open(
sysfs_sfp_i2c_client_eeprom_path, mode="r+b", buffering=0)
tx_disable_data = c_char(tx_disable_ctl)
# Write to eeprom
sysfsfile_eeprom.seek(offset + SFP_STATUS_CONTROL_OFFSET)
sysfsfile_eeprom.write(tx_disable_data)
except Exception:
return False
finally:
if sysfsfile_eeprom:
sysfsfile_eeprom.close()
time.sleep(0.01)
return True
return False

def tx_disable_channel(self, channel, disable):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ def get_position_in_parent(self):
Returns:
integer: The 1-based relative physical position in parent device or -1 if cannot determine the position
"""
return -1
return self.index + 1

def is_replaceable(self):
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,6 @@ def get_position_in_parent(self):
"""
Retrieves the thermal position information
Returns:
A int value, 0 represent ASIC thermal, 1 represent CPU thermal info
A int value, index of thermal
"""
if self.postion == "cpu":
return 1
return 0
return self.index + 1
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,7 @@
{%- endmacro %}

{% import 'buffers_extra_queues.j2' as defs1 with context %}
{% import 'buffers_extra_pgs.j2' as defs2 with context %}

{%- macro generate_queue_buffers_with_extra_lossless_queues(port_names, port_names_require_extra_buffer) %}
{{ defs1.generate_queue_buffers_with_extra_lossless_queues(port_names, port_names_require_extra_buffer) }}
{%- endmacro %}
{%- macro generate_pg_buffers_with_extra_lossy_pgs(port_names, port_names_require_no_extra_pgs) %}
{{ defs2.generate_pg_buffers_with_extra_lossy_pgs(port_names, port_names_require_no_extra_pgs) }}
{%- endmacro %}

0 comments on commit b8c67bd

Please sign in to comment.