Skip to content

Commit

Permalink
Add configuration optimization to run SONiC on DPU (#18807)
Browse files Browse the repository at this point in the history
- Why I did it
The Appliance DPU supports a limited subset of the configuration defined in the SONiC DASH HLD.
Configure SWSS and GMNI to communicate on the Appliance DPU.
Add a sample configuration for the appliance topology.

- How I did it
Disable configuration unsupported by the Appliance DPU based on the device type.

- How to verify it
Run VNET-to-VNET sonic-mgmt test.
  • Loading branch information
oleksandrivantsiv authored May 16, 2024
1 parent 2a3bdb6 commit c5a2eba
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions dockers/docker-orchagent/ipinip.json.j2
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{% if DEVICE_METADATA['localhost']['switch_type'] == "dpu" %}
[]
{% else %}
{% set ipv4_addresses = [] %}
{% set ipv6_addresses = [] %}
{% set ipv4_loopback_addresses = [] %}
Expand Down Expand Up @@ -77,3 +80,5 @@
}
{% endif %}
]
{% endif %}

2 changes: 2 additions & 0 deletions dockers/docker-orchagent/switch.json.j2
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,15 @@
[
{
"SWITCH_TABLE:switch": {
{% if not DEVICE_METADATA.localhost.switch_type or DEVICE_METADATA.localhost.switch_type != "dpu" %}
"ecmp_hash_seed": "{{ hash_seed_value }}",
"lag_hash_seed": "{{ hash_seed_value }}",
"fdb_aging_time": "600",
{% if DEVICE_METADATA.localhost.type and "LeafRouter" in DEVICE_METADATA.localhost.type %}
"ordered_ecmp": "true"
{% else %}
"ordered_ecmp": "false"
{% endif %}
{% endif %}
},
"OP": "SET"
Expand Down
4 changes: 4 additions & 0 deletions dockers/docker-platform-monitor/docker_init.j2
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ if [ -e $SENSORS_CONF_PATH_GETTER ]; then
fi
{% endif %}

{% if CONFIGURED_PLATFORM == "nvidia-bluefield" %}
mount -t debugfs none /sys/kernel/debug
{% endif %}

if [ -e $SENSORS_CONF_FILE ]; then
HAVE_SENSORS_CONF=1
mkdir -p /etc/sensors.d
Expand Down

0 comments on commit c5a2eba

Please sign in to comment.