diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index 7936f8f4f6f2..a0b1cf54251e 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -184,7 +184,7 @@ stages:
- job:
pool: sonictest-t1-lag
displayName: "kvmtest-t1-lag"
- timeoutInMinutes: 240
+ timeoutInMinutes: 300
steps:
- template: .azure-pipelines/run-test-template.yml
diff --git a/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-C32/td3-a7050cx3-32s-32x100G.config.bcm b/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-C32/config.bcm.j2
similarity index 97%
rename from device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-C32/td3-a7050cx3-32s-32x100G.config.bcm
rename to device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-C32/config.bcm.j2
index 3b37d661f403..89a55175edc8 100644
--- a/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-C32/td3-a7050cx3-32s-32x100G.config.bcm
+++ b/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-C32/config.bcm.j2
@@ -1,6 +1,15 @@
+{# Construct config.bcm to include additional soc properties per specific device metadata requirement #}
+{%- set map_prio = '' -%}
+{%- if DEVICE_METADATA is defined and DEVICE_METADATA['localhost'] is defined and DEVICE_METADATA['localhost']['subtype'] is defined -%}
+{%- set switch_subtype = DEVICE_METADATA['localhost']['subtype'] -%}
+{%- if 'dualtor' in switch_subtype.lower() %}
+{%- set map_prio = 'sai_remap_prio_on_tnl_egress=1' -%}
+{%- endif %}
+{%- endif %}
sai_load_hw_config=/etc/bcm/flex/bcm56870_a0_premium_issu/b870.6.4.1/
l3_alpm_hit_skip=1
sai_adjust_acl_drop_in_rx_drop=1
+{{ map_prio }}
host_as_route_disable=1
use_all_splithorizon_groups=1
riot_enable=1
diff --git a/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-C32/sai.profile b/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-C32/sai.profile
index 7d96f190de73..5163d6140f0e 100644
--- a/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-C32/sai.profile
+++ b/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-C32/sai.profile
@@ -1,2 +1,2 @@
-SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/td3-a7050cx3-32s-32x100G.config.bcm
+SAI_INIT_CONFIG_FILE=/etc/sai.d/config.bcm
SAI_NUM_ECMP_MEMBERS=64
diff --git a/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-D48C8/td3-a7050cx3-32s-48x50G+8x100G.config.bcm b/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-D48C8/config.bcm.j2
similarity index 97%
rename from device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-D48C8/td3-a7050cx3-32s-48x50G+8x100G.config.bcm
rename to device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-D48C8/config.bcm.j2
index 267b3bb81a9a..9f523e506660 100644
--- a/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-D48C8/td3-a7050cx3-32s-48x50G+8x100G.config.bcm
+++ b/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-D48C8/config.bcm.j2
@@ -1,6 +1,15 @@
+{# Construct config.bcm to include additional soc properties per specific device metadata requirement #}
+{%- set map_prio = '' -%}
+{%- if DEVICE_METADATA is defined and DEVICE_METADATA['localhost'] is defined and DEVICE_METADATA['localhost']['subtype'] is defined -%}
+{%- set switch_subtype = DEVICE_METADATA['localhost']['subtype'] -%}
+{%- if 'dualtor' in switch_subtype.lower() %}
+{%- set map_prio = 'sai_remap_prio_on_tnl_egress=1' -%}
+{%- endif %}
+{%- endif %}
sai_load_hw_config=/etc/bcm/flex/bcm56870_a0_premium_issu/b870.6.4.1/
l3_alpm_hit_skip=1
sai_adjust_acl_drop_in_rx_drop=1
+{{ map_prio }}
host_as_route_disable=1
use_all_splithorizon_groups=1
riot_enable=1
diff --git a/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-D48C8/sai.profile b/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-D48C8/sai.profile
index 1865041f8d9f..5163d6140f0e 100644
--- a/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-D48C8/sai.profile
+++ b/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-D48C8/sai.profile
@@ -1,2 +1,2 @@
-SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/td3-a7050cx3-32s-48x50G+8x100G.config.bcm
+SAI_INIT_CONFIG_FILE=/etc/sai.d/config.bcm
SAI_NUM_ECMP_MEMBERS=64
diff --git a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-C64/buffers_defaults_t0.j2 b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-C64/buffers_defaults_t0.j2
index 625ca0ab119e..bee86a9b3a85 100644
--- a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-C64/buffers_defaults_t0.j2
+++ b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-C64/buffers_defaults_t0.j2
@@ -7,16 +7,20 @@
{%- endfor %}
{%- endmacro %}
+{%- import 'buffers_pool_sizes_t0.j2' as defs with context %}
+{%- set ingress_lossless_pool_size = defs.ingress_lossless_pool_size %}
+{%- set egress_lossy_pool_size = defs.egress_lossy_pool_size %}
+
{%- macro generate_buffer_pool_and_profiles() %}
"BUFFER_POOL": {
"ingress_lossless_pool": {
- "size": "33329088",
+ "size": "{{ ingress_lossless_pool_size }}",
"type": "ingress",
"mode": "dynamic",
"xoff": "7827456"
},
"egress_lossy_pool": {
- "size": "26663272",
+ "size": "{{ egress_lossy_pool_size }}",
"type": "egress",
"mode": "dynamic"
},
@@ -49,4 +53,4 @@
{%- macro generate_queue_buffers_with_extra_lossless_queues(port_names, port_names_require_extra_buffer) %}
{{ defs.generate_queue_buffers_with_extra_lossless_queues(port_names, port_names_require_extra_buffer) }}
-{%- endmacro %}
\ No newline at end of file
+{%- endmacro %}
diff --git a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-C64/buffers_defaults_t1.j2 b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-C64/buffers_defaults_t1.j2
index 68af36a27518..c5d390668a33 100644
--- a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-C64/buffers_defaults_t1.j2
+++ b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-C64/buffers_defaults_t1.j2
@@ -7,11 +7,15 @@
{%- endfor %}
{%- endmacro %}
+{%- import 'buffers_pool_sizes_t1.j2' as defs with context %}
+{%- set ingress_lossless_pool_size = defs.ingress_lossless_pool_size %}
+{%- set egress_lossy_pool_size = defs.egress_lossy_pool_size %}
+
{%- macro generate_buffer_pool_and_profiles() %}
"BUFFER_POOL": {
"ingress_lossless_pool": {
{# SS Tab2 Row 71 #}
- "size": "33582016",
+ "size": "{{ ingress_lossless_pool_size }}",
"type": "ingress",
"mode": "dynamic",
{# SS Tab2 Row 68 #}
@@ -19,7 +23,7 @@
},
"egress_lossy_pool": {
{# SS Tab2 Row 60 #}
- "size": "26866112",
+ "size": "{{ egress_lossy_pool_size }}",
"type": "egress",
"mode": "dynamic"
},
diff --git a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-C64/buffers_pool_sizes_t0.j2 b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-C64/buffers_pool_sizes_t0.j2
new file mode 100644
index 000000000000..bd82c947e4fc
--- /dev/null
+++ b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-C64/buffers_pool_sizes_t0.j2
@@ -0,0 +1,8 @@
+{%- set ingress_lossless_pool_size = '33329088' %}
+{%- set egress_lossy_pool_size = '26663272' %}
+
+{%- if ((SYSTEM_DEFAULTS is defined) and ('tunnel_qos_remap' in SYSTEM_DEFAULTS) and (SYSTEM_DEFAULTS['tunnel_qos_remap']['status'] == 'enabled')) and
+((DEVICE_METADATA is defined) and ('localhost' in DEVICE_METADATA) and ('subtype' in DEVICE_METADATA['localhost']) and (DEVICE_METADATA['localhost']['subtype'] == 'DualToR')) %}
+ {%- set ingress_lossless_pool_size = '33169344' %}
+ {%- set egress_lossy_pool_size = '26535808' %}
+{%- endif %}
diff --git a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-C64/buffers_pool_sizes_t1.j2 b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-C64/buffers_pool_sizes_t1.j2
new file mode 100644
index 000000000000..43b31de8ad43
--- /dev/null
+++ b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-C64/buffers_pool_sizes_t1.j2
@@ -0,0 +1,8 @@
+{%- set ingress_lossless_pool_size = '33582016' %}
+{%- set egress_lossy_pool_size = '26866112' %}
+
+{%- if ((SYSTEM_DEFAULTS is defined) and ('tunnel_qos_remap' in SYSTEM_DEFAULTS) and (SYSTEM_DEFAULTS['tunnel_qos_remap']['status'] == 'enabled')) and
+((DEVICE_METADATA is defined) and ('localhost' in DEVICE_METADATA) and ('type' in DEVICE_METADATA['localhost']) and (DEVICE_METADATA['localhost']['type'] == 'LeafRouter')) %}
+ {%- set ingress_lossless_pool_size = '33262528' %}
+ {%- set egress_lossy_pool_size = '26610688' %}
+{%- endif %}
diff --git a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-C64/config.bcm.j2 b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-C64/config.bcm.j2
index db5b2562cca2..90d57545c099 100644
--- a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-C64/config.bcm.j2
+++ b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-C64/config.bcm.j2
@@ -1,6 +1,7 @@
{# Construct config.bcm to include additional soc properties per specific device metadata requirement #}
{%- set mmu_sock = 'mmu_init_config="MSFT-TH2-Tier1"' -%}
{%- set IPinIP_sock = '' -%}
+{%- set map_prio = '' -%}
{%- if DEVICE_METADATA is defined and DEVICE_METADATA['localhost'] is defined -%}
{%- if DEVICE_METADATA['localhost']['type'] is defined -%}
{%- set switch_role = DEVICE_METADATA['localhost']['type'] -%}
@@ -15,6 +16,7 @@
sai_tunnel_underlay_route_mode=1
host_as_route_disable=1
l3_ecmp_levels=2' -%}
+{%- set map_prio = 'sai_remap_prio_on_tnl_egress=1' -%}
{%- endif %}
{%- endif %}
{%- endif %}
@@ -22,6 +24,7 @@
l3_alpm_hit_skip=1
sai_adjust_acl_drop_in_rx_drop=1
+{{ map_prio }}
PHY_AN_ALLOW_PLL_CHANGE=1
arl_clean_timeout_usec=15000000
asf_mem_profile=2
diff --git a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-D108C8/buffers_defaults_t0.j2 b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-D108C8/buffers_defaults_t0.j2
index 10b9d70d24bf..5ac1d2d2aef9 100644
--- a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-D108C8/buffers_defaults_t0.j2
+++ b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-D108C8/buffers_defaults_t0.j2
@@ -15,16 +15,20 @@
{%- endfor %}
{%- endmacro %}
+{%- import 'buffers_pool_sizes_t0.j2' as defs with context %}
+{%- set ingress_lossless_pool_size = defs.ingress_lossless_pool_size %}
+{%- set egress_lossy_pool_size = defs.egress_lossy_pool_size %}
+
{%- macro generate_buffer_pool_and_profiles() %}
"BUFFER_POOL": {
"ingress_lossless_pool": {
- "size": "33329088",
+ "size": "{{ ingress_lossless_pool_size }}",
"type": "ingress",
"mode": "dynamic",
"xoff": "7827456"
},
"egress_lossy_pool": {
- "size": "26663272",
+ "size": "{{ egress_lossy_pool_size }}",
"type": "egress",
"mode": "dynamic"
},
diff --git a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-D108C8/buffers_pool_sizes_t0.j2 b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-D108C8/buffers_pool_sizes_t0.j2
new file mode 120000
index 000000000000..72e16a608268
--- /dev/null
+++ b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-D108C8/buffers_pool_sizes_t0.j2
@@ -0,0 +1 @@
+../Arista-7260CX3-C64/buffers_pool_sizes_t0.j2
\ No newline at end of file
diff --git a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-D108C8/config.bcm.j2 b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-D108C8/config.bcm.j2
index 70512203f206..145426e05915 100644
--- a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-D108C8/config.bcm.j2
+++ b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-D108C8/config.bcm.j2
@@ -1,17 +1,20 @@
{# Construct config.bcm to include additional soc properties per specific device metadata requirement #}
{%- set IPinIP_sock = '' -%}
+{%- set map_prio = '' -%}
{%- if DEVICE_METADATA is defined and DEVICE_METADATA['localhost'] is defined and DEVICE_METADATA['localhost']['subtype'] is defined -%}
{%- set switch_subtype = DEVICE_METADATA['localhost']['subtype'] -%}
{%- if 'dualtor' in switch_subtype.lower() %}
{%- set IPinIP_sock = 'sai_tunnel_support=1
sai_tunnel_underlay_route_mode=1
host_as_route_disable=1
- l3_ecmp_levels=2' -%}
+ l3_ecmp_levels=2' -%} -%}
+{%- set map_prio = 'sai_remap_prio_on_tnl_egress=1' -%}
{%- endif %}
{%- endif %}
{# The following is the common soc properties that used to be named "th2-a7260cx3-64-112x50G+8x100G.config.bcm" #}
l3_alpm_hit_skip=1
sai_adjust_acl_drop_in_rx_drop=1
+{{ map_prio }}
PHY_AN_ALLOW_PLL_CHANGE=1
arl_clean_timeout_usec=15000000
asf_mem_profile=2
diff --git a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-Q64/buffers_defaults_t0.j2 b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-Q64/buffers_defaults_t0.j2
index 01b5a1dd8b3e..bee86a9b3a85 100644
--- a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-Q64/buffers_defaults_t0.j2
+++ b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-Q64/buffers_defaults_t0.j2
@@ -7,16 +7,20 @@
{%- endfor %}
{%- endmacro %}
+{%- import 'buffers_pool_sizes_t0.j2' as defs with context %}
+{%- set ingress_lossless_pool_size = defs.ingress_lossless_pool_size %}
+{%- set egress_lossy_pool_size = defs.egress_lossy_pool_size %}
+
{%- macro generate_buffer_pool_and_profiles() %}
"BUFFER_POOL": {
"ingress_lossless_pool": {
- "size": "33329088",
+ "size": "{{ ingress_lossless_pool_size }}",
"type": "ingress",
"mode": "dynamic",
"xoff": "7827456"
},
"egress_lossy_pool": {
- "size": "26663272",
+ "size": "{{ egress_lossy_pool_size }}",
"type": "egress",
"mode": "dynamic"
},
diff --git a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-Q64/buffers_defaults_t1.j2 b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-Q64/buffers_defaults_t1.j2
index 1d8fbb3e852f..f531b5e208e9 100644
--- a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-Q64/buffers_defaults_t1.j2
+++ b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-Q64/buffers_defaults_t1.j2
@@ -7,16 +7,20 @@
{%- endfor %}
{%- endmacro %}
+{%- import 'buffers_pool_sizes_t0.j2' as defs with context %}
+{%- set ingress_lossless_pool_size = defs.ingress_lossless_pool_size %}
+{%- set egress_lossy_pool_size = defs.egress_lossy_pool_size %}
+
{%- macro generate_buffer_pool_and_profiles() %}
"BUFFER_POOL": {
"ingress_lossless_pool": {
- "size": "33329088",
+ "size": "{{ ingress_lossless_pool_size }}",
"type": "ingress",
"mode": "dynamic",
"xoff": "7827456"
},
"egress_lossy_pool": {
- "size": "26663272",
+ "size": "{{ egress_lossy_pool_size }}",
"type": "egress",
"mode": "dynamic"
},
diff --git a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-Q64/buffers_pool_sizes_t0.j2 b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-Q64/buffers_pool_sizes_t0.j2
new file mode 120000
index 000000000000..72e16a608268
--- /dev/null
+++ b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-Q64/buffers_pool_sizes_t0.j2
@@ -0,0 +1 @@
+../Arista-7260CX3-C64/buffers_pool_sizes_t0.j2
\ No newline at end of file
diff --git a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-Q64/config.bcm.j2 b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-Q64/config.bcm.j2
index ce8efa8572b5..78194a75830e 100644
--- a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-Q64/config.bcm.j2
+++ b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-Q64/config.bcm.j2
@@ -1,6 +1,7 @@
{# Construct config.bcm to include additional soc properties per specific device metadata requirement #}
{%- set mmu_sock = 'mmu_init_config="MSFT-TH2-Tier1"' -%}
{%- set IPinIP_sock = '' -%}
+{%- set map_prio = '' -%}
{%- if DEVICE_METADATA is defined and DEVICE_METADATA['localhost'] is defined -%}
{%- if DEVICE_METADATA['localhost']['type'] is defined -%}
{%- set switch_role = DEVICE_METADATA['localhost']['type'] -%}
@@ -15,12 +16,14 @@
sai_tunnel_underlay_route_mode=1
host_as_route_disable=1
l3_ecmp_levels=2' -%}
+{%- set map_prio = 'sai_remap_prio_on_tnl_egress=1' -%}
{%- endif %}
{%- endif %}
{%- endif %}
{# The following is the common soc properties that used to be named "th2-a7260cx3-64-64x40G.config.bcm" #}
l3_alpm_hit_skip=1
sai_adjust_acl_drop_in_rx_drop=1
+{{ map_prio }}
PHY_AN_ALLOW_PLL_CHANGE=1
arl_clean_timeout_usec=15000000
asf_mem_profile=2
diff --git a/device/mellanox/x86_64-mlnx_msn2700-r0/platform_reboot b/device/mellanox/x86_64-mlnx_msn2700-r0/platform_reboot
index 7a38268ff09c..b2188fde6f5d 100755
--- a/device/mellanox/x86_64-mlnx_msn2700-r0/platform_reboot
+++ b/device/mellanox/x86_64-mlnx_msn2700-r0/platform_reboot
@@ -5,7 +5,7 @@ declare -r EXIT_ERROR="1"
declare -r PENDING_COMPONENT_FW="/usr/bin/install-pending-fw.py"
declare -r FW_UPGRADE_SCRIPT="/usr/bin/mlnx-fw-upgrade.sh"
-declare -r SYSFS_PWR_CYCLE="/sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/pwr_cycle"
+declare -r SYSFS_PWR_CYCLE="/var/run/hw-management/system/pwr_cycle"
FORCE_REBOOT="no"
@@ -24,8 +24,6 @@ function SafePwrCycle() {
sync ; sync
umount -fa > /dev/null 2&>1
echo 1 > $SYSFS_PWR_CYCLE
- sleep 3
- echo 0 > $SYSFS_PWR_CYCLE
}
ParseArguments "$@"
diff --git a/device/mellanox/x86_64-nvidia_sn2201-r0/ACS-SN2201/sai_2201.xml b/device/mellanox/x86_64-nvidia_sn2201-r0/ACS-SN2201/sai_2201.xml
index d50843270cfd..8c57d2f20b6e 100644
--- a/device/mellanox/x86_64-nvidia_sn2201-r0/ACS-SN2201/sai_2201.xml
+++ b/device/mellanox/x86_64-nvidia_sn2201-r0/ACS-SN2201/sai_2201.xml
@@ -36,337 +36,337 @@
0
0
-
- 3
+
+ 131072
62
1
1
0
- 3
+ 131072
63
1
2
0
- 3
+ 131072
64
1
3
0
- 3
+ 131072
57
1
4
0
- 3
+ 131072
58
1
5
0
- 3
+ 131072
59
1
6
0
- 3
+ 131072
60
1
7
0
- 3
+ 131072
53
1
8
0
- 3
+ 131072
54
1
9
0
- 3
+ 131072
55
1
10
0
- 3
+ 131072
56
1
11
0
- 3
+ 131072
49
1
12
0
- 3
+ 131072
50
1
13
0
- 3
+ 131072
51
1
14
0
- 3
+ 131072
52
1
15
0
- 3
+ 131072
45
1
16
0
- 3
+ 131072
46
1
17
0
- 3
+ 131072
47
1
18
0
- 3
+ 131072
48
1
19
0
- 3
+ 131072
41
1
20
0
- 3
+ 131072
42
1
21
0
- 3
+ 131072
43
1
22
0
- 3
+ 131072
44
1
23
0
- 3
+ 131072
37
1
24
0
- 3
+ 131072
38
1
25
0
- 3
+ 131072
39
1
26
0
- 3
+ 131072
40
1
27
0
- 3
+ 131072
33
1
28
0
- 3
+ 131072
34
1
29
0
- 3
+ 131072
35
1
30
0
- 3
+ 131072
36
1
31
0
- 3
+ 131072
1
1
32
0
- 3
+ 131072
2
1
33
0
- 3
+ 131072
3
1
34
0
- 3
+ 131072
4
1
35
0
- 3
+ 131072
- 5
+ 21
1
36
0
- 3
+ 131072
- 6
+ 22
1
37
0
- 3
+ 131072
- 17
+ 23
1
38
0
- 3
+ 131072
- 18
+ 24
1
39
0
- 3
+ 131072
- 19
+ 25
1
40
0
- 3
+ 131072
- 20
+ 26
1
41
0
- 3
+ 131072
- 21
+ 27
1
42
0
- 3
+ 131072
- 22
+ 28
1
43
0
- 3
+ 131072
- 23
+ 29
1
44
0
- 3
+ 131072
- 24
+ 30
1
45
0
- 3
+ 131072
- 25
+ 31
1
46
0
- 3
+ 131072
- 26
+ 32
1
47
0
- 3
+ 131072
9
@@ -376,21 +376,21 @@
11534336
- 7
+ 5
4
49
3
11534336
- 13
+ 17
4
50
3
11534336
- 11
+ 13
4
51
3
diff --git a/dockers/docker-fpm-frr/frr/bgpd/bgpd.main.conf.j2 b/dockers/docker-fpm-frr/frr/bgpd/bgpd.main.conf.j2
index c6643f185742..b5891b9695ac 100644
--- a/dockers/docker-fpm-frr/frr/bgpd/bgpd.main.conf.j2
+++ b/dockers/docker-fpm-frr/frr/bgpd/bgpd.main.conf.j2
@@ -11,8 +11,13 @@
ip prefix-list PL_LoopbackV4 permit {{ get_ipv4_loopback_address(LOOPBACK_INTERFACE, "Loopback0") | ip }}/32
!
{% if get_ipv6_loopback_address(LOOPBACK_INTERFACE, "Loopback0") != 'None' %}
+{% if ( ('localhost' in DEVICE_METADATA) and ('bgp_adv_lo_prefix_as_128' in DEVICE_METADATA['localhost']) and
+ (DEVICE_METADATA['localhost']['bgp_adv_lo_prefix_as_128'] == 'true') ) %}
+ipv6 prefix-list PL_LoopbackV6 permit {{ get_ipv6_loopback_address(LOOPBACK_INTERFACE, "Loopback0") | ip_network }}/128
+{% else %}
ipv6 prefix-list PL_LoopbackV6 permit {{ get_ipv6_loopback_address(LOOPBACK_INTERFACE, "Loopback0") | replace('/128', '/64') | ip_network }}/64
{% endif %}
+{% endif %}
!
{% if VLAN_INTERFACE is defined %}
{% set vnet_intfs = get_vnet_interfaces(VLAN_INTERFACE) %}
@@ -89,7 +94,12 @@ router bgp {{ DEVICE_METADATA['localhost']['bgp_asn'] }}
!
{% if get_ipv6_loopback_address(LOOPBACK_INTERFACE, "Loopback0") != 'None' %}
address-family ipv6
+{% if ( ('localhost' in DEVICE_METADATA) and ('bgp_adv_lo_prefix_as_128' in DEVICE_METADATA['localhost']) and
+ (DEVICE_METADATA['localhost']['bgp_adv_lo_prefix_as_128'] == 'true') ) %}
+ network {{ get_ipv6_loopback_address(LOOPBACK_INTERFACE, "Loopback0") | ip }}/128
+{% else %}
network {{ get_ipv6_loopback_address(LOOPBACK_INTERFACE, "Loopback0") | ip }}/64
+{% endif %}
exit-address-family
{% endif %}
{% if ((multi_asic is defined and DEVICE_METADATA['localhost']['switch_type'] != 'chassis-packet') or (DEVICE_METADATA['localhost']['switch_type'] == 'voq')) %}
diff --git a/dockers/docker-fpm-frr/frr/staticd/staticd.loopback_route.conf.j2 b/dockers/docker-fpm-frr/frr/staticd/staticd.loopback_route.conf.j2
index 95c2a901e4a3..35e7c49d575b 100644
--- a/dockers/docker-fpm-frr/frr/staticd/staticd.loopback_route.conf.j2
+++ b/dockers/docker-fpm-frr/frr/staticd/staticd.loopback_route.conf.j2
@@ -2,9 +2,15 @@
{% from "common/functions.conf.j2" import get_ipv4_loopback_address, get_ipv6_loopback_address, get_vnet_interfaces %}
!
{% block loopback_route %}
-! add static ipv6 /64 loopback route to allow bgpd to advertise the loopback route prefix
{% if get_ipv6_loopback_address(LOOPBACK_INTERFACE, "Loopback0") != 'None' %}
+{% if ( ('localhost' in DEVICE_METADATA) and ('bgp_adv_lo_prefix_as_128' in DEVICE_METADATA['localhost']) and
+ (DEVICE_METADATA['localhost']['bgp_adv_lo_prefix_as_128'] == 'true') ) %}
+! add static ipv6 /128 loopback route to allow bgpd to advertise the loopback route prefix
+ipv6 route {{ get_ipv6_loopback_address(LOOPBACK_INTERFACE, "Loopback0") | ip_network }}/128 Loopback0
+{% else %}
+! add static ipv6 /64 loopback route to allow bgpd to advertise the loopback route prefix
ipv6 route {{ get_ipv6_loopback_address(LOOPBACK_INTERFACE, "Loopback0") | replace('/128', '/64') | ip_network }}/64 Loopback0
{% endif %}
+{% endif %}
{% endblock loopback_route %}
!
diff --git a/platform/mellanox/fw.mk b/platform/mellanox/fw.mk
index e2ccc2ad7dc8..0dc3800155ea 100644
--- a/platform/mellanox/fw.mk
+++ b/platform/mellanox/fw.mk
@@ -27,17 +27,17 @@ else
FW_FROM_URL = n
endif
-MLNX_SPC_FW_VERSION = 13.2010.1500
+MLNX_SPC_FW_VERSION = 13.2010.2262
MLNX_SPC_FW_FILE = fw-SPC-rel-$(subst .,_,$(MLNX_SPC_FW_VERSION))-EVB.mfa
$(MLNX_SPC_FW_FILE)_PATH = $(MLNX_FW_BASE_PATH)
$(MLNX_SPC_FW_FILE)_URL = $(MLNX_FW_BASE_URL)/$(MLNX_SPC_FW_FILE)
-MLNX_SPC2_FW_VERSION = 29.2010.1500
+MLNX_SPC2_FW_VERSION = 29.2010.2262
MLNX_SPC2_FW_FILE = fw-SPC2-rel-$(subst .,_,$(MLNX_SPC2_FW_VERSION))-EVB.mfa
$(MLNX_SPC2_FW_FILE)_PATH = $(MLNX_FW_BASE_PATH)
$(MLNX_SPC2_FW_FILE)_URL = $(MLNX_FW_BASE_URL)/$(MLNX_SPC2_FW_FILE)
-MLNX_SPC3_FW_VERSION = 30.2010.1500
+MLNX_SPC3_FW_VERSION = 30.2010.2262
MLNX_SPC3_FW_FILE = fw-SPC3-rel-$(subst .,_,$(MLNX_SPC3_FW_VERSION))-EVB.mfa
$(MLNX_SPC3_FW_FILE)_PATH = $(MLNX_FW_BASE_PATH)
$(MLNX_SPC3_FW_FILE)_URL = $(MLNX_FW_BASE_URL)/$(MLNX_SPC3_FW_FILE)
diff --git a/platform/mellanox/mlnx-platform-api/sonic_platform/chassis.py b/platform/mellanox/mlnx-platform-api/sonic_platform/chassis.py
index 7e34b7e5e07f..77d9e9c048e9 100644
--- a/platform/mellanox/mlnx-platform-api/sonic_platform/chassis.py
+++ b/platform/mellanox/mlnx-platform-api/sonic_platform/chassis.py
@@ -119,8 +119,10 @@ def __del__(self):
if self.sfp_event:
self.sfp_event.deinitialize()
- if SFP.shared_sdk_handle:
- deinitialize_sdk_handle(SFP.shared_sdk_handle)
+ if self._sfp_list:
+ from .sfp import SFP, deinitialize_sdk_handle
+ if SFP.shared_sdk_handle:
+ deinitialize_sdk_handle(SFP.shared_sdk_handle)
##############################################
# PSU methods
diff --git a/platform/mellanox/mlnx-platform-api/sonic_platform/device_data.py b/platform/mellanox/mlnx-platform-api/sonic_platform/device_data.py
index 970d20683b04..94ed64d7d380 100644
--- a/platform/mellanox/mlnx-platform-api/sonic_platform/device_data.py
+++ b/platform/mellanox/mlnx-platform-api/sonic_platform/device_data.py
@@ -17,7 +17,6 @@
import glob
import os
-from sonic_py_common import device_info
from . import utils
@@ -172,6 +171,7 @@ class DeviceDataManager:
@classmethod
@utils.read_only_cache()
def get_platform_name(cls):
+ from sonic_py_common import device_info
return device_info.get_platform()
@classmethod
diff --git a/platform/mellanox/sdk-src/sx-kernel/Switch-SDK-drivers b/platform/mellanox/sdk-src/sx-kernel/Switch-SDK-drivers
index a0416e20a2b9..9f94bdfc2c7e 160000
--- a/platform/mellanox/sdk-src/sx-kernel/Switch-SDK-drivers
+++ b/platform/mellanox/sdk-src/sx-kernel/Switch-SDK-drivers
@@ -1 +1 @@
-Subproject commit a0416e20a2b9b304cb2c9b629c071f76db0ca2aa
+Subproject commit 9f94bdfc2c7e3670b5b959138f9d61d40e7cc1ea
diff --git a/platform/mellanox/sdk.mk b/platform/mellanox/sdk.mk
index ba152c953808..0ecc6d6bf041 100644
--- a/platform/mellanox/sdk.mk
+++ b/platform/mellanox/sdk.mk
@@ -16,7 +16,7 @@
#
MLNX_SDK_BASE_PATH = $(PLATFORM_PATH)/sdk-src/sx-kernel/Switch-SDK-drivers/bin/
MLNX_SDK_PKG_BASE_PATH = $(MLNX_SDK_BASE_PATH)/$(BLDENV)/
-MLNX_SDK_VERSION = 4.5.1500
+MLNX_SDK_VERSION = 4.5.2262
MLNX_SDK_ISSU_VERSION = 101
MLNX_SDK_DEB_VERSION = $(subst -,.,$(subst _,.,$(MLNX_SDK_VERSION)))
diff --git a/scripts/build_debian_base_system.sh b/scripts/build_debian_base_system.sh
index 72e3779ff3e2..0e00eeeac532 100755
--- a/scripts/build_debian_base_system.sh
+++ b/scripts/build_debian_base_system.sh
@@ -48,11 +48,20 @@ fi
ARCH=$(dpkg --print-architecture)
DISTRO=$(grep CODENAME /etc/os-release | cut -d= -f2)
if [ "$ARCH" != "$CONFIGURED_ARCH" ] || [ "$DISTRO" != "$IMAGE_DISTRO" ]; then
- "Not support to build different ARCH/DISTRO ${CONFIGURED_ARCH}:${$IMAGE_DISTRO} in ${ARCH}:${DISTRO}."
+ "Not support to build different ARCH/DISTRO ${CONFIGURED_ARCH}:${IMAGE_DISTRO} in ${ARCH}:${DISTRO}."
exit 1
fi
-BASE_VERSIONS=files/build/versions/host-base-image/versions-deb-${IMAGE_DISTRO}
+# Generate the version files for the host base image
+TEMP_DIR=$(mktemp -d)
+./scripts/versions_manager.py generate -t $TEMP_DIR -n host-base-image -d $IMAGE_DISTRO -a $CONFIGURED_ARCH
+PACKAGES=$(sed -E 's/=(=[^=]*)$/\1/' $TEMP_DIR/version-deb)
+if [ -z "$PACKAGES" ]; then
+ echo "Not found host-base-image packages, please check the version files in files/build/versions/host-base-image" 2>&1
+ exit 1
+fi
+rm -rf $TEMP_DIR
+
BASEIMAGE_TARBALLPATH=$TARGET/baseimage
BASEIMAGE_TARBALL=$(realpath -e $TARGET)/baseimage.tgz
@@ -69,7 +78,6 @@ DEBOOTSTRAP_REQUIRED=$TARGET_DEBOOTSTRAP/required
mkdir -p $ARCHIEVES
mkdir -p $APTLIST
mkdir -p $TARGET_DEBOOTSTRAP
-PACKAGES=$(sed -E 's/=(=[^=]*)$/\1/' $BASE_VERSIONS)
URL_ARR=$(apt-get download --print-uris $PACKAGES | cut -d" " -f1 | tr -d "'")
PACKAGE_ARR=($PACKAGES)
LENGTH=${#PACKAGE_ARR[@]}
@@ -80,7 +88,7 @@ do
encoded_packagename=$(urlencode $packagename)
url=$(echo "$URL_ARR" | grep -i "/${packagename}_\|/${encoded_packagename}_")
if [ -z "$url" ] || [[ $(echo "$url" | wc -l) -gt 1 ]]; then
- echo "No found package or found multiple package for package $packagename, url: $url" 2>&1
+ echo "No found package or found multiple package for package $packagename, url: $url" 1>&2
exit 1
fi
filename=$(basename "$url")
diff --git a/src/linkmgrd b/src/linkmgrd
index d744bfb4a694..9c8a16eedbef 160000
--- a/src/linkmgrd
+++ b/src/linkmgrd
@@ -1 +1 @@
-Subproject commit d744bfb4a6947cacfde744fc73550a7b99d8e0c8
+Subproject commit 9c8a16eedbef795c7d41fbd348152b43988dd6e0
diff --git a/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/ipv6_lo.conf b/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/ipv6_lo.conf
new file mode 100644
index 000000000000..50414a89a389
--- /dev/null
+++ b/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/ipv6_lo.conf
@@ -0,0 +1,27 @@
+!
+! template: bgpd/bgpd.main.conf.j2
+!
+! bgp multiple-instance
+!
+! BGP configuration
+!
+! TSA configuration
+!
+ip prefix-list PL_LoopbackV4 permit 55.55.55.55/32
+!
+ipv6 prefix-list PL_LoopbackV6 permit fc00::1/128
+!
+router bgp 55555
+!
+ bgp log-neighbor-changes
+ no bgp default ipv4-unicast
+ no bgp ebgp-requires-policy
+!
+ bgp router-id 55.55.55.55
+!
+ network 55.55.55.55/32
+!
+ address-family ipv6
+ network fc00::1/128
+! end of template: bgpd/bgpd.main.conf.j2
+!
diff --git a/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/ipv6_lo.json b/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/ipv6_lo.json
new file mode 100644
index 000000000000..f34cc60b0c74
--- /dev/null
+++ b/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/ipv6_lo.json
@@ -0,0 +1,18 @@
+{
+ "DEVICE_METADATA": {
+ "localhost": {
+ "bgp_asn": "55555",
+ "bgp_adv_lo_prefix_as_128": "true"
+ }
+ },
+ "LOOPBACK_INTERFACE": {
+ "Loopback0|fc00::1/128": {}
+ },
+ "constants": {
+ "bgp": {
+ "multipath_relax": {},
+ "graceful_restart": {},
+ "maximum_paths": {}
+ }
+ }
+}
diff --git a/src/sonic-bgpcfgd/tests/data/sonic-cfggen/staticd/staticd.loopback_ipv6_128_route.conf b/src/sonic-bgpcfgd/tests/data/sonic-cfggen/staticd/staticd.loopback_ipv6_128_route.conf
new file mode 100644
index 000000000000..a867c4c7309f
--- /dev/null
+++ b/src/sonic-bgpcfgd/tests/data/sonic-cfggen/staticd/staticd.loopback_ipv6_128_route.conf
@@ -0,0 +1,4 @@
+!
+! add static ipv6 /128 loopback route to allow bgpd to advertise the loopback route prefix
+ipv6 route fc00:1::32/128 Loopback0
+!!
diff --git a/src/sonic-bgpcfgd/tests/data/sonic-cfggen/staticd/staticd.loopback_ipv6_128_route.conf.json b/src/sonic-bgpcfgd/tests/data/sonic-cfggen/staticd/staticd.loopback_ipv6_128_route.conf.json
new file mode 100644
index 000000000000..f825c03f2b9b
--- /dev/null
+++ b/src/sonic-bgpcfgd/tests/data/sonic-cfggen/staticd/staticd.loopback_ipv6_128_route.conf.json
@@ -0,0 +1,10 @@
+{
+ "DEVICE_METADATA": {
+ "localhost": {
+ "bgp_adv_lo_prefix_as_128": "true"
+ }
+ },
+ "LOOPBACK_INTERFACE": {
+ "Loopback0|FC00:1::32/128": {}
+ }
+}
diff --git a/src/sonic-bgpcfgd/tests/data/sonic-cfggen/staticd/staticd.loopback_route.conf.json b/src/sonic-bgpcfgd/tests/data/sonic-cfggen/staticd/staticd.loopback_route.conf.json
index ffd3c2a2a117..b0c8f3176e5b 100644
--- a/src/sonic-bgpcfgd/tests/data/sonic-cfggen/staticd/staticd.loopback_route.conf.json
+++ b/src/sonic-bgpcfgd/tests/data/sonic-cfggen/staticd/staticd.loopback_route.conf.json
@@ -1,4 +1,8 @@
{
+ "DEVICE_METADATA": {
+ "localhost": {
+ }
+ },
"LOOPBACK_INTERFACE": {
"Loopback0|FC00:1::32/128": {}
}
diff --git a/src/sonic-bgpcfgd/tests/test_sonic-cfggen.py b/src/sonic-bgpcfgd/tests/test_sonic-cfggen.py
index 498ce8f9ff7a..d18bbd058c90 100644
--- a/src/sonic-bgpcfgd/tests/test_sonic-cfggen.py
+++ b/src/sonic-bgpcfgd/tests/test_sonic-cfggen.py
@@ -57,6 +57,12 @@ def test_bgpd_main_conf_packet_chassis():
"bgpd.main.conf.j2/packet_chassis.json",
"bgpd.main.conf.j2/packet_chassis.conf")
+def test_bgpd_lo_ipv6_conf_base():
+ run_test("IPv6 Loopback bgpd.main.conf.j2",
+ "bgpd/bgpd.main.conf.j2",
+ "bgpd.main.conf.j2/base.json",
+ "bgpd.main.conf.j2/base.conf")
+
def test_tsa_isolate():
run_test("tsa/bgpd.tsa.isolate.conf.j2",
"bgpd/tsa/bgpd.tsa.isolate.conf.j2",
@@ -87,6 +93,12 @@ def test_staticd_loopback_route():
"staticd/staticd.loopback_route.conf.json",
"staticd/staticd.loopback_route.conf")
+def test_staticd_loopback_ipv6_128_route():
+ run_test("staticd.loopback_ipv6_128_route.conf.j2",
+ "staticd/staticd.loopback_route.conf.j2",
+ "staticd/staticd.loopback_ipv6_128_route.conf.json",
+ "staticd/staticd.loopback_ipv6_128_route.conf")
+
def test_staticd():
run_test("staticd.conf.j2",
"staticd/staticd.conf.j2",
diff --git a/src/sonic-config-engine/tests/sample_output/py3/buffer-arista7260-dualtor.json b/src/sonic-config-engine/tests/sample_output/py3/buffer-arista7260-dualtor.json
index 32fbfe24370a..6b1f4c433fa0 100644
--- a/src/sonic-config-engine/tests/sample_output/py3/buffer-arista7260-dualtor.json
+++ b/src/sonic-config-engine/tests/sample_output/py3/buffer-arista7260-dualtor.json
@@ -128,13 +128,13 @@
"BUFFER_POOL": {
"ingress_lossless_pool": {
- "size": "33329088",
+ "size": "33169344",
"type": "ingress",
"mode": "dynamic",
"xoff": "7827456"
},
"egress_lossy_pool": {
- "size": "26663272",
+ "size": "26535808",
"type": "egress",
"mode": "dynamic"
},
diff --git a/src/sonic-config-engine/tests/sample_output/py3/buffer-arista7260-t1.json b/src/sonic-config-engine/tests/sample_output/py3/buffer-arista7260-t1.json
index 2491d376c771..702076249ac6 100644
--- a/src/sonic-config-engine/tests/sample_output/py3/buffer-arista7260-t1.json
+++ b/src/sonic-config-engine/tests/sample_output/py3/buffer-arista7260-t1.json
@@ -72,18 +72,18 @@
"BUFFER_POOL": {
"ingress_lossless_pool": {
- "size": "33582016",
+ "size": "33262528",
"type": "ingress",
"mode": "dynamic",
- "xoff": "8965632"
+ "xoff": "8965632"
},
"egress_lossy_pool": {
- "size": "26866112",
+ "size": "26610688",
"type": "egress",
"mode": "dynamic"
},
"egress_lossless_pool": {
- "size": "43481152",
+ "size": "43481152",
"type": "egress",
"mode": "static"
}
@@ -92,12 +92,12 @@
"ingress_lossy_profile": {
"pool":"ingress_lossless_pool",
"size":"0",
- "static_th":"44302336"
+ "static_th":"44302336"
},
"egress_lossless_profile": {
"pool":"egress_lossless_pool",
"size":"0",
- "static_th":"43481152"
+ "static_th":"43481152"
},
"egress_lossy_profile": {
"pool":"egress_lossy_pool",
diff --git a/src/sonic-config-engine/tests/test_j2files.py b/src/sonic-config-engine/tests/test_j2files.py
index 2d9ac9d8f474..353dbaed41e1 100644
--- a/src/sonic-config-engine/tests/test_j2files.py
+++ b/src/sonic-config-engine/tests/test_j2files.py
@@ -43,6 +43,31 @@ def run_script(self, argument):
def run_diff(self, file1, file2):
return subprocess.check_output('diff -u {} {} || true'.format(file1, file2), shell=True)
+ def create_machine_conf(self, platform, vendor):
+ file_exist = True
+ dir_exist = True
+ mode = {'arista': 'aboot',
+ 'dell': 'onie',
+ 'mellanox': 'onie'
+ }
+ echo_cmd = "echo '{}_platform={}' | sudo tee -a /host/machine.conf > /dev/null".format(mode[vendor], platform)
+ if not os.path.exists('/host/machine.conf'):
+ file_exist = False
+ if not os.path.isdir('/host'):
+ dir_exist = False
+ os.system('sudo mkdir /host')
+ os.system('sudo touch /host/machine.conf')
+ os.system(echo_cmd)
+
+ return file_exist, dir_exist
+
+ def remove_machine_conf(self, file_exist, dir_exist):
+ if not file_exist:
+ os.system('sudo rm -f /host/machine.conf')
+
+ if not dir_exist:
+ os.system('sudo rmdir /host')
+
def test_interfaces(self):
interfaces_template = os.path.join(self.test_dir, '..', '..', '..', 'files', 'image_config', 'interfaces', 'interfaces.j2')
argument = '-m ' + self.t0_minigraph + ' -p ' + self.t0_port_config + ' -a \'{\"hwaddr\":\"e4:1d:2d:a5:f3:ad\"}\' -t ' + interfaces_template + ' > ' + self.output_file
@@ -340,6 +365,7 @@ def test_qos_dscp_remapping_render_template(self):
os.remove(test_output)
def _test_buffers_render_template(self, vendor, platform, sku, minigraph, buffer_template, expected):
+ file_exist, dir_exist = self.create_machine_conf(platform, vendor)
dir_path = os.path.join(self.test_dir, '..', '..', '..', 'device', vendor, platform, sku)
buffers_file = os.path.join(dir_path, buffer_template)
port_config_ini_file = os.path.join(dir_path, 'port_config.ini')
@@ -355,6 +381,7 @@ def _test_buffers_render_template(self, vendor, platform, sku, minigraph, buffer
# cleanup
buffers_config_file_new = os.path.join(dir_path, 'buffers_config.j2')
os.remove(buffers_config_file_new)
+ self.remove_machine_conf(file_exist, dir_exist)
sample_output_file = os.path.join(self.test_dir, 'sample_output', utils.PYvX_DIR, expected)
assert utils.cmp(sample_output_file, self.output_file), self.run_diff(sample_output_file, self.output_file)
@@ -385,7 +412,7 @@ def test_extra_lossless_buffer_for_tunnel_remapping(self):
('arista', 'x86_64-arista_7260cx3_64', 'Arista-7260CX3-C64', 'sample-arista-7260-t1-minigraph.xml', 'buffers.json.j2', 'buffer-arista7260-t1.json'),
('arista', 'x86_64-arista_7260cx3_64', 'Arista-7260CX3-C64', 'sample-arista-7260-t1-minigraph-remap-disabled.xml', 'buffers.json.j2', 'buffer-arista7260-t1-remap-disabled.json')
]
-
+
for test_data in TEST_DATA:
self._test_buffers_render_template(vendor=test_data[0],
platform=test_data[1],
diff --git a/src/sonic-yang-models/doc/Configuration.md b/src/sonic-yang-models/doc/Configuration.md
index 3d5bf91db542..dd3c702e630b 100644
--- a/src/sonic-yang-models/doc/Configuration.md
+++ b/src/sonic-yang-models/doc/Configuration.md
@@ -775,6 +775,7 @@ instance is supported in SONiC.
"bgp_asn": "65100",
"deployment_id": "1",
"type": "ToRRouter",
+ "bgp_adv_lo_prefix_as_128" : "true",
"buffer_model": "traditional"
}
}
@@ -935,6 +936,9 @@ Loopback interface configuration lies in **LOOPBACK_INTERFACE** table
and has similar schema with data plane interfaces. The loopback device
name and loopback IP prefix act as multi-level key for loopback
interface objects.
+By default SONiC advertises Loopback interface IPv6 /128 subnet address
+as prefix with /64 subnet. To overcome this set "bgp_adv_lo_prefix_as_128"
+to true in DEVICE_METADATA
```
{
diff --git a/src/sonic-yang-models/tests/files/sample_config_db.json b/src/sonic-yang-models/tests/files/sample_config_db.json
index 9be6d29e8922..8a2227ef0804 100644
--- a/src/sonic-yang-models/tests/files/sample_config_db.json
+++ b/src/sonic-yang-models/tests/files/sample_config_db.json
@@ -325,7 +325,8 @@
"switch_type": "voq",
"max_cores": "8",
"sub_role": "FrontEnd",
- "dhcp_server": "disabled"
+ "dhcp_server": "disabled",
+ "bgp_adv_lo_prefix_as_128": "true"
}
},
"VLAN": {
diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests/device_metadata.json b/src/sonic-yang-models/tests/yang_model_tests/tests/device_metadata.json
index 1c39661d056e..8a562ef536a5 100644
--- a/src/sonic-yang-models/tests/yang_model_tests/tests/device_metadata.json
+++ b/src/sonic-yang-models/tests/yang_model_tests/tests/device_metadata.json
@@ -113,6 +113,9 @@
"DEVICE_METADATA_INVALID_DHCP_SERVER": {
"desc": "Verifying invalid dhcp_server configuration.",
"eStrKey": "InvalidValue"
+ },
+ "DEVICE_METADATA_ADVERTISE_LO_PREFIX_AS_128": {
+ "desc": "Verifying advertising lo prefix as /128."
}
}
diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests_config/device_metadata.json b/src/sonic-yang-models/tests/yang_model_tests/tests_config/device_metadata.json
index 687a745a24c6..ece046f2afb7 100644
--- a/src/sonic-yang-models/tests/yang_model_tests/tests_config/device_metadata.json
+++ b/src/sonic-yang-models/tests/yang_model_tests/tests_config/device_metadata.json
@@ -311,5 +311,15 @@
}
}
}
+ },
+ "DEVICE_METADATA_ADVERTISE_LO_PREFIX_AS_128": {
+ "sonic-device_metadata:sonic-device_metadata": {
+ "sonic-device_metadata:DEVICE_METADATA": {
+ "sonic-device_metadata:localhost": {
+ "bgp_asn": "65001",
+ "bgp_adv_lo_prefix_as_128": "true"
+ }
+ }
+ }
}
}
diff --git a/src/sonic-yang-models/yang-models/sonic-device_metadata.yang b/src/sonic-yang-models/yang-models/sonic-device_metadata.yang
index 17241005861e..b04f929cddc9 100644
--- a/src/sonic-yang-models/yang-models/sonic-device_metadata.yang
+++ b/src/sonic-yang-models/yang-models/sonic-device_metadata.yang
@@ -188,6 +188,12 @@ module sonic-device_metadata {
type stypes:admin_mode;
description "Indicate whether enable the embedded DHCP server.";
}
+
+ leaf bgp_adv_lo_prefix_as_128 {
+ type boolean;
+ description "Advertise Loopback0 interface IPv6 /128 subnet address as it is with set to true.
+ By default SONiC advertises /128 subnet prefix in Loopback0 as /64 subnet route";
+ }
}
/* end of container localhost */
}