From 32dac6f8442288966535c05af6c1a2bec53c0913 Mon Sep 17 00:00:00 2001 From: Qi Luo Date: Thu, 19 Feb 2026 00:21:47 -0800 Subject: [PATCH 01/11] Fixed restapi.service_branch files inside docker-restapi-sidecar (#25429) Why I did it Fix restapi.service_202505 with DPU env vars. Fix User setting in restapi.service_BRANCH files, the change is required to operate k8s rollout containers. Work item tracking Microsoft ADO (number only): How I did it How to verify it Manually tested on 202505 DUT, checked /usr/lib/systemd/system/restapi.service is expected to be override with changes. --- .../systemd_scripts/restapi.service | 16 ---------------- .../systemd_scripts/restapi.service_202311 | 2 +- .../systemd_scripts/restapi.service_202405 | 2 +- .../systemd_scripts/restapi.service_202411 | 2 +- .../systemd_scripts/restapi.service_202505 | 4 +++- .../systemd_scripts/restapi.service_202511 | 2 +- 6 files changed, 7 insertions(+), 21 deletions(-) delete mode 100644 dockers/docker-restapi-sidecar/systemd_scripts/restapi.service diff --git a/dockers/docker-restapi-sidecar/systemd_scripts/restapi.service b/dockers/docker-restapi-sidecar/systemd_scripts/restapi.service deleted file mode 100644 index cc91531c0e5..00000000000 --- a/dockers/docker-restapi-sidecar/systemd_scripts/restapi.service +++ /dev/null @@ -1,16 +0,0 @@ -[Unit] -Description=RestAPI container -Requires=config-setup.service -After=config-setup.service -BindsTo=sonic.target -After=sonic.target - -[Service] -User=root -ExecStartPre=/usr/bin/restapi.sh start -ExecStart=/usr/bin/restapi.sh wait -ExecStop=/usr/bin/restapi.sh stop -RestartSec=30 - -[Install] -WantedBy=sonic.target diff --git a/dockers/docker-restapi-sidecar/systemd_scripts/restapi.service_202311 b/dockers/docker-restapi-sidecar/systemd_scripts/restapi.service_202311 index d446a381926..bf13e6372d8 100644 --- a/dockers/docker-restapi-sidecar/systemd_scripts/restapi.service_202311 +++ b/dockers/docker-restapi-sidecar/systemd_scripts/restapi.service_202311 @@ -7,7 +7,7 @@ After=sonic.target Before=ntp-config.service [Service] -User=admin +User=root ExecStartPre=/usr/bin/restapi.sh start ExecStart=/usr/bin/restapi.sh wait ExecStop=/usr/bin/restapi.sh stop diff --git a/dockers/docker-restapi-sidecar/systemd_scripts/restapi.service_202405 b/dockers/docker-restapi-sidecar/systemd_scripts/restapi.service_202405 index 7cf0c5ee235..75e06eafb2a 100644 --- a/dockers/docker-restapi-sidecar/systemd_scripts/restapi.service_202405 +++ b/dockers/docker-restapi-sidecar/systemd_scripts/restapi.service_202405 @@ -7,7 +7,7 @@ After=sonic.target Before=ntp-config.service [Service] -User=admin +User=root ExecStartPre=/usr/bin/restapi.sh start ExecStart=/usr/bin/restapi.sh wait ExecStop=/usr/bin/restapi.sh stop diff --git a/dockers/docker-restapi-sidecar/systemd_scripts/restapi.service_202411 b/dockers/docker-restapi-sidecar/systemd_scripts/restapi.service_202411 index 7cf0c5ee235..75e06eafb2a 100644 --- a/dockers/docker-restapi-sidecar/systemd_scripts/restapi.service_202411 +++ b/dockers/docker-restapi-sidecar/systemd_scripts/restapi.service_202411 @@ -7,7 +7,7 @@ After=sonic.target Before=ntp-config.service [Service] -User=admin +User=root ExecStartPre=/usr/bin/restapi.sh start ExecStart=/usr/bin/restapi.sh wait ExecStop=/usr/bin/restapi.sh stop diff --git a/dockers/docker-restapi-sidecar/systemd_scripts/restapi.service_202505 b/dockers/docker-restapi-sidecar/systemd_scripts/restapi.service_202505 index f22719a6ba9..21bd9786acb 100644 --- a/dockers/docker-restapi-sidecar/systemd_scripts/restapi.service_202505 +++ b/dockers/docker-restapi-sidecar/systemd_scripts/restapi.service_202505 @@ -6,7 +6,9 @@ BindsTo=sonic.target After=sonic.target [Service] -User=admin +Environment="NUM_DPU=0" +Environment="IS_DPU_DEVICE=false" +User=root ExecStartPre=/usr/bin/restapi.sh start ExecStart=/usr/bin/restapi.sh wait ExecStop=/usr/bin/restapi.sh stop diff --git a/dockers/docker-restapi-sidecar/systemd_scripts/restapi.service_202511 b/dockers/docker-restapi-sidecar/systemd_scripts/restapi.service_202511 index f22719a6ba9..cc91531c0e5 100644 --- a/dockers/docker-restapi-sidecar/systemd_scripts/restapi.service_202511 +++ b/dockers/docker-restapi-sidecar/systemd_scripts/restapi.service_202511 @@ -6,7 +6,7 @@ BindsTo=sonic.target After=sonic.target [Service] -User=admin +User=root ExecStartPre=/usr/bin/restapi.sh start ExecStart=/usr/bin/restapi.sh wait ExecStop=/usr/bin/restapi.sh stop From 2a198d450eda157acd77d5b1793a054c641e15cf Mon Sep 17 00:00:00 2001 From: Ashok Kumar P Date: Tue, 11 Mar 2025 10:19:19 +0200 Subject: [PATCH 02/11] Move to new branch Signed-off-by: Ashok Kumar P --- .../config_teralynx_MVTX9180_64x100G.yaml | 3 + src/sonic-yang-models/setup.py | 211 ++++++++++++++ .../tests/files/sample_config_db.json | 52 ++++ .../tests/yang_model_tests/tests/ars.json | 37 +++ .../yang_model_tests/tests_config/ars.json | 202 +++++++++++++ .../yang-models/sonic-ars.yang | 268 ++++++++++++++++++ .../yang-models/sonic-flex_counter.yang | 18 +- .../yang-templates/sonic-acl.yang.j2 | 6 + 8 files changed, 796 insertions(+), 1 deletion(-) create mode 100644 src/sonic-yang-models/tests/yang_model_tests/tests/ars.json create mode 100755 src/sonic-yang-models/tests/yang_model_tests/tests_config/ars.json create mode 100644 src/sonic-yang-models/yang-models/sonic-ars.yang diff --git a/device/marvell/x86_64-marvell_dbmvtx9180-r0/dbmvtx9180_64x100G/config_teralynx_MVTX9180_64x100G.yaml b/device/marvell/x86_64-marvell_dbmvtx9180-r0/dbmvtx9180_64x100G/config_teralynx_MVTX9180_64x100G.yaml index 1abf66695d3..bed1dbe9fa1 100644 --- a/device/marvell/x86_64-marvell_dbmvtx9180-r0/dbmvtx9180_64x100G/config_teralynx_MVTX9180_64x100G.yaml +++ b/device/marvell/x86_64-marvell_dbmvtx9180-r0/dbmvtx9180_64x100G/config_teralynx_MVTX9180_64x100G.yaml @@ -24,6 +24,9 @@ nodes: sys_clk: "1800" ifc_clk: "1800" mac_clk: "1600" + ecmp_alb_enable: "1" + alb_port_state_enable: "1" + ecmp_alb_timeout_step_size: "2" txring: - txring_id: "0" desc_count: "1024" diff --git a/src/sonic-yang-models/setup.py b/src/sonic-yang-models/setup.py index 63b12d560d9..71dac1e14e5 100644 --- a/src/sonic-yang-models/setup.py +++ b/src/sonic-yang-models/setup.py @@ -305,6 +305,217 @@ def run(self): data_files=[ ('yang-models', ['./yang-models/'+y for y in yang_files]), ('cvlyang-models', ['./cvlyang-models/'+y for y in yang_files]), + ('yang-models', ['./yang-models/sonic-acl.yang', + './yang-models/sonic-ars.yang', + './yang-models/sonic-auto_techsupport.yang', + './yang-models/sonic-bgp-bbr.yang', + './yang-models/sonic-banner.yang', + './yang-models/sonic-bgp-common.yang', + './yang-models/sonic-bgp-device-global.yang', + './yang-models/sonic-bgp-global.yang', + './yang-models/sonic-bgp-monitor.yang', + './yang-models/sonic-bgp-internal-neighbor.yang', + './yang-models/sonic-bgp-neighbor.yang', + './yang-models/sonic-bgp-peergroup.yang', + './yang-models/sonic-bgp-peerrange.yang', + './yang-models/sonic-bgp-allowed-prefix.yang', + './yang-models/sonic-bgp-voq-chassis-neighbor.yang', + './yang-models/sonic-breakout_cfg.yang', + './yang-models/sonic-buffer-pg.yang', + './yang-models/sonic-buffer-pool.yang', + './yang-models/sonic-buffer-port-ingress-profile-list.yang', + './yang-models/sonic-buffer-port-egress-profile-list.yang', + './yang-models/sonic-buffer-profile.yang', + './yang-models/sonic-buffer-queue.yang', + './yang-models/sonic-cable-length.yang', + './yang-models/sonic-chassis-module.yang', + './yang-models/sonic-copp.yang', + './yang-models/sonic-console.yang', + './yang-models/sonic-crm.yang', + './yang-models/sonic-dash.yang', + './yang-models/sonic-default-lossless-buffer-parameter.yang', + './yang-models/sonic-device_metadata.yang', + './yang-models/sonic-device_neighbor.yang', + './yang-models/sonic-device_neighbor_metadata.yang', + './yang-models/sonic-dhcp-server.yang', + './yang-models/sonic-dhcpv6-relay.yang', + './yang-models/sonic-dns.yang', + './yang-models/sonic-events-bgp.yang', + './yang-models/sonic-events-common.yang', + './yang-models/sonic-events-dhcp-relay.yang', + './yang-models/sonic-events-host.yang', + './yang-models/sonic-events-swss.yang', + './yang-models/sonic-events-syncd.yang', + './yang-models/sonic-extension.yang', + './yang-models/sonic-fabric-monitor.yang', + './yang-models/sonic-fabric-port.yang', + './yang-models/sonic-flex_counter.yang', + './yang-models/sonic-fine-grained-ecmp.yang', + './yang-models/sonic-feature.yang', + './yang-models/sonic-fips.yang', + './yang-models/sonic-hash.yang', + './yang-models/sonic-system-defaults.yang', + './yang-models/sonic-interface.yang', + './yang-models/sonic-kdump.yang', + './yang-models/sonic-kubernetes_master.yang', + './yang-models/sonic-loopback-interface.yang', + './yang-models/sonic-lossless-traffic-pattern.yang', + './yang-models/sonic-memory-statistics.yang', + './yang-models/sonic-mgmt_interface.yang', + './yang-models/sonic-mgmt_port.yang', + './yang-models/sonic-mgmt_vrf.yang', + './yang-models/sonic-mirror-session.yang', + './yang-models/sonic-mpls-tc-map.yang', + './yang-models/sonic-mux-cable.yang', + './yang-models/sonic-mux-linkmgr.yang', + './yang-models/sonic-neigh.yang', + './yang-models/sonic-ntp.yang', + './yang-models/sonic-nat.yang', + './yang-models/sonic-nvgre-tunnel.yang', + './yang-models/sonic-passwh.yang', + './yang-models/sonic-ssh-server.yang', + './yang-models/sonic-pbh.yang', + './yang-models/sonic-port.yang', + './yang-models/sonic-policer.yang', + './yang-models/sonic-portchannel.yang', + './yang-models/sonic-pfcwd.yang', + './yang-models/sonic-route-common.yang', + './yang-models/sonic-route-map.yang', + './yang-models/sonic-routing-policy-sets.yang', + './yang-models/sonic-sflow.yang', + './yang-models/sonic-snmp.yang', + './yang-models/sonic-suppress-asic-sdk-health-event.yang', + './yang-models/sonic-syslog.yang', + './yang-models/sonic-system-aaa.yang', + './yang-models/sonic-system-tacacs.yang', + './yang-models/sonic-system-radius.yang', + './yang-models/sonic-system-ldap.yang', + './yang-models/sonic-subnet-decap.yang', + './yang-models/sonic-telemetry.yang', + './yang-models/sonic-telemetry_client.yang', + './yang-models/sonic-gnmi.yang', + './yang-models/sonic-tunnel.yang', + './yang-models/sonic-types.yang', + './yang-models/sonic-versions.yang', + './yang-models/sonic-vlan.yang', + './yang-models/sonic-vnet.yang', + './yang-models/sonic-voq-inband-interface.yang', + './yang-models/sonic-vxlan.yang', + './yang-models/sonic-vrf.yang', + './yang-models/sonic-mclag.yang', + './yang-models/sonic-vlan-sub-interface.yang', + './yang-models/sonic-warm-restart.yang', + './yang-models/sonic-lldp.yang', + './yang-models/sonic-scheduler.yang', + './yang-models/sonic-wred-profile.yang', + './yang-models/sonic-queue.yang', + './yang-models/sonic-restapi.yang', + './yang-models/sonic-dscp-fc-map.yang', + './yang-models/sonic-exp-fc-map.yang', + './yang-models/sonic-dscp-tc-map.yang', + './yang-models/sonic-dhcp-server-ipv4.yang', + './yang-models/sonic-dot1p-tc-map.yang', + './yang-models/sonic-storm-control.yang', + './yang-models/sonic-tc-priority-group-map.yang', + './yang-models/sonic-tc-queue-map.yang', + './yang-models/sonic-peer-switch.yang', + './yang-models/sonic-tc-dscp-map.yang', + './yang-models/sonic-pfc-priority-queue-map.yang', + './yang-models/sonic-pfc-priority-priority-group-map.yang', + './yang-models/sonic-logger.yang', + './yang-models/sonic-port-qos-map.yang', + './yang-models/sonic-static-route.yang', + './yang-models/sonic-system-port.yang', + './yang-models/sonic-macsec.yang', + './yang-models/sonic-bgp-sentinel.yang', + './yang-models/sonic-bgp-prefix-list.yang', + './yang-models/sonic-asic-sensors.yang', + './yang-models/sonic-bmp.yang', + './yang-models/sonic-xcvrd-log.yang', + './yang-models/sonic-grpcclient.yang', + './yang-models/sonic-serial-console.yang', + './yang-models/sonic-smart-switch.yang', + './yang-models/sonic-srv6.yang']), + ('cvlyang-models', ['./cvlyang-models/sonic-acl.yang', + './cvlyang-models/sonic-banner.yang', + './cvlyang-models/sonic-bgp-common.yang', + './cvlyang-models/sonic-bgp-global.yang', + './cvlyang-models/sonic-bgp-monitor.yang', + './cvlyang-models/sonic-bgp-neighbor.yang', + './cvlyang-models/sonic-bgp-peergroup.yang', + './cvlyang-models/sonic-bgp-peerrange.yang', + './cvlyang-models/sonic-bgp-allowed-prefix.yang', + './cvlyang-models/sonic-breakout_cfg.yang', + './cvlyang-models/sonic-copp.yang', + './cvlyang-models/sonic-crm.yang', + './cvlyang-models/sonic-device_metadata.yang', + './cvlyang-models/sonic-device_neighbor.yang', + './cvlyang-models/sonic-events-bgp.yang', + './cvlyang-models/sonic-events-common.yang', + './cvlyang-models/sonic-events-dhcp-relay.yang', + './cvlyang-models/sonic-events-host.yang', + './cvlyang-models/sonic-events-swss.yang', + './cvlyang-models/sonic-events-syncd.yang', + './cvlyang-models/sonic-device_neighbor_metadata.yang', + './cvlyang-models/sonic-extension.yang', + './cvlyang-models/sonic-fabric-monitor.yang', + './cvlyang-models/sonic-fabric-port.yang', + './cvlyang-models/sonic-flex_counter.yang', + './cvlyang-models/sonic-feature.yang', + './cvlyang-models/sonic-fine-grained-ecmp.yang', + './cvlyang-models/sonic-fips.yang', + './cvlyang-models/sonic-hash.yang', + './cvlyang-models/sonic-system-defaults.yang', + './cvlyang-models/sonic-interface.yang', + './cvlyang-models/sonic-kdump.yang', + './cvlyang-models/sonic-kubernetes_master.yang', + './cvlyang-models/sonic-loopback-interface.yang', + './cvlyang-models/sonic-mgmt_interface.yang', + './cvlyang-models/sonic-memory-statistics.yang', + './cvlyang-models/sonic-mgmt_port.yang', + './cvlyang-models/sonic-mgmt_vrf.yang', + './cvlyang-models/sonic-ntp.yang', + './cvlyang-models/sonic-nat.yang', + './cvlyang-models/sonic-nvgre-tunnel.yang', + './cvlyang-models/sonic-pbh.yang', + './cvlyang-models/sonic-ssh-server.yang', + './cvlyang-models/sonic-policer.yang', + './cvlyang-models/sonic-port.yang', + './cvlyang-models/sonic-portchannel.yang', + './cvlyang-models/sonic-pfcwd.yang', + './cvlyang-models/sonic-route-common.yang', + './cvlyang-models/sonic-route-map.yang', + './cvlyang-models/sonic-routing-policy-sets.yang', + './cvlyang-models/sonic-sflow.yang', + './cvlyang-models/sonic-snmp.yang', + './cvlyang-models/sonic-system-aaa.yang', + './cvlyang-models/sonic-system-tacacs.yang', + './cvlyang-models/sonic-telemetry.yang', + './cvlyang-models/sonic-telemetry_client.yang', + './cvlyang-models/sonic-gnmi.yang', + './cvlyang-models/sonic-types.yang', + './cvlyang-models/sonic-versions.yang', + './cvlyang-models/sonic-vlan.yang', + './cvlyang-models/sonic-vrf.yang', + './cvlyang-models/sonic-warm-restart.yang', + './cvlyang-models/sonic-lldp.yang', + './cvlyang-models/sonic-scheduler.yang', + './cvlyang-models/sonic-wred-profile.yang', + './cvlyang-models/sonic-queue.yang', + './cvlyang-models/sonic-dscp-tc-map.yang', + './cvlyang-models/sonic-dot1p-tc-map.yang', + './cvlyang-models/sonic-tc-priority-group-map.yang', + './cvlyang-models/sonic-tc-queue-map.yang', + './cvlyang-models/sonic-pfc-priority-queue-map.yang', + './cvlyang-models/sonic-pfc-priority-priority-group-map.yang', + './cvlyang-models/sonic-logger.yang', + './cvlyang-models/sonic-port-qos-map.yang', + './cvlyang-models/sonic-static-route.yang', + './cvlyang-models/sonic-system-port.yang', + './cvlyang-models/sonic-macsec.yang', + './cvlyang-models/sonic-bmp.yang', + './cvlyang-models/sonic-serial-console.yang', + './cvlyang-models/sonic-bgp-sentinel.yang']), ], zip_safe=False, ) 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 c6b38804eb8..00ff49a0726 100644 --- a/src/sonic-yang-models/tests/files/sample_config_db.json +++ b/src/sonic-yang-models/tests/files/sample_config_db.json @@ -3203,6 +3203,58 @@ "ber_threshold": "12" } } + "ARS_PROFILE": { + "global": { + "algorithm": "ewma", + "max_flows": "2048", + "sampling_interval": "10", + "past_load_min_value": "0", + "past_load_max_value": "10", + "past_load_weight": "6", + "future_load_min_value": "10", + "future_load_max_value": "50", + "future_load_weight": "10", + "current_load_min_value": "20", + "current_load_max_value": "30", + "ipv4_enable": "true", + "ipv6_enable": "true" + } + }, + "ARS_NEXTHOP_GROUP": { + "192.168.0.0/32|default": { + "profile_name": "global", + "assign_mode": "per_flowlet_quality", + "max_flows": "512", + "primary_path_threshold": "5" + } + }, + "ARS_PORTCHANNEL": { + "PortChannel0003": { + "profile_name": "global", + "assign_mode": "per_flowlet_quality", + "max_flows": "1024", + "primary_path_threshold": "2" + } + }, + "ARS_INTERFACE": { + "Ethernet1": {}, + "Ethernet3": {}, + "Ethernet10":{} + }, + "MEMORY_STATISTICS": { + "memory_statistics": { + "enabled": "false", + "sampling_interval": "5", + "retention_period": "15" + } + }, + "ASIC_SENSORS": { + "ASIC_SENSORS_POLLER_INTERVAL": { + "interval": "10" + }, + "ASIC_SENSORS_POLLER_STATUS": { + "admin_status": "enable" + } }, "SAMPLE_CONFIG_DB_UNKNOWN": { "UNKNOWN_TABLE": { diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests/ars.json b/src/sonic-yang-models/tests/yang_model_tests/tests/ars.json new file mode 100644 index 00000000000..a9039488290 --- /dev/null +++ b/src/sonic-yang-models/tests/yang_model_tests/tests/ars.json @@ -0,0 +1,37 @@ +{ + "ARS_TEST": { + "desc": "Sample config in ARS." + }, + "ARS_TEST_TOO_MANY_PROFILES": { + "desc": "ARS configuration with more than one profile ARS_PROFILE_LIST table.", + "eStr": "Too many ARS_PROFILE_LIST elements." + }, + "ARS_TEST_OBJECT_INVALID_MODE": { + "desc": "Object configuration with invalid mode value in ARS_OBJECT_LIST table.", + "eStrKey": "InvalidValue", + "eStr": [ + "assign_mode" + ] + }, + "ARS_PREFIX_TEST_INVALID_PREFIX": { + "desc": "Prefix configuration with invalid value in ARS_NEXTHOP_GROUP_LIST table.", + "eStrKey": "InvalidValue", + "eStr": [ + "ip_prefix" + ] + }, + "ARS_INTERFACE_TEST_INVALID_LINK": { + "desc": "Interface configuration with invalid name in ARS_INTERFACE_LIST table.", + "eStrKey": "InvalidValue", + "eStr": [ + "if_name" + ] + }, + "ARS_TEST_LAG_INVALID_NAME": { + "desc": "LAG with invalid name in ARS_PORTCHANNEL_LIST table.", + "eStrKey": "LeafRef", + "eStr": [ + "PortChannel0001" + ] + } +} diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests_config/ars.json b/src/sonic-yang-models/tests/yang_model_tests/tests_config/ars.json new file mode 100755 index 00000000000..01bab578a9d --- /dev/null +++ b/src/sonic-yang-models/tests/yang_model_tests/tests_config/ars.json @@ -0,0 +1,202 @@ +{ + "ARS_TEST": { + "sonic-port:sonic-port": { + "sonic-port:PORT": { + "PORT_LIST": [ + { + "admin_status": "up", + "alias": "Ethernet1", + "description": "Ethernet1", + "lanes": "65", + "mtu": "9000", + "name": "Ethernet1", + "tpid": "0x8100", + "speed": "25000" + }, + { + "admin_status": "up", + "alias": "Ethernet2", + "description": "Ethernet2", + "lanes": "65", + "mtu": "9000", + "name": "Ethernet2", + "tpid": "0x8100", + "speed": "25000" + }, + { + "admin_status": "up", + "alias": "Ethernet3", + "description": "Ethernet3", + "lanes": "65", + "mtu": "9000", + "name": "Ethernet3", + "tpid": "0x8100", + "speed": "25000" + } + ] + } + }, + "sonic-portchannel:sonic-portchannel": { + "sonic-portchannel:PORTCHANNEL": { + "PORTCHANNEL_LIST": [ + { + "name": "PortChannel0001", + "admin_status": "up" + }, + { + "name": "PortChannel0002", + "admin_status": "up" + } + ] + }, + "sonic-portchannel:PORTCHANNEL_MEMBER": { + "PORTCHANNEL_MEMBER_LIST": [ + { + "name": "PortChannel0001", + "port": "Ethernet1" + }, + { + "name": "PortChannel0001", + "port": "Ethernet2" + }, + { + "name": "PortChannel0002", + "port": "Ethernet3" + } + ] + } + }, + "sonic-ars:sonic-ars": { + "sonic-ars:ARS_PROFILE": { + "ARS_PROFILE_LIST": [ + { + "profile_name": "global", + "algorithm": "ewma", + "max_flows": "2048" + } + ] + }, + "sonic-ars:ARS_INTERFACE": { + "ARS_INTERFACE_LIST": [ + { + "if_name": "Ethernet1" + }, + { + "if_name": "PortChannel0002" + } + ] + }, + "sonic-ars:ARS_NEXTHOP_GROUP": { + "ARS_NEXTHOP_GROUP_LIST": [ + { + "ip_prefix": "10.0.0.0/24", + "vrf_name": "default", + "profile_name": "global", + "assign_mode": "per_flowlet_quality", + "max_flows": "512" + }, + { + "ip_prefix": "10.1.0.0/24", + "vrf_name": "default", + "profile_name": "global", + "assign_mode": "per_packet" + } + ] + }, + "sonic-ars:ARS_PORTCHANNEL": { + "ARS_PORTCHANNEL_LIST": [ + { + "if_name": "PortChannel0001", + "profile_name": "global", + "assign_mode": "per_flowlet_quality", + "max_flows": "512" + } + ] + } + } + }, + "ARS_TEST_TOO_MANY_PROFILES": { + "sonic-ars:sonic-ars": { + "sonic-ars:ARS_PROFILE": { + "ARS_PROFILE_LIST": [ + { + "profile_name": "group1", + "algorithm": "ewma" + }, + { + "profile_name": "group2", + "sampling_interval": "10" + } + ] + } + } + }, + "ARS_TEST_OBJECT_INVALID_MODE": { + "sonic-ars:sonic-ars": { + "sonic-ars:ARS_PROFILE": { + "ARS_PROFILE_LIST": [ + { + "profile_name": "group1", + "algorithm": "ewma" + } + ] + }, + "sonic-ars:ARS_NEXTHOP_GROUP": { + "ARS_NEXTHOP_GROUP_LIST": [ + { + "ip_prefix": "10.1.0.0/24", + "vrf_name": "default", + "profile_name": "group1", + "assign_mode": "illegal_mode" + } + ] + } + } + }, + "ARS_PREFIX_TEST_INVALID_PREFIX": { + "sonic-ars:sonic-ars": { + "sonic-ars:ARS_NEXTHOP_GROUP": { + "ARS_NEXTHOP_GROUP_LIST": [ + { + "ip_prefix": "invalid_prefix", + "vrf_name": "default", + "profile_name": "global" + } + ] + } + } + }, + "ARS_INTERFACE_TEST_INVALID_LINK": { + "sonic-ars:sonic-ars": { + "sonic-ars:ARS_INTERFACE": { + "ARS_INTERFACE_LIST": [ + { + "if_name": "EthernetXXX" + } + ] + } + } + }, + "ARS_TEST_LAG_INVALID_NAME": { + "sonic-ars:sonic-ars": { + "sonic-ars:ARS_PROFILE": { + "ARS_PROFILE_LIST": [ + { + "profile_name": "group1", + "algorithm": "ewma" + } + ] + }, + "sonic-ars:ARS_PORTCHANNEL": { + "ARS_PORTCHANNEL_LIST": [ + { + "if_name": "PortChannel0001", + "profile_name": "group1", + "assign_mode": "per_flowlet_quality", + "max_flows": "512" + } + ] + } + } + } +} diff --git a/src/sonic-yang-models/yang-models/sonic-ars.yang b/src/sonic-yang-models/yang-models/sonic-ars.yang new file mode 100644 index 00000000000..32cd0a7f795 --- /dev/null +++ b/src/sonic-yang-models/yang-models/sonic-ars.yang @@ -0,0 +1,268 @@ +module sonic-ars { + namespace "http://github.com/sonic-net/sonic-ars"; + prefix sars; + yang-version 1.1; + + import ietf-yang-types { + prefix yang; + } + + import ietf-inet-types { + prefix inet; + } + + import sonic-types { + prefix stypes; + } + + import sonic-vrf { + prefix vrf; + } + + import sonic-port { + prefix port; + } + + import sonic-portchannel { + prefix lag; + } + + organization + "SONiC"; + + contact + "SONiC"; + + description + "SONIC Adaptive Routing and Switching"; + + revision 2024-10-01 { + description + "Initial revision."; + } + + container sonic-ars { + + container ARS_PROFILE { + + list ARS_PROFILE_LIST { + + key "profile_name"; + max-elements 1; + + leaf profile_name { + description "ARS Profile Name"; + type string; + } + + leaf algorithm { + description "ARS quality algorithm"; + type enumeration { + enum ewma { + description "Exponentially Weighted Moving Average algorithm"; + } + } + } + + leaf max_flows { + type uint32; + description "Maximum number of flows that can be maintained per ARS profile."; + } + + leaf sampling_interval { + type uint32; + description "Sampling interval in microseconds for quality measure computation."; + } + + leaf past_load_min_value { + type uint16; + description "Past load min value."; + } + + leaf past_load_max_value { + type uint16; + description "Past load max value."; + } + + leaf past_load_weight { + type uint16; + description "Past load weight."; + } + + leaf future_load_min_value { + type uint16; + description "Future load min value."; + } + + leaf future_load_max_value { + type uint16; + description "Future load max value."; + } + + leaf future_load_weight { + type uint16; + description "Future load weight."; + } + + leaf current_load_min_value { + type uint16; + description "Current load min value."; + } + + leaf current_load_max_value { + type uint16; + description "Current load max value."; + } + + leaf ipv4_enable { + type boolean; + description "Whether ARS is enabled over IPv4 packets"; + } + + leaf ipv6_enable { + type boolean; + description "Whether ARS is enabled over IPv6 packets"; + } + } + /* end of list ARS_PORIFLE_LIST */ + } + /* end of container ARS_PORIFLE */ + + container ARS_INTERFACE { + + list ARS_INTERFACE_LIST { + description "List of interfaces participating in ARS"; + key "if_name"; + + leaf if_name { + type union { + type leafref { + path "/port:sonic-port/port:PORT/port:PORT_LIST/port:name"; + } + type leafref { + path "/lag:sonic-portchannel/lag:PORTCHANNEL/lag:PORTCHANNEL_LIST/lag:name"; + } + } + description "ARS-enabled interface name"; + } + } + /* end of list ARS_INTERFACE_LIST */ + } + /* end of container ARS_INTERFACE */ + + container ARS_NEXTHOP_GROUP { + + description "ARS-enabled Nexthop Groups"; + + list ARS_NEXTHOP_GROUP_LIST { + + key "ip_prefix vrf_name"; + + leaf ip_prefix{ + type stypes:sonic-ip-prefix; + description "Ip prefix which identifies nexthop group for which ARS behavior is desired"; + } + + leaf vrf_name { + type union { + type string { + pattern "default"; + } + type leafref { + path "/vrf:sonic-vrf/vrf:VRF/vrf:VRF_LIST/vrf:name"; + } + } + description "VRF name"; + } + + leaf profile_name { + description "ARS profile Name"; + type leafref { + path "/sars:sonic-ars/sars:ARS_PROFILE/sars:ARS_PROFILE_LIST/sars:profile_name"; + } + } + + leaf assign_mode { + type enumeration { + enum per_flowlet_quality{ + description "Per flow-let assignment based on flow quality"; + } + enum per_packet { + description "Per packet flow assignment based on port load"; + } + } + } + + leaf flowlet_idle_time { + type uint16; + description "Idle duration in microseconds. This duration is to classifying a flow-let in a macro flow."; + } + + leaf max_flows { + type uint32; + description "Maximum number of flow states that can be maintained per ARS object."; + } + + leaf primary_path_threshold { + type uint32; + description "Primary path metric"; + } + } + /* end of list ARS_NEXTHOP_GROUP_LIST */ + } + /* end of container ARS_NEXTHOP_GROUP */ + + + container ARS_PORTCHANNEL { + + description "ARS-enabled LAGs"; + + list ARS_PORTCHANNEL_LIST { + + key "if_name"; + + leaf if_name{ + type leafref { + path "/lag:sonic-portchannel/lag:PORTCHANNEL/lag:PORTCHANNEL_LIST/lag:name"; + } + description "Interface name which identifies LAG for which ARS behavior is desired"; + } + + leaf profile_name { + description "ARS profile Name"; + type leafref { + path "/sars:sonic-ars/sars:ARS_PROFILE/sars:ARS_PROFILE_LIST/sars:profile_name"; + } + } + + leaf assign_mode { + type enumeration { + enum per_flowlet_quality{ + description "Per flow-let assignment based on flow quality"; + } + enum per_packet { + description "Per packet flow assignment based on port load"; + } + } + } + + leaf flowlet_idle_time { + type uint16; + description "Idle duration in microseconds. This duration is to classifying a flow-let in a macro flow."; + } + + leaf max_flows { + type uint32; + description "Maximum number of flow states that can be maintained per ARS object."; + } + + leaf primary_path_threshold { + type uint32; + description "Primary path metric"; + } + } + /* end of list ARS_PORTCHANNEL_LIST */ + } + /* end of container ARS_PORTCHANNEL */ + } +} diff --git a/src/sonic-yang-models/yang-models/sonic-flex_counter.yang b/src/sonic-yang-models/yang-models/sonic-flex_counter.yang index d154f909823..8d1cb10b478 100644 --- a/src/sonic-yang-models/yang-models/sonic-flex_counter.yang +++ b/src/sonic-yang-models/yang-models/sonic-flex_counter.yang @@ -338,7 +338,7 @@ module sonic-flex_counter { leaf POLL_INTERVAL { type poll_interval; } - } + } container WRED_ECN_PORT { /* WRED_ECN_QUEUE_FLEX_COUNTER_GROUP */ @@ -401,6 +401,22 @@ module sonic-flex_counter { } + list ARS_NEXTHOP_GROUP_COUNTER_ROUTE_PATTERN_LIST { + + key "ip_prefix"; + + leaf ip_prefix { + type inet:ip-prefix; + } + + leaf max_match_count { + type uint32 { + range 1..50; + } + } + + } + list FLOW_COUNTER_ROUTE_PATTERN_VRF_LIST { key "vrf_name ip_prefix"; diff --git a/src/sonic-yang-models/yang-templates/sonic-acl.yang.j2 b/src/sonic-yang-models/yang-templates/sonic-acl.yang.j2 index 5a88cb2186f..b0082816d56 100644 --- a/src/sonic-yang-models/yang-templates/sonic-acl.yang.j2 +++ b/src/sonic-yang-models/yang-templates/sonic-acl.yang.j2 @@ -306,6 +306,12 @@ module sonic-acl { description "Tunnel Termination Flag"; type boolean; } + + leaf DISABLE_ARS_FORWARDING { + description "Disable ARS forwarding on matching packets"; + type boolean; + default false; + } } /* end of ACL_RULE_LIST */ } From 4774d452668b7ca96d891f3154e9b5c54aaaa5f3 Mon Sep 17 00:00:00 2001 From: Ashok Kumar P Date: Tue, 11 Mar 2025 10:19:19 +0200 Subject: [PATCH 03/11] Move to new branch Signed-off-by: Ashok Kumar P --- .../yang-models/sonic-ars.yang | 87 ++++--------------- 1 file changed, 15 insertions(+), 72 deletions(-) diff --git a/src/sonic-yang-models/yang-models/sonic-ars.yang b/src/sonic-yang-models/yang-models/sonic-ars.yang index 32cd0a7f795..75f50ecab55 100644 --- a/src/sonic-yang-models/yang-models/sonic-ars.yang +++ b/src/sonic-yang-models/yang-models/sonic-ars.yang @@ -23,10 +23,6 @@ module sonic-ars { prefix port; } - import sonic-portchannel { - prefix lag; - } - organization "SONiC"; @@ -139,12 +135,15 @@ module sonic-ars { type leafref { path "/port:sonic-port/port:PORT/port:PORT_LIST/port:name"; } - type leafref { - path "/lag:sonic-portchannel/lag:PORTCHANNEL/lag:PORTCHANNEL_LIST/lag:name"; - } } description "ARS-enabled interface name"; } + + leaf scaling_factor { + type uint32; + default "10000"; + description "This factor used to normalize load measurements across ports with different speeds."; + } } /* end of list ARS_INTERFACE_LIST */ } @@ -156,12 +155,7 @@ module sonic-ars { list ARS_NEXTHOP_GROUP_LIST { - key "ip_prefix vrf_name"; - - leaf ip_prefix{ - type stypes:sonic-ip-prefix; - description "Ip prefix which identifies nexthop group for which ARS behavior is desired"; - } + key "vrf_name ip_prefix"; leaf vrf_name { type union { @@ -175,57 +169,9 @@ module sonic-ars { description "VRF name"; } - leaf profile_name { - description "ARS profile Name"; - type leafref { - path "/sars:sonic-ars/sars:ARS_PROFILE/sars:ARS_PROFILE_LIST/sars:profile_name"; - } - } - - leaf assign_mode { - type enumeration { - enum per_flowlet_quality{ - description "Per flow-let assignment based on flow quality"; - } - enum per_packet { - description "Per packet flow assignment based on port load"; - } - } - } - - leaf flowlet_idle_time { - type uint16; - description "Idle duration in microseconds. This duration is to classifying a flow-let in a macro flow."; - } - - leaf max_flows { - type uint32; - description "Maximum number of flow states that can be maintained per ARS object."; - } - - leaf primary_path_threshold { - type uint32; - description "Primary path metric"; - } - } - /* end of list ARS_NEXTHOP_GROUP_LIST */ - } - /* end of container ARS_NEXTHOP_GROUP */ - - - container ARS_PORTCHANNEL { - - description "ARS-enabled LAGs"; - - list ARS_PORTCHANNEL_LIST { - - key "if_name"; - - leaf if_name{ - type leafref { - path "/lag:sonic-portchannel/lag:PORTCHANNEL/lag:PORTCHANNEL_LIST/lag:name"; - } - description "Interface name which identifies LAG for which ARS behavior is desired"; + leaf ip_prefix{ + type stypes:sonic-ip-prefix; + description "Ip prefix which identifies nexthop group for which ARS behavior is desired"; } leaf profile_name { @@ -247,7 +193,9 @@ module sonic-ars { } leaf flowlet_idle_time { - type uint16; + type uint16 { + range 2..2047; + } description "Idle duration in microseconds. This duration is to classifying a flow-let in a macro flow."; } @@ -255,14 +203,9 @@ module sonic-ars { type uint32; description "Maximum number of flow states that can be maintained per ARS object."; } - - leaf primary_path_threshold { - type uint32; - description "Primary path metric"; - } } - /* end of list ARS_PORTCHANNEL_LIST */ + /* end of list ARS_NEXTHOP_GROUP_LIST */ } - /* end of container ARS_PORTCHANNEL */ + /* end of container ARS_NEXTHOP_GROUP */ } } From 9b8648dff0abe3e682cc33ded76048cc084910ab Mon Sep 17 00:00:00 2001 From: Ashok Kumar P Date: Thu, 10 Apr 2025 15:25:54 +0300 Subject: [PATCH 04/11] Fix yang tests Signed-off-by: Ashok Kumar P --- .../tests/files/sample_config_db.json | 35 ++--- .../tests/yang_model_tests/tests/ars.json | 7 - .../yang_model_tests/tests_config/ars.json | 128 +++++------------- 3 files changed, 46 insertions(+), 124 deletions(-) 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 00ff49a0726..8d39ce61c3d 100644 --- a/src/sonic-yang-models/tests/files/sample_config_db.json +++ b/src/sonic-yang-models/tests/files/sample_config_db.json @@ -2288,7 +2288,7 @@ "type": "DWRR", "weight": "10" } - }, + }, "WRED_PROFILE": { "Wred1": { @@ -3078,12 +3078,12 @@ "dpu_bfd_probe_multiplier": "3" } }, - "XCVRD_LOG": { - "Y_CABLE": { - "log_verbosity": "notice" - } - }, - "GRPCCLIENT": { + "XCVRD_LOG": { + "Y_CABLE": { + "log_verbosity": "notice" + } + }, + "GRPCCLIENT": { "config": { "type": "secure", "auth_level": "server", @@ -3095,7 +3095,7 @@ "ca_crt": "root.pem", "grpc_ssl_credential": "azureclient.ms" } - }, + }, "BANNER_MESSAGE": { "global": { "state": "enabled", @@ -3202,7 +3202,7 @@ "guard_time": "2", "ber_threshold": "12" } - } + }, "ARS_PROFILE": { "global": { "algorithm": "ewma", @@ -3221,23 +3221,14 @@ } }, "ARS_NEXTHOP_GROUP": { - "192.168.0.0/32|default": { - "profile_name": "global", - "assign_mode": "per_flowlet_quality", - "max_flows": "512", - "primary_path_threshold": "5" - } - }, - "ARS_PORTCHANNEL": { - "PortChannel0003": { - "profile_name": "global", + "default|192.168.0.0/32": { + "profile_name": "global", "assign_mode": "per_flowlet_quality", - "max_flows": "1024", - "primary_path_threshold": "2" + "max_flows": "512" } }, "ARS_INTERFACE": { - "Ethernet1": {}, + "Ethernet1": {"scaling_factor": "100"}, "Ethernet3": {}, "Ethernet10":{} }, diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests/ars.json b/src/sonic-yang-models/tests/yang_model_tests/tests/ars.json index a9039488290..2a5e6c8347b 100644 --- a/src/sonic-yang-models/tests/yang_model_tests/tests/ars.json +++ b/src/sonic-yang-models/tests/yang_model_tests/tests/ars.json @@ -26,12 +26,5 @@ "eStr": [ "if_name" ] - }, - "ARS_TEST_LAG_INVALID_NAME": { - "desc": "LAG with invalid name in ARS_PORTCHANNEL_LIST table.", - "eStrKey": "LeafRef", - "eStr": [ - "PortChannel0001" - ] } } diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests_config/ars.json b/src/sonic-yang-models/tests/yang_model_tests/tests_config/ars.json index 01bab578a9d..a073b028d28 100755 --- a/src/sonic-yang-models/tests/yang_model_tests/tests_config/ars.json +++ b/src/sonic-yang-models/tests/yang_model_tests/tests_config/ars.json @@ -36,84 +36,44 @@ ] } }, - "sonic-portchannel:sonic-portchannel": { - "sonic-portchannel:PORTCHANNEL": { - "PORTCHANNEL_LIST": [ - { - "name": "PortChannel0001", - "admin_status": "up" - }, - { - "name": "PortChannel0002", - "admin_status": "up" - } - ] - }, - "sonic-portchannel:PORTCHANNEL_MEMBER": { - "PORTCHANNEL_MEMBER_LIST": [ - { - "name": "PortChannel0001", - "port": "Ethernet1" - }, - { - "name": "PortChannel0001", - "port": "Ethernet2" - }, - { - "name": "PortChannel0002", - "port": "Ethernet3" - } - ] - } - }, "sonic-ars:sonic-ars": { "sonic-ars:ARS_PROFILE": { "ARS_PROFILE_LIST": [ { "profile_name": "global", - "algorithm": "ewma", + "algorithm": "ewma", "max_flows": "2048" } ] }, - "sonic-ars:ARS_INTERFACE": { - "ARS_INTERFACE_LIST": [ - { - "if_name": "Ethernet1" - }, - { - "if_name": "PortChannel0002" - } - ] - }, - "sonic-ars:ARS_NEXTHOP_GROUP": { + "sonic-ars:ARS_INTERFACE": { + "ARS_INTERFACE_LIST": [ + { + "if_name": "Ethernet1", + "scaling_factor": "100" + }, + { + "if_name": "Ethernet2", + "scaling_factor": "1000" + }] + }, + "sonic-ars:ARS_NEXTHOP_GROUP": { "ARS_NEXTHOP_GROUP_LIST": [ - { - "ip_prefix": "10.0.0.0/24", - "vrf_name": "default", - "profile_name": "global", - "assign_mode": "per_flowlet_quality", - "max_flows": "512" - }, - { - "ip_prefix": "10.1.0.0/24", - "vrf_name": "default", - "profile_name": "global", - "assign_mode": "per_packet" - } - ] - }, - "sonic-ars:ARS_PORTCHANNEL": { - "ARS_PORTCHANNEL_LIST": [ - { - "if_name": "PortChannel0001", - "profile_name": "global", - "assign_mode": "per_flowlet_quality", - "max_flows": "512" - } - ] - } - } + { + "vrf_name": "default", + "ip_prefix": "10.0.0.0/24", + "profile_name": "global", + "assign_mode": "per_flowlet_quality", + "max_flows": "512" + }, + { + "vrf_name": "default", + "ip_prefix": "10.1.0.0/24", + "profile_name": "global", + "assign_mode": "per_packet" + }] + } + } }, "ARS_TEST_TOO_MANY_PROFILES": { "sonic-ars:sonic-ars": { @@ -144,8 +104,8 @@ "sonic-ars:ARS_NEXTHOP_GROUP": { "ARS_NEXTHOP_GROUP_LIST": [ { + "vrf_name": "default", "ip_prefix": "10.1.0.0/24", - "vrf_name": "default", "profile_name": "group1", "assign_mode": "illegal_mode" } @@ -158,8 +118,8 @@ "sonic-ars:ARS_NEXTHOP_GROUP": { "ARS_NEXTHOP_GROUP_LIST": [ { + "vrf_name": "default", "ip_prefix": "invalid_prefix", - "vrf_name": "default", "profile_name": "global" } ] @@ -168,32 +128,10 @@ }, "ARS_INTERFACE_TEST_INVALID_LINK": { "sonic-ars:sonic-ars": { - "sonic-ars:ARS_INTERFACE": { - "ARS_INTERFACE_LIST": [ - { - "if_name": "EthernetXXX" - } - ] - } - } - }, - "ARS_TEST_LAG_INVALID_NAME": { - "sonic-ars:sonic-ars": { - "sonic-ars:ARS_PROFILE": { - "ARS_PROFILE_LIST": [ - { - "profile_name": "group1", - "algorithm": "ewma" - } - ] - }, - "sonic-ars:ARS_PORTCHANNEL": { - "ARS_PORTCHANNEL_LIST": [ + "sonic-ars:ARS_INTERFACE": { + "ARS_INTERFACE_LIST": [ { - "if_name": "PortChannel0001", - "profile_name": "group1", - "assign_mode": "per_flowlet_quality", - "max_flows": "512" + "if_name": "EthernetXXX" } ] } From abab699645ac6edbdbdb62c5b723204a7255c5cc Mon Sep 17 00:00:00 2001 From: Ashok Kumar P Date: Thu, 10 Apr 2025 15:45:01 +0300 Subject: [PATCH 05/11] Fix yang sample config Signed-off-by: Ashok Kumar P --- src/sonic-yang-models/tests/files/sample_config_db.json | 1 + 1 file changed, 1 insertion(+) 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 8d39ce61c3d..50a344ac072 100644 --- a/src/sonic-yang-models/tests/files/sample_config_db.json +++ b/src/sonic-yang-models/tests/files/sample_config_db.json @@ -3246,6 +3246,7 @@ "ASIC_SENSORS_POLLER_STATUS": { "admin_status": "enable" } + } }, "SAMPLE_CONFIG_DB_UNKNOWN": { "UNKNOWN_TABLE": { From 5b487b9d5e8d44c51a19ce192aaba9948239d891 Mon Sep 17 00:00:00 2001 From: mssonicbld <79238446+mssonicbld@users.noreply.github.com> Date: Thu, 19 Feb 2026 17:12:11 +0800 Subject: [PATCH 06/11] [submodule] Update submodule sonic-platform-daemons to the latest HEAD automatically (#25574) #### Why I did it src/sonic-platform-daemons ``` * 12b64bb - (HEAD -> master, origin/master, origin/HEAD) psud: Handle all exceptions in try_get() to prevent crashes (#744) (32 minutes ago) [Vasundhara Volam] ``` #### How I did it #### How to verify it #### Description for the changelog --- src/sonic-platform-daemons | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sonic-platform-daemons b/src/sonic-platform-daemons index f5f9e21cbd9..12b64bbb76a 160000 --- a/src/sonic-platform-daemons +++ b/src/sonic-platform-daemons @@ -1 +1 @@ -Subproject commit f5f9e21cbd901d1f2238eed43ee0217546b3d27e +Subproject commit 12b64bbb76a34172d88d523f1d785bfb859b71fa From 7d958e0d1c99d6e9b84f0ace3f0c0094c0d1876a Mon Sep 17 00:00:00 2001 From: mssonicbld <79238446+mssonicbld@users.noreply.github.com> Date: Thu, 19 Feb 2026 18:12:19 +0800 Subject: [PATCH 07/11] [submodule] Update submodule sonic-dash-ha to the latest HEAD automatically (#25551) #### Why I did it src/sonic-dash-ha ``` * a6cf697 - (HEAD -> master, origin/master, origin/HEAD) update dash-api submodule (3 hours ago) [Jing Zhang] * 64022eb - Change convert_pb_to_json to parse proto encoded value from binary input (#142) (9 hours ago) [yue-fred-gao] * 53fb250 - [ci] fix build error and save binaries (#144) (28 hours ago) [Jing Zhang] ``` #### How I did it #### How to verify it #### Description for the changelog --- src/sonic-dash-ha | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sonic-dash-ha b/src/sonic-dash-ha index d01ed949d1c..a6cf6970298 160000 --- a/src/sonic-dash-ha +++ b/src/sonic-dash-ha @@ -1 +1 @@ -Subproject commit d01ed949d1cd89d846deec20d474ccf59c6b81fb +Subproject commit a6cf697029835759f71c03beb09b822b61768b92 From 530f85118b3d63edef6e4233aeb0da2ce9ac0522 Mon Sep 17 00:00:00 2001 From: mssonicbld <79238446+mssonicbld@users.noreply.github.com> Date: Thu, 19 Feb 2026 18:12:25 +0800 Subject: [PATCH 08/11] [submodule] Update submodule sonic-swss to the latest HEAD automatically (#25546) #### Why I did it src/sonic-swss ``` * 4495a5d5 - (HEAD -> master, origin/master, origin/HEAD) [ssw][ha] vnetorch supporting DPU live re-pairing (#4042) What I did Support route update from vnet tunnel route config change for custom_bfd monitoring. In DPU repairing scenario (to form HA sets), VNetOrch needs to support live update of endpoints, monitoring endpoints, primary and secondary groups. (29 hours ago) [Jing Zhang] ``` #### How I did it #### How to verify it #### Description for the changelog --- src/sonic-swss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sonic-swss b/src/sonic-swss index 567b6bd544b..4495a5d5251 160000 --- a/src/sonic-swss +++ b/src/sonic-swss @@ -1 +1 @@ -Subproject commit 567b6bd544b42d015b5b928f639c7592be973c57 +Subproject commit 4495a5d525155b5ce28b9716ce467baa4fbac664 From 736a156b1aac92f8af679e5fcbf527716a74420b Mon Sep 17 00:00:00 2001 From: mssonicbld <79238446+mssonicbld@users.noreply.github.com> Date: Thu, 19 Feb 2026 19:12:28 +0800 Subject: [PATCH 09/11] [submodule] Update submodule sonic-dash-api to the latest HEAD automatically (#25545) #### Why I did it src/sonic-dash-api ``` * 459cad6 - (HEAD -> master, origin/master, origin/HEAD) Add two extra HA states (#59) (3 hours ago) [Changrong Wu] * b3dfda7 - Add list of trusted VNIs (#56) (29 hours ago) [Lawrence Lee] ``` #### How I did it #### How to verify it #### Description for the changelog --- src/sonic-dash-api | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sonic-dash-api b/src/sonic-dash-api index 4b78817b142..459cad6570c 160000 --- a/src/sonic-dash-api +++ b/src/sonic-dash-api @@ -1 +1 @@ -Subproject commit 4b78817b1425117f4d8f4d71929c65129ac99d11 +Subproject commit 459cad6570cd65525eaf6176deb19ea8da858174 From 0250a88fc85bec896457ddd9ef003f6165d1f0aa Mon Sep 17 00:00:00 2001 From: Jing Zhang Date: Thu, 19 Feb 2026 23:41:43 +0800 Subject: [PATCH 10/11] [ssw] clean up DPU_APPL_DB and DPU_STATE_DB for DPU swss restart or DPU reboot (#25187) [ssw] clean up DPU_APPL_DB and DPU_STATE_DB for DPU swss restart or DPU reboot (#25187) --- files/scripts/swss.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/files/scripts/swss.sh b/files/scripts/swss.sh index da2bc22215f..5f4376e7ced 100755 --- a/files/scripts/swss.sh +++ b/files/scripts/swss.sh @@ -408,6 +408,20 @@ start() { $SONIC_DB_CLI RESTAPI_DB FLUSHDB clean_up_tables STATE_DB "'PORT_TABLE*', 'MGMT_PORT_TABLE*', 'VLAN_TABLE*', 'VLAN_MEMBER_TABLE*', 'LAG_TABLE*', 'LAG_MEMBER_TABLE*', 'INTERFACE_TABLE*', 'MIRROR_SESSION*', 'VRF_TABLE*', 'FDB_TABLE*', 'FG_ROUTE_TABLE*', 'BUFFER_POOL*', 'BUFFER_PROFILE*', 'MUX_CABLE_TABLE*', 'ADVERTISE_NETWORK_TABLE*', 'VXLAN_TUNNEL_TABLE*', 'VNET_ROUTE*', 'MACSEC_PORT_TABLE*', 'MACSEC_INGRESS_SA_TABLE*', 'MACSEC_EGRESS_SA_TABLE*', 'MACSEC_INGRESS_SC_TABLE*', 'MACSEC_EGRESS_SC_TABLE*', 'VRF_OBJECT_TABLE*', 'VNET_MONITOR_TABLE*', 'BFD_SESSION_TABLE*', 'SYSTEM_NEIGH_TABLE*', 'FABRIC_PORT_TABLE*', 'TUNNEL_DECAP_TABLE*', 'TUNNEL_DECAP_TERM_TABLE*', 'HIGH_FREQUENCY_TELEMETRY_SESSION_TABLE*' " $SONIC_DB_CLI APPL_STATE_DB FLUSHDB + # Flush DPU remote databases (DPU device only) + # Only run if this is a DPU device (type=SmartSwitchDPU or switch_type=dpu) + DEVICE_TYPE=`$SONIC_DB_CLI CONFIG_DB hget "DEVICE_METADATA|localhost" type` + SWITCH_TYPE=`$SONIC_DB_CLI CONFIG_DB hget "DEVICE_METADATA|localhost" switch_type` + if [[ x"${DEVICE_TYPE}" == x"SmartSwitchDPU" || x"${SWITCH_TYPE}" == x"dpu" ]]; then + # Check if DPU_APPL_DB remote database is reachable + if $SONIC_DB_CLI DPU_APPL_DB PING >/dev/null 2>&1; then + debug "Flushing DPU remote databases (DPU_APPL_DB, DPU_STATE_DB, DPU_APPL_STATE_DB, DPU_COUNTERS_DB) ..." + $SONIC_DB_CLI DPU_APPL_DB FLUSHDB + $SONIC_DB_CLI DPU_STATE_DB FLUSHDB + $SONIC_DB_CLI DPU_APPL_STATE_DB FLUSHDB + $SONIC_DB_CLI DPU_COUNTERS_DB FLUSHDB + fi + fi clean_up_chassis_db_tables rm -rf /tmp/cache MEDIA_SETTINGS="/usr/share/sonic/device/$PLATFORM/media_settings.json" From 42edbe3b9f383754470a4522fbf89cd3c7183377 Mon Sep 17 00:00:00 2001 From: Ashok Kumar P Date: Thu, 19 Feb 2026 22:44:39 +0530 Subject: [PATCH 11/11] Resolving merge conflict Resolving merge conflict. Signed-off-by: Ashok Kumar P --- src/sonic-yang-models/setup.py | 212 +-------- .../tests/files/sample_config_db.json | 46 +- .../tests/yang_model_tests/tests/ars.json | 21 +- .../yang_model_tests/tests_config/ars.json | 70 +-- .../yang-models/sonic-ars.yang | 404 ++++++++++-------- .../yang-models/sonic-flex_counter.yang | 16 - 6 files changed, 309 insertions(+), 460 deletions(-) diff --git a/src/sonic-yang-models/setup.py b/src/sonic-yang-models/setup.py index 71dac1e14e5..f4fe1b3a0e0 100644 --- a/src/sonic-yang-models/setup.py +++ b/src/sonic-yang-models/setup.py @@ -78,6 +78,7 @@ def print_yang_files_validation_report(yang_files_list): # Specify only the file basenames here; directory prefixes will be added automatically. yang_files = [ 'sonic-acl.yang', + 'sonic-ars.yang', 'sonic-asic-sensors.yang', 'sonic-auto_techsupport.yang', 'sonic-banner.yang', @@ -305,217 +306,6 @@ def run(self): data_files=[ ('yang-models', ['./yang-models/'+y for y in yang_files]), ('cvlyang-models', ['./cvlyang-models/'+y for y in yang_files]), - ('yang-models', ['./yang-models/sonic-acl.yang', - './yang-models/sonic-ars.yang', - './yang-models/sonic-auto_techsupport.yang', - './yang-models/sonic-bgp-bbr.yang', - './yang-models/sonic-banner.yang', - './yang-models/sonic-bgp-common.yang', - './yang-models/sonic-bgp-device-global.yang', - './yang-models/sonic-bgp-global.yang', - './yang-models/sonic-bgp-monitor.yang', - './yang-models/sonic-bgp-internal-neighbor.yang', - './yang-models/sonic-bgp-neighbor.yang', - './yang-models/sonic-bgp-peergroup.yang', - './yang-models/sonic-bgp-peerrange.yang', - './yang-models/sonic-bgp-allowed-prefix.yang', - './yang-models/sonic-bgp-voq-chassis-neighbor.yang', - './yang-models/sonic-breakout_cfg.yang', - './yang-models/sonic-buffer-pg.yang', - './yang-models/sonic-buffer-pool.yang', - './yang-models/sonic-buffer-port-ingress-profile-list.yang', - './yang-models/sonic-buffer-port-egress-profile-list.yang', - './yang-models/sonic-buffer-profile.yang', - './yang-models/sonic-buffer-queue.yang', - './yang-models/sonic-cable-length.yang', - './yang-models/sonic-chassis-module.yang', - './yang-models/sonic-copp.yang', - './yang-models/sonic-console.yang', - './yang-models/sonic-crm.yang', - './yang-models/sonic-dash.yang', - './yang-models/sonic-default-lossless-buffer-parameter.yang', - './yang-models/sonic-device_metadata.yang', - './yang-models/sonic-device_neighbor.yang', - './yang-models/sonic-device_neighbor_metadata.yang', - './yang-models/sonic-dhcp-server.yang', - './yang-models/sonic-dhcpv6-relay.yang', - './yang-models/sonic-dns.yang', - './yang-models/sonic-events-bgp.yang', - './yang-models/sonic-events-common.yang', - './yang-models/sonic-events-dhcp-relay.yang', - './yang-models/sonic-events-host.yang', - './yang-models/sonic-events-swss.yang', - './yang-models/sonic-events-syncd.yang', - './yang-models/sonic-extension.yang', - './yang-models/sonic-fabric-monitor.yang', - './yang-models/sonic-fabric-port.yang', - './yang-models/sonic-flex_counter.yang', - './yang-models/sonic-fine-grained-ecmp.yang', - './yang-models/sonic-feature.yang', - './yang-models/sonic-fips.yang', - './yang-models/sonic-hash.yang', - './yang-models/sonic-system-defaults.yang', - './yang-models/sonic-interface.yang', - './yang-models/sonic-kdump.yang', - './yang-models/sonic-kubernetes_master.yang', - './yang-models/sonic-loopback-interface.yang', - './yang-models/sonic-lossless-traffic-pattern.yang', - './yang-models/sonic-memory-statistics.yang', - './yang-models/sonic-mgmt_interface.yang', - './yang-models/sonic-mgmt_port.yang', - './yang-models/sonic-mgmt_vrf.yang', - './yang-models/sonic-mirror-session.yang', - './yang-models/sonic-mpls-tc-map.yang', - './yang-models/sonic-mux-cable.yang', - './yang-models/sonic-mux-linkmgr.yang', - './yang-models/sonic-neigh.yang', - './yang-models/sonic-ntp.yang', - './yang-models/sonic-nat.yang', - './yang-models/sonic-nvgre-tunnel.yang', - './yang-models/sonic-passwh.yang', - './yang-models/sonic-ssh-server.yang', - './yang-models/sonic-pbh.yang', - './yang-models/sonic-port.yang', - './yang-models/sonic-policer.yang', - './yang-models/sonic-portchannel.yang', - './yang-models/sonic-pfcwd.yang', - './yang-models/sonic-route-common.yang', - './yang-models/sonic-route-map.yang', - './yang-models/sonic-routing-policy-sets.yang', - './yang-models/sonic-sflow.yang', - './yang-models/sonic-snmp.yang', - './yang-models/sonic-suppress-asic-sdk-health-event.yang', - './yang-models/sonic-syslog.yang', - './yang-models/sonic-system-aaa.yang', - './yang-models/sonic-system-tacacs.yang', - './yang-models/sonic-system-radius.yang', - './yang-models/sonic-system-ldap.yang', - './yang-models/sonic-subnet-decap.yang', - './yang-models/sonic-telemetry.yang', - './yang-models/sonic-telemetry_client.yang', - './yang-models/sonic-gnmi.yang', - './yang-models/sonic-tunnel.yang', - './yang-models/sonic-types.yang', - './yang-models/sonic-versions.yang', - './yang-models/sonic-vlan.yang', - './yang-models/sonic-vnet.yang', - './yang-models/sonic-voq-inband-interface.yang', - './yang-models/sonic-vxlan.yang', - './yang-models/sonic-vrf.yang', - './yang-models/sonic-mclag.yang', - './yang-models/sonic-vlan-sub-interface.yang', - './yang-models/sonic-warm-restart.yang', - './yang-models/sonic-lldp.yang', - './yang-models/sonic-scheduler.yang', - './yang-models/sonic-wred-profile.yang', - './yang-models/sonic-queue.yang', - './yang-models/sonic-restapi.yang', - './yang-models/sonic-dscp-fc-map.yang', - './yang-models/sonic-exp-fc-map.yang', - './yang-models/sonic-dscp-tc-map.yang', - './yang-models/sonic-dhcp-server-ipv4.yang', - './yang-models/sonic-dot1p-tc-map.yang', - './yang-models/sonic-storm-control.yang', - './yang-models/sonic-tc-priority-group-map.yang', - './yang-models/sonic-tc-queue-map.yang', - './yang-models/sonic-peer-switch.yang', - './yang-models/sonic-tc-dscp-map.yang', - './yang-models/sonic-pfc-priority-queue-map.yang', - './yang-models/sonic-pfc-priority-priority-group-map.yang', - './yang-models/sonic-logger.yang', - './yang-models/sonic-port-qos-map.yang', - './yang-models/sonic-static-route.yang', - './yang-models/sonic-system-port.yang', - './yang-models/sonic-macsec.yang', - './yang-models/sonic-bgp-sentinel.yang', - './yang-models/sonic-bgp-prefix-list.yang', - './yang-models/sonic-asic-sensors.yang', - './yang-models/sonic-bmp.yang', - './yang-models/sonic-xcvrd-log.yang', - './yang-models/sonic-grpcclient.yang', - './yang-models/sonic-serial-console.yang', - './yang-models/sonic-smart-switch.yang', - './yang-models/sonic-srv6.yang']), - ('cvlyang-models', ['./cvlyang-models/sonic-acl.yang', - './cvlyang-models/sonic-banner.yang', - './cvlyang-models/sonic-bgp-common.yang', - './cvlyang-models/sonic-bgp-global.yang', - './cvlyang-models/sonic-bgp-monitor.yang', - './cvlyang-models/sonic-bgp-neighbor.yang', - './cvlyang-models/sonic-bgp-peergroup.yang', - './cvlyang-models/sonic-bgp-peerrange.yang', - './cvlyang-models/sonic-bgp-allowed-prefix.yang', - './cvlyang-models/sonic-breakout_cfg.yang', - './cvlyang-models/sonic-copp.yang', - './cvlyang-models/sonic-crm.yang', - './cvlyang-models/sonic-device_metadata.yang', - './cvlyang-models/sonic-device_neighbor.yang', - './cvlyang-models/sonic-events-bgp.yang', - './cvlyang-models/sonic-events-common.yang', - './cvlyang-models/sonic-events-dhcp-relay.yang', - './cvlyang-models/sonic-events-host.yang', - './cvlyang-models/sonic-events-swss.yang', - './cvlyang-models/sonic-events-syncd.yang', - './cvlyang-models/sonic-device_neighbor_metadata.yang', - './cvlyang-models/sonic-extension.yang', - './cvlyang-models/sonic-fabric-monitor.yang', - './cvlyang-models/sonic-fabric-port.yang', - './cvlyang-models/sonic-flex_counter.yang', - './cvlyang-models/sonic-feature.yang', - './cvlyang-models/sonic-fine-grained-ecmp.yang', - './cvlyang-models/sonic-fips.yang', - './cvlyang-models/sonic-hash.yang', - './cvlyang-models/sonic-system-defaults.yang', - './cvlyang-models/sonic-interface.yang', - './cvlyang-models/sonic-kdump.yang', - './cvlyang-models/sonic-kubernetes_master.yang', - './cvlyang-models/sonic-loopback-interface.yang', - './cvlyang-models/sonic-mgmt_interface.yang', - './cvlyang-models/sonic-memory-statistics.yang', - './cvlyang-models/sonic-mgmt_port.yang', - './cvlyang-models/sonic-mgmt_vrf.yang', - './cvlyang-models/sonic-ntp.yang', - './cvlyang-models/sonic-nat.yang', - './cvlyang-models/sonic-nvgre-tunnel.yang', - './cvlyang-models/sonic-pbh.yang', - './cvlyang-models/sonic-ssh-server.yang', - './cvlyang-models/sonic-policer.yang', - './cvlyang-models/sonic-port.yang', - './cvlyang-models/sonic-portchannel.yang', - './cvlyang-models/sonic-pfcwd.yang', - './cvlyang-models/sonic-route-common.yang', - './cvlyang-models/sonic-route-map.yang', - './cvlyang-models/sonic-routing-policy-sets.yang', - './cvlyang-models/sonic-sflow.yang', - './cvlyang-models/sonic-snmp.yang', - './cvlyang-models/sonic-system-aaa.yang', - './cvlyang-models/sonic-system-tacacs.yang', - './cvlyang-models/sonic-telemetry.yang', - './cvlyang-models/sonic-telemetry_client.yang', - './cvlyang-models/sonic-gnmi.yang', - './cvlyang-models/sonic-types.yang', - './cvlyang-models/sonic-versions.yang', - './cvlyang-models/sonic-vlan.yang', - './cvlyang-models/sonic-vrf.yang', - './cvlyang-models/sonic-warm-restart.yang', - './cvlyang-models/sonic-lldp.yang', - './cvlyang-models/sonic-scheduler.yang', - './cvlyang-models/sonic-wred-profile.yang', - './cvlyang-models/sonic-queue.yang', - './cvlyang-models/sonic-dscp-tc-map.yang', - './cvlyang-models/sonic-dot1p-tc-map.yang', - './cvlyang-models/sonic-tc-priority-group-map.yang', - './cvlyang-models/sonic-tc-queue-map.yang', - './cvlyang-models/sonic-pfc-priority-queue-map.yang', - './cvlyang-models/sonic-pfc-priority-priority-group-map.yang', - './cvlyang-models/sonic-logger.yang', - './cvlyang-models/sonic-port-qos-map.yang', - './cvlyang-models/sonic-static-route.yang', - './cvlyang-models/sonic-system-port.yang', - './cvlyang-models/sonic-macsec.yang', - './cvlyang-models/sonic-bmp.yang', - './cvlyang-models/sonic-serial-console.yang', - './cvlyang-models/sonic-bgp-sentinel.yang']), ], zip_safe=False, ) 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 50a344ac072..f3598ae8338 100644 --- a/src/sonic-yang-models/tests/files/sample_config_db.json +++ b/src/sonic-yang-models/tests/files/sample_config_db.json @@ -3204,8 +3204,11 @@ } }, "ARS_PROFILE": { - "global": { + "ars_profile_default": { "algorithm": "ewma", + "ars_nhg_path_selector_mode": "interface", + "ars_lag_path_selector_mode": "interface", + "default_ars_object": "ars_obj_name", "max_flows": "2048", "sampling_interval": "10", "past_load_min_value": "0", @@ -3220,32 +3223,33 @@ "ipv6_enable": "true" } }, - "ARS_NEXTHOP_GROUP": { - "default|192.168.0.0/32": { - "profile_name": "global", + "ARS_OBJECT": { + "ars_obj_name": { "assign_mode": "per_flowlet_quality", - "max_flows": "512" + "flowlet_idle_time": "256", + "max_flows": "512", + "primary_path_threshold": "100", + "alternative_path_cost": "250" } }, - "ARS_INTERFACE": { - "Ethernet1": {"scaling_factor": "100"}, - "Ethernet3": {}, - "Ethernet10":{} - }, - "MEMORY_STATISTICS": { - "memory_statistics": { - "enabled": "false", - "sampling_interval": "5", - "retention_period": "15" + "ARS_NEXTHOP": { + "default|1.1.1.10": { + "ars_obj_name": "ars_obj_name" + }, + "default|2.2.2.20": { + "ars_obj_name": "ars_obj_name", + "role": "alternative_path" + }, + "default|3.3.3.30": { + "ars_obj_name": "ars_obj_name" } }, - "ASIC_SENSORS": { - "ASIC_SENSORS_POLLER_INTERVAL": { - "interval": "10" + "ARS_INTERFACE": { + "Ethernet0": { + "scaling_factor": "100", + "ars_obj_name": "ars_obj_name" }, - "ASIC_SENSORS_POLLER_STATUS": { - "admin_status": "enable" - } + "Ethernet8": {} } }, "SAMPLE_CONFIG_DB_UNKNOWN": { diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests/ars.json b/src/sonic-yang-models/tests/yang_model_tests/tests/ars.json index 2a5e6c8347b..df5c0bd630e 100644 --- a/src/sonic-yang-models/tests/yang_model_tests/tests/ars.json +++ b/src/sonic-yang-models/tests/yang_model_tests/tests/ars.json @@ -6,25 +6,32 @@ "desc": "ARS configuration with more than one profile ARS_PROFILE_LIST table.", "eStr": "Too many ARS_PROFILE_LIST elements." }, + "ARS_TEST_INTERFACE_INVALID_LINK": { + "desc": "Interface configuration with invalid name in ARS_INTERFACE_LIST table.", + "eStrKey": "InvalidValue", + "eStr": [ + "if_name" + ] + }, "ARS_TEST_OBJECT_INVALID_MODE": { - "desc": "Object configuration with invalid mode value in ARS_OBJECT_LIST table.", + "desc": "ARS_OBJECT configuration with an invalid value for 'assign_mode'.", "eStrKey": "InvalidValue", "eStr": [ "assign_mode" ] }, - "ARS_PREFIX_TEST_INVALID_PREFIX": { - "desc": "Prefix configuration with invalid value in ARS_NEXTHOP_GROUP_LIST table.", + "ARS_TEST_OBJECT_REFERENCE_IN_PROFILE_INVALID": { + "desc": "Verify that default_ars_object reference fails when target object is missing.", "eStrKey": "InvalidValue", "eStr": [ - "ip_prefix" + "default_ars_object" ] }, - "ARS_INTERFACE_TEST_INVALID_LINK": { - "desc": "Interface configuration with invalid name in ARS_INTERFACE_LIST table.", + "ARS_TEST_NEXTHOP_INVALID_IP": { + "desc": "Verify nexthop_ip fails validation when an invalid IP address is used.", "eStrKey": "InvalidValue", "eStr": [ - "if_name" + "nexthop_ip" ] } } diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests_config/ars.json b/src/sonic-yang-models/tests/yang_model_tests/tests_config/ars.json index a073b028d28..3c05b5848d7 100755 --- a/src/sonic-yang-models/tests/yang_model_tests/tests_config/ars.json +++ b/src/sonic-yang-models/tests/yang_model_tests/tests_config/ars.json @@ -42,7 +42,9 @@ { "profile_name": "global", "algorithm": "ewma", - "max_flows": "2048" + "max_flows": "2048", + "ars_nhg_path_selector_mode": "interface", + "ars_lag_path_selector_mode": "interface" } ] }, @@ -57,20 +59,22 @@ "scaling_factor": "1000" }] }, - "sonic-ars:ARS_NEXTHOP_GROUP": { - "ARS_NEXTHOP_GROUP_LIST": [ + "sonic-ars:ARS_NEXTHOP": { + "ARS_NEXTHOP_LIST": [ { "vrf_name": "default", - "ip_prefix": "10.0.0.0/24", - "profile_name": "global", - "assign_mode": "per_flowlet_quality", - "max_flows": "512" + "nexthop_ip": "10.0.0.1" }, { "vrf_name": "default", - "ip_prefix": "10.1.0.0/24", - "profile_name": "global", - "assign_mode": "per_packet" + "nexthop_ip": "10.1.0.1" + }] + }, + "sonic-ars:ARS_OBJECT": { + "ARS_OBJECT_LIST": [ + { + "ars_obj_name": "ars_obj_name", + "assign_mode": "per_packet_quality" }] } } @@ -91,47 +95,49 @@ } } }, - "ARS_TEST_OBJECT_INVALID_MODE": { + "ARS_TEST_INTERFACE_INVALID_LINK": { "sonic-ars:sonic-ars": { - "sonic-ars:ARS_PROFILE": { - "ARS_PROFILE_LIST": [ + "sonic-ars:ARS_INTERFACE": { + "ARS_INTERFACE_LIST": [ { - "profile_name": "group1", - "algorithm": "ewma" + "if_name": "EthernetXXX" } ] - }, - "sonic-ars:ARS_NEXTHOP_GROUP": { - "ARS_NEXTHOP_GROUP_LIST": [ + } + } + }, + "ARS_TEST_OBJECT_INVALID_MODE": { + "sonic-ars:sonic-ars": { + "sonic-ars:ARS_OBJECT": { + "ARS_OBJECT_LIST": [ { - "vrf_name": "default", - "ip_prefix": "10.1.0.0/24", - "profile_name": "group1", - "assign_mode": "illegal_mode" + "ars_obj_name": "ars_obj_default", + "assign_mode": "invalid_mode_value" } ] } } }, - "ARS_PREFIX_TEST_INVALID_PREFIX": { + "ARS_TEST_OBJECT_REFERENCE_IN_PROFILE_INVALID": { "sonic-ars:sonic-ars": { - "sonic-ars:ARS_NEXTHOP_GROUP": { - "ARS_NEXTHOP_GROUP_LIST": [ + "sonic-ars:ARS_PROFILE": { + "ARS_PROFILE_LIST": [ { - "vrf_name": "default", - "ip_prefix": "invalid_prefix", - "profile_name": "global" + "profile_name": "group1", + "algorithm": "ewma", + "default_ars_object": "ars_obj_default" } ] } } }, - "ARS_INTERFACE_TEST_INVALID_LINK": { + "ARS_TEST_NEXTHOP_INVALID_IP": { "sonic-ars:sonic-ars": { - "sonic-ars:ARS_INTERFACE": { - "ARS_INTERFACE_LIST": [ + "sonic-ars:ARS_NEXTHOP": { + "ARS_NEXTHOP_LIST": [ { - "if_name": "EthernetXXX" + "vrf_name": "default", + "nexthop_ip": "300.1.2.3" } ] } diff --git a/src/sonic-yang-models/yang-models/sonic-ars.yang b/src/sonic-yang-models/yang-models/sonic-ars.yang index 75f50ecab55..2e1a37072d0 100644 --- a/src/sonic-yang-models/yang-models/sonic-ars.yang +++ b/src/sonic-yang-models/yang-models/sonic-ars.yang @@ -32,180 +32,238 @@ module sonic-ars { description "SONIC Adaptive Routing and Switching"; - revision 2024-10-01 { - description - "Initial revision."; + revision 2025-10-30 { + description "Initial revision of ARS YANG model."; } container sonic-ars { - - container ARS_PROFILE { - - list ARS_PROFILE_LIST { - - key "profile_name"; - max-elements 1; - - leaf profile_name { - description "ARS Profile Name"; - type string; - } - - leaf algorithm { - description "ARS quality algorithm"; - type enumeration { - enum ewma { - description "Exponentially Weighted Moving Average algorithm"; - } - } - } - - leaf max_flows { - type uint32; - description "Maximum number of flows that can be maintained per ARS profile."; - } - - leaf sampling_interval { - type uint32; - description "Sampling interval in microseconds for quality measure computation."; - } - - leaf past_load_min_value { - type uint16; - description "Past load min value."; - } - - leaf past_load_max_value { - type uint16; - description "Past load max value."; - } - - leaf past_load_weight { - type uint16; - description "Past load weight."; - } - - leaf future_load_min_value { - type uint16; - description "Future load min value."; - } - - leaf future_load_max_value { - type uint16; - description "Future load max value."; - } - - leaf future_load_weight { - type uint16; - description "Future load weight."; - } - - leaf current_load_min_value { - type uint16; - description "Current load min value."; - } - - leaf current_load_max_value { - type uint16; - description "Current load max value."; - } - - leaf ipv4_enable { - type boolean; - description "Whether ARS is enabled over IPv4 packets"; - } - - leaf ipv6_enable { - type boolean; - description "Whether ARS is enabled over IPv6 packets"; - } - } - /* end of list ARS_PORIFLE_LIST */ - } - /* end of container ARS_PORIFLE */ - - container ARS_INTERFACE { - - list ARS_INTERFACE_LIST { - description "List of interfaces participating in ARS"; - key "if_name"; - - leaf if_name { - type union { - type leafref { - path "/port:sonic-port/port:PORT/port:PORT_LIST/port:name"; - } - } - description "ARS-enabled interface name"; - } - - leaf scaling_factor { - type uint32; - default "10000"; - description "This factor used to normalize load measurements across ports with different speeds."; - } - } - /* end of list ARS_INTERFACE_LIST */ - } - /* end of container ARS_INTERFACE */ - - container ARS_NEXTHOP_GROUP { - - description "ARS-enabled Nexthop Groups"; - - list ARS_NEXTHOP_GROUP_LIST { - - key "vrf_name ip_prefix"; - - leaf vrf_name { - type union { - type string { - pattern "default"; - } - type leafref { - path "/vrf:sonic-vrf/vrf:VRF/vrf:VRF_LIST/vrf:name"; - } - } - description "VRF name"; - } - - leaf ip_prefix{ - type stypes:sonic-ip-prefix; - description "Ip prefix which identifies nexthop group for which ARS behavior is desired"; - } - - leaf profile_name { - description "ARS profile Name"; - type leafref { - path "/sars:sonic-ars/sars:ARS_PROFILE/sars:ARS_PROFILE_LIST/sars:profile_name"; - } - } - - leaf assign_mode { - type enumeration { - enum per_flowlet_quality{ - description "Per flow-let assignment based on flow quality"; - } - enum per_packet { - description "Per packet flow assignment based on port load"; - } - } - } - - leaf flowlet_idle_time { - type uint16 { - range 2..2047; - } - description "Idle duration in microseconds. This duration is to classifying a flow-let in a macro flow."; - } - - leaf max_flows { - type uint32; - description "Maximum number of flow states that can be maintained per ARS object."; - } - } - /* end of list ARS_NEXTHOP_GROUP_LIST */ - } - /* end of container ARS_NEXTHOP_GROUP */ - } + container ARS_PROFILE { + list ARS_PROFILE_LIST { + key "profile_name"; + max-elements 1; + leaf profile_name { + description "ARS Profile Name"; + type string; + } + leaf algorithm { + description "ARS quality algorithm"; + type enumeration { + enum ewma { + description "Exponentially Weighted Moving Average algorithm"; + } + } + } + leaf ars_nhg_path_selector_mode { + description "ARS selection mode for nexthop (global/interface/nexthop)"; + type enumeration { + enum global { + description "ARS object selection is global."; + } + enum interface { + description "Uses list of configured interfaces for ARS object selection."; + } + enum nexthop { + description "Uses list of configured nexthops for ARS object selection."; + } + } + default "interface"; + } + + leaf ars_lag_path_selector_mode { + description "ARS selection mode for LAG (global/interface)"; + type enumeration { + enum global { + description "ARS LAG selection is global."; + } + enum interface { + description "Uses list of configured interfaces for ARS LAG selection."; + } + } + default "interface"; + } + + leaf default_ars_object { + description "Default ARS object name for both nexthop group and LAG."; + type leafref { + path "/sars:sonic-ars/sars:ARS_OBJECT/sars:ARS_OBJECT_LIST/sars:ars_obj_name"; + } + } + + leaf max_flows { + type uint32; + description "Maximum number of flows that can be maintained per ARS profile."; + } + + leaf sampling_interval { + type uint32; + description "Sampling interval in microseconds for quality measure computation."; + } + + leaf past_load_min_value { + type uint16; + description "Past load min value."; + } + + leaf past_load_max_value { + type uint16; + description "Past load max value."; + } + + leaf past_load_weight { + type uint16; + description "Past load weight."; + } + + leaf future_load_min_value { + type uint16; + description "Future load min value."; + } + + leaf future_load_max_value { + type uint16; + description "Future load max value."; + } + + leaf future_load_weight { + type uint16; + description "Future load weight."; + } + + leaf current_load_min_value { + type uint16; + description "Current load min value."; + } + + leaf current_load_max_value { + type uint16; + description "Current load max value."; + } + + leaf ipv4_enable { + type boolean; + description "Whether ARS is enabled over IPv4 packets"; + } + + leaf ipv6_enable { + type boolean; + description "Whether ARS is enabled over IPv6 packets"; + } + } + /* end of list ARS_PROFILE_LIST */ + } + /* end of container ARS_PROFILE */ + container ARS_INTERFACE { + list ARS_INTERFACE_LIST { + description "List of interfaces participating in ARS"; + key "if_name"; + leaf if_name { + type union { + type leafref { + path "/port:sonic-port/port:PORT/port:PORT_LIST/port:name"; + } + } + description "ARS-enabled interface name"; + } + + leaf scaling_factor { + type uint32; + default "1"; + description "This factor used to normalize load measurements across ports with different speeds."; + } + leaf ars_obj_name { + description "ARS object name, inherited from 'default_ars_object' unless explicitly configured."; + type leafref { + path "/sars:sonic-ars/sars:ARS_OBJECT/sars:ARS_OBJECT_LIST/sars:ars_obj_name"; + } + } + } + /* end of list ARS_INTERFACE_LIST */ + } + /* end of container ARS_INTERFACE */ + + container ARS_NEXTHOP { + description "ARS-enabled Nexthop Groups"; + list ARS_NEXTHOP_LIST { + key "vrf_name nexthop_ip"; + leaf vrf_name { + type union { + type string { + pattern "default"; + } + type leafref { + path "/vrf:sonic-vrf/vrf:VRF/vrf:VRF_LIST/vrf:name"; + } + } + description "VRF name"; + } + leaf nexthop_ip{ + type inet:ip-address; + description "Nexthop IP which is a member of a nexthop group for which ARS behavior is desired."; + } + leaf ars_obj_name { + description "ARS object name, inherited from 'default_ars_object' unless explicitly configured."; + type leafref { + path "/sars:sonic-ars/sars:ARS_OBJECT/sars:ARS_OBJECT_LIST/sars:ars_obj_name"; + } + } + + leaf role { + type enumeration { + enum primary_path { + description "Member is participating in primary path."; + } + enum alternative_path { + description "Member is participating in alternative path."; + } + } + default primary_path; + description "NHG member's role."; + } + } + /* end of list ARS_NEXTHOP_LIST */ + } + /* end of container ARS_NEXTHOP */ + container ARS_OBJECT { + description "ARS-enabled Object Groups"; + list ARS_OBJECT_LIST { + key "ars_obj_name"; + leaf ars_obj_name { + description "ARS Object Name"; + type string; + } + leaf assign_mode { + type enumeration { + enum per_flowlet_quality{ + description "Per flow-let assignment based on flow quality"; + } + enum per_packet_quality { + description "Per packet flow assignment based on port load"; + } + } + } + leaf flowlet_idle_time { + type uint16 { + range 2..2047; + } + description "Idle duration in microseconds. This duration is to classifying a flow-let in a macro flow."; + } + leaf max_flows { + type uint32; + description "Maximum number of flow states that can be maintained per ARS object."; + } + leaf primary_path_threshold { + type uint32; + default "16"; + description "Primary path metric threshold."; + } + leaf alternative_path_cost { + type uint32; + default "0"; + description "Alternative path cost."; + } + } + /* end of list ARS_OBJECT_LIST */ + } + /* end of container ARS_OBJECT */ + } } diff --git a/src/sonic-yang-models/yang-models/sonic-flex_counter.yang b/src/sonic-yang-models/yang-models/sonic-flex_counter.yang index 8d1cb10b478..123d1371517 100644 --- a/src/sonic-yang-models/yang-models/sonic-flex_counter.yang +++ b/src/sonic-yang-models/yang-models/sonic-flex_counter.yang @@ -401,22 +401,6 @@ module sonic-flex_counter { } - list ARS_NEXTHOP_GROUP_COUNTER_ROUTE_PATTERN_LIST { - - key "ip_prefix"; - - leaf ip_prefix { - type inet:ip-prefix; - } - - leaf max_match_count { - type uint32 { - range 1..50; - } - } - - } - list FLOW_COUNTER_ROUTE_PATTERN_VRF_LIST { key "vrf_name ip_prefix";