Skip to content

Commit 599e9c9

Browse files
author
dgsudharsan
committed
Merge branch 'copp_changes' of https://github.com/dgsudharsan/sonic-buildimage into copp_changes
2 parents dce281d + 12a9990 commit 599e9c9

File tree

447 files changed

+37679
-1991
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

447 files changed

+37679
-1991
lines changed

Makefile.cache

+3-3
Original file line numberDiff line numberDiff line change
@@ -325,9 +325,9 @@ define SHOW_WHY
325325
@echo "[ FLAGS FILE ] : [$($(1)_FILE_FLAGS)] " >> $($(1)_DST_PATH)/$(1).log
326326
@echo "[ FLAGS DEPENDS ] : [$($(1)_DEP_FLAGS_ALL)] " >> $($(1)_DST_PATH)/$(1).log
327327
@echo "[ FLAGS DIFF ] : [$($(1)_FLAGS_DIFF)] " >> $($(1)_DST_PATH)/$(1).log
328-
@echo "[ DEP DEPENDS ] : [$($(1)_DEP_FILES_MODIFIED)] " >> $($(1)_DST_PATH)/$(1).log
329-
@echo "[ SMDEP DEPENDS ] : [$($(1)_SMDEP_FILES_MODIFIED)] " >> $($(1)_DST_PATH)/$(1).log
330-
@echo "[ TARGET DEPENDS ] : [$?] " >> $($(1)_DST_PATH)/$(1).log
328+
@$(file >>$($(1)_DST_PATH)/$(1).log, "[ DEP DEPENDS ] : [$($(1)_DEP_FILES_MODIFIED)] ")
329+
@$(file >>$($(1)_DST_PATH)/$(1).log, "[ SMDEP DEPENDS ] : [$($(1)_SMDEP_FILES_MODIFIED)] ")
330+
@$(file >>$($(1)_DST_PATH)/$(1).log, "[ TARGET DEPENDS ] : [$?] ")
331331
endef
332332

333333

build_debian.sh

+7-4
Original file line numberDiff line numberDiff line change
@@ -413,13 +413,15 @@ done < files/image_config/sysctl/sysctl-net.conf
413413

414414
sudo augtool --autosave "$sysctl_net_cmd_string" -r $FILESYSTEM_ROOT
415415

416-
## docker Python API package is needed by Ansible docker module
417-
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip install 'docker==4.1.0'
416+
# docker Python API package is needed by Ansible docker module as well as some SONiC applications
417+
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip2 install 'docker==4.1.0'
418+
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip3 install 'docker==4.3.1'
419+
418420
## Note: keep pip installed for maintainance purpose
419421

420422
## Get gcc and python dev pkgs
421423
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install gcc libpython2.7-dev
422-
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip install 'netifaces==0.10.7'
424+
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip2 install 'netifaces==0.10.7'
423425

424426
## Create /var/run/redis folder for docker-database to mount
425427
sudo mkdir -p $FILESYSTEM_ROOT/var/run/redis
@@ -463,7 +465,8 @@ EOF
463465
sudo cp ./files/scripts/core_cleanup.py $FILESYSTEM_ROOT/usr/bin/core_cleanup.py
464466

465467
## Copy ASIC config checksum
466-
python files/build_scripts/generate_asic_config_checksum.py
468+
sudo chmod 755 files/build_scripts/generate_asic_config_checksum.py
469+
./files/build_scripts/generate_asic_config_checksum.py
467470
if [[ ! -f './asic_config_checksum' ]]; then
468471
echo 'asic_config_checksum not found'
469472
exit 1

device/accton/x86_64-accton_as5812_54t-r0/plugins/sfputil.py

+7-12
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
try:
66
import time
77
import os
8-
import pickle
98
from ctypes import create_string_buffer
109
from sonic_sfp.sfputilbase import SfpUtilBase
1110
except ImportError as e:
@@ -83,16 +82,13 @@ def __init__(self):
8382

8483
#Two i2c buses might get flipped order, check them both.
8584
def update_i2c_order(self):
86-
if os.path.exists("/tmp/accton_util.p"):
87-
self.I2C_BUS_ORDER = pickle.load(open("/tmp/accton_util.p", "rb"))
88-
else:
89-
if self.I2C_BUS_ORDER < 0:
90-
eeprom_path = "/sys/bus/i2c/devices/1-0057/eeprom"
91-
if os.path.exists(eeprom_path):
92-
self.I2C_BUS_ORDER = 0
93-
eeprom_path = "/sys/bus/i2c/devices/0-0057/eeprom"
94-
if os.path.exists(eeprom_path):
95-
self.I2C_BUS_ORDER = 1
85+
if self.I2C_BUS_ORDER < 0:
86+
eeprom_path = "/sys/bus/i2c/devices/1-0057/eeprom"
87+
if os.path.exists(eeprom_path):
88+
self.I2C_BUS_ORDER = 0
89+
eeprom_path = "/sys/bus/i2c/devices/0-0057/eeprom"
90+
if os.path.exists(eeprom_path):
91+
self.I2C_BUS_ORDER = 1
9692
return self.I2C_BUS_ORDER
9793

9894
def get_presence(self, port_num):
@@ -285,4 +281,3 @@ def get_transceiver_change_event(self, timeout=2000):
285281
else:
286282
return True, {}
287283
return False, {}
288-

device/accton/x86_64-accton_as5812_54x-r0/plugins/sfputil.py

+7-11
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
try:
66
import time
77
import os
8-
import pickle
98
from ctypes import create_string_buffer
109
from sonic_sfp.sfputilbase import SfpUtilBase
1110
except ImportError as e:
@@ -132,16 +131,13 @@ def __init__(self):
132131

133132
#Two i2c buses might get flipped order, check them both.
134133
def update_i2c_order(self):
135-
if os.path.exists("/tmp/accton_util.p"):
136-
self.I2C_BUS_ORDER = pickle.load(open("/tmp/accton_util.p", "rb"))
137-
else:
138-
if self.I2C_BUS_ORDER < 0:
139-
eeprom_path = "/sys/bus/i2c/devices/1-0057/eeprom"
140-
if os.path.exists(eeprom_path):
141-
self.I2C_BUS_ORDER = 0
142-
eeprom_path = "/sys/bus/i2c/devices/0-0057/eeprom"
143-
if os.path.exists(eeprom_path):
144-
self.I2C_BUS_ORDER = 1
134+
if self.I2C_BUS_ORDER < 0:
135+
eeprom_path = "/sys/bus/i2c/devices/1-0057/eeprom"
136+
if os.path.exists(eeprom_path):
137+
self.I2C_BUS_ORDER = 0
138+
eeprom_path = "/sys/bus/i2c/devices/0-0057/eeprom"
139+
if os.path.exists(eeprom_path):
140+
self.I2C_BUS_ORDER = 1
145141
return self.I2C_BUS_ORDER
146142

147143
def get_presence(self, port_num):
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
../x86_64-arista_common/pmon_daemon_control_skip_thermalctld.json
1+
../x86_64-arista_common/pmon_daemon_control.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../x86_64-arista_common/thermal_policy.json
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
../x86_64-arista_common/pmon_daemon_control_skip_thermalctld.json
1+
../x86_64-arista_common/pmon_daemon_control.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../x86_64-arista_common/thermal_policy.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
{%- set default_topo = 't0' %}
2+
{%- include 'buffers_config.j2' %}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
2+
{%- set default_cable = '300m' %}
3+
4+
{%- set ports2cable = {
5+
'torrouter_server' : '5m',
6+
'leafrouter_torrouter' : '40m',
7+
'spinerouter_leafrouter' : '300m'
8+
}
9+
-%}
10+
11+
{%- macro generate_port_lists(PORT_ALL) %}
12+
{# Generate list of ports #}
13+
{%- for port_idx in range(0,32) %}
14+
{%- if PORT_ALL.append("Ethernet%d" % (port_idx * 4)) %}{%- endif %}
15+
{%- endfor %}
16+
{%- endmacro %}
17+
18+
{%- macro generate_buffer_pool_and_profiles() %}
19+
"BUFFER_POOL": {
20+
"ingress_lossless_pool": {
21+
"size": "10875072",
22+
"type": "ingress",
23+
"mode": "dynamic",
24+
"xoff": "4194112"
25+
},
26+
"egress_lossy_pool": {
27+
"size": "9243812",
28+
"type": "egress",
29+
"mode": "dynamic"
30+
},
31+
"egress_lossless_pool": {
32+
"size": "15982720",
33+
"type": "egress",
34+
"mode": "static"
35+
}
36+
},
37+
"BUFFER_PROFILE": {
38+
"ingress_lossy_profile": {
39+
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
40+
"size":"0",
41+
"dynamic_th":"3"
42+
},
43+
"egress_lossless_profile": {
44+
"pool":"[BUFFER_POOL|egress_lossless_pool]",
45+
"size":"1518",
46+
"static_th":"15982720"
47+
},
48+
"egress_lossy_profile": {
49+
"pool":"[BUFFER_POOL|egress_lossy_pool]",
50+
"size":"1518",
51+
"dynamic_th":"3"
52+
}
53+
},
54+
{%- endmacro %}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
2+
{%- set default_cable = '300m' %}
3+
4+
{%- set ports2cable = {
5+
'torrouter_server' : '5m',
6+
'leafrouter_torrouter' : '40m',
7+
'spinerouter_leafrouter' : '300m'
8+
}
9+
-%}
10+
11+
{%- macro generate_port_lists(PORT_ALL) %}
12+
{# Generate list of ports #}
13+
{%- for port_idx in range(0,32) %}
14+
{%- if PORT_ALL.append("Ethernet%d" % (port_idx * 4)) %}{%- endif %}
15+
{%- endfor %}
16+
{%- endmacro %}
17+
18+
{%- macro generate_buffer_pool_and_profiles() %}
19+
"BUFFER_POOL": {
20+
"ingress_lossless_pool": {
21+
"size": "10875072",
22+
"type": "ingress",
23+
"mode": "dynamic",
24+
"xoff": "4194112"
25+
},
26+
"egress_lossy_pool": {
27+
"size": "9243812",
28+
"type": "egress",
29+
"mode": "dynamic"
30+
},
31+
"egress_lossless_pool": {
32+
"size": "15982720",
33+
"type": "egress",
34+
"mode": "static"
35+
}
36+
},
37+
"BUFFER_PROFILE": {
38+
"ingress_lossy_profile": {
39+
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
40+
"size":"0",
41+
"dynamic_th":"3"
42+
},
43+
"egress_lossless_profile": {
44+
"pool":"[BUFFER_POOL|egress_lossless_pool]",
45+
"size":"1518",
46+
"static_th":"15982720"
47+
},
48+
"egress_lossy_profile": {
49+
"pool":"[BUFFER_POOL|egress_lossy_pool]",
50+
"size":"1518",
51+
"dynamic_th":"3"
52+
}
53+
},
54+
{%- endmacro %}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{%- macro generate_wred_profiles() %}
2+
"WRED_PROFILE": {
3+
"AZURE_LOSSLESS" : {
4+
"wred_green_enable" : "true",
5+
"wred_yellow_enable" : "true",
6+
"wred_red_enable" : "true",
7+
"ecn" : "ecn_all",
8+
"green_max_threshold" : "2097152",
9+
"green_min_threshold" : "250000",
10+
"yellow_max_threshold" : "2097152",
11+
"yellow_min_threshold" : "1048576",
12+
"red_max_threshold" : "2097152",
13+
"red_min_threshold" : "1048576",
14+
"green_drop_probability" : "5",
15+
"yellow_drop_probability": "5",
16+
"red_drop_probability" : "5"
17+
}
18+
},
19+
{%- endmacro %}
20+
21+
{%- include 'qos_config.j2' %}
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
../x86_64-arista_common/pmon_daemon_control_skip_thermalctld.json
1+
../x86_64-arista_common/pmon_daemon_control.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../x86_64-arista_common/thermal_policy.json
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
../x86_64-arista_common/pmon_daemon_control_skip_thermalctld.json
1+
../x86_64-arista_common/pmon_daemon_control.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../x86_64-arista_common/thermal_policy.json
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
../x86_64-arista_common/pmon_daemon_control_skip_thermalctld.json
1+
../x86_64-arista_common/pmon_daemon_control.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../x86_64-arista_common/thermal_policy.json
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
../x86_64-arista_common/pmon_daemon_control_skip_thermalctld.json
1+
../x86_64-arista_common/pmon_daemon_control.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../x86_64-arista_common/thermal_policy.json
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
../x86_64-arista_common/pmon_daemon_control_skip_thermalctld.json
1+
../x86_64-arista_common/pmon_daemon_control.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../x86_64-arista_common/thermal_policy.json
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
../x86_64-arista_common/pmon_daemon_control_skip_thermalctld.json
1+
../x86_64-arista_common/pmon_daemon_control.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../x86_64-arista_common/thermal_policy.json
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
../x86_64-arista_common/pmon_daemon_control_skip_thermalctld.json
1+
../x86_64-arista_common/pmon_daemon_control.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../x86_64-arista_common/thermal_policy.json
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
../x86_64-arista_common/pmon_daemon_control_skip_thermalctld.json
1+
../x86_64-arista_common/pmon_daemon_control.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../x86_64-arista_common/thermal_policy.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../x86_64-arista_common/pmon_daemon_control.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../x86_64-arista_common/thermal_policy.json
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
../x86_64-arista_common/pmon_daemon_control_skip_thermalctld.json
1+
../x86_64-arista_common/pmon_daemon_control.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../x86_64-arista_common/thermal_policy.json

device/arista/x86_64-arista_7800r3_48cq2_lc/platform_reboot

-1
This file was deleted.

device/arista/x86_64-arista_7800r3_48cqm2_lc/platform_reboot

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"skip_fancontrol": true
3+
}
4+

0 commit comments

Comments
 (0)