-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add configuration optimization to run SONiC on DPU #18807
Add configuration optimization to run SONiC on DPU #18807
Conversation
@@ -86,6 +86,9 @@ if [[ x"${LOCALHOST_SUBTYPE}" == x"SmartSwitch" ]]; then | |||
else | |||
ORCHAGENT_ARGS+=" -q tcp://127.0.0.1:8100" | |||
fi | |||
# Enable ZMQ for DPU Appliance | |||
elif [[ x"${LOCALHOST_SUBTYPE}" == x"Appliance" ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see a subtype 'Appliance'. It should be 'SmartSwitch' for both npu and dpu. @Pterosaur
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Appliance
is not needed. I removed the changes.
LOCALHOST_SUBTYPE=`sonic-db-cli CONFIG_DB hget "DEVICE_METADATA|localhost" "subtype"` | ||
if [[ x"${LOCALHOST_SUBTYPE}" == x"SmartSwitch" ]]; then | ||
if [[ x"${LOCALHOST_SUBTYPE}" == x"SmartSwitch" || x"${LOCALHOST_SUBTYPE}" == x"Appliance" ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above, please remove
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Appliance
is not needed. I removed the changes.
def generate_appliance_config(data): | ||
data['DEVICE_METADATA']['localhost']['hostname'] = 'sonic' | ||
data['DEVICE_METADATA']['localhost']['switch_type'] = 'dpu' | ||
data['DEVICE_METADATA']['localhost']['type'] = 'SonicHost' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is SonicDpu
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed this file from the PR. I'll raise another PR after we close the question with the default topology name for the DPU.
57030c8
to
bd11dd1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
@prsunny please help to review the ms_conflict checker and please let us know what is the next step to have this PR included |
@liat-grozovik , @oleksandrivantsiv , working on the conflict. Will merge after the conflict is resolved |
@@ -18,13 +18,15 @@ | |||
[ | |||
{ | |||
"SWITCH_TABLE:switch": { | |||
{% if DEVICE_METADATA.localhost.switch_type != "dpu" %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add modify to this - {% if DEVICE_METADATA.localhost.switch_type and DEVICE_METADATA.localhost.switch_type != "dpu" %}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By default, this configuration should be enabled. We want to disable it only for DPU.
The switch_type
attribute in DEVICE_METADATA table is optional. When the attribute is missing the assumption is that the type is switch
. The condition for this should be the following:
{% if not DEVICE_METADATA.localhost.switch_type or DEVICE_METADATA.localhost.switch_type != "dpu" %}
@prsunny can you please confirm this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@oleksandrivantsiv , I feel thats still not going to achieve the intended functionality with 'or'. One condition will be true when swtich_type is present even with 'dpu' and continues with setting attributes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@prsunny , please faciltate to address ms_conflict test failure. |
/azpw ms_conflict |
bd11dd1
to
da0bc18
Compare
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.Work item tracking
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.
Which release branch to backport (provide reason below if selected)
Tested branch (Please provide the tested image version)
Description for the changelog
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)