-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Buffer and qos j2 file modularization #21102
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
Buffer and qos j2 file modularization #21102
Conversation
Signed-off-by: Zhixin Zhu <[email protected]>
Signed-off-by: Zhixin Zhu <[email protected]>
/azp run Azure.sonic-buildimage |
Azure Pipelines successfully started running 1 pipeline(s). |
@@ -106,6 +115,9 @@ | |||
} | |||
}, | |||
{% endif %} | |||
{% if (generate_pfc_to_queue_map is defined) %} |
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.
Any case we need to define generate_pfc_to_queue_map rather than use the default 1-1 PFC to queue mapping?
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.
No specific override is defined. A placeholder for future.
@@ -82,7 +87,12 @@ def | |||
{%- if cable_len -%} | |||
{{ cable_len.0 }} | |||
{%- else %} | |||
{%- if 'torrouter' in switch_role.lower() and 'mgmt' not in switch_role.lower()%} |
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.
why we swap the if/else branch here?
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 to handle the scenario where a device (including tor router) may have backplane ports.
In such a case, set the cable length of backplane port before the tor router check.
@@ -188,7 +190,16 @@ def | |||
{%- if port_names_list_inactive.append(port) %}{%- endif %} | |||
{%- endfor %} | |||
{%- set port_names_inactive = port_names_list_inactive | join(',') %} | |||
|
|||
{%- set port_names_list_all = [] %} |
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.
Shall we move code line 194-198 under the if branch {% if (defs.generate_cable_length_config is defined) %} at line 200?
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.
yes, we can move under the if
Signed-off-by: Zhixin Zhu <[email protected]>
/azp run Azure.sonic-buildimage |
Azure Pipelines successfully started running 1 pipeline(s). |
@kevinwangsk FYI |
#21056 has similar change in qos_config.j2. |
Signed-off-by: Zhixin Zhu <[email protected]>
/azp run Azure.sonic-buildimage |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run Azure.sonic-buildimage |
Azure Pipelines successfully started running 1 pipeline(s). |
@kevinskwang @kperumalbfn FYI. |
@kevinskwang can you redo the /azp run Azure.sonic-buildimage |
/azp run |
Commenter does not have sufficient privileges for PR 21102 in repo sonic-net/sonic-buildimage |
For the failure in "Azure.sonic-buildimage (Test kvmtest-t1-lag by Elastictest)", couldn't access the log: https://dev.azure.com/mssonic/build/_build/results?buildId=758211 |
@kperumalbfn could you help to review this? |
/azp run |
Commenter does not have sufficient privileges for PR 21102 in repo sonic-net/sonic-buildimage |
@@ -82,7 +87,12 @@ def | |||
{%- if cable_len -%} | |||
{{ cable_len.0 }} | |||
{%- else %} | |||
{%- if 'torrouter' in switch_role.lower() and 'mgmt' not in switch_role.lower()%} | |||
{%- if port_name.startswith('Ethernet-BP') %} |
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.
@alpeshspatel Are these internal ports?
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.
Yes, Ethernet-BP are internal ports.
@@ -82,7 +87,12 @@ def | |||
{%- if cable_len -%} | |||
{{ cable_len.0 }} | |||
{%- else %} | |||
{%- if 'torrouter' in switch_role.lower() and 'mgmt' not in switch_role.lower()%} | |||
{%- if port_name.startswith('Ethernet-BP') %} | |||
{%- if 'internal' not in ports2cable %} |
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.
Is this only for T2?
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.
Ethernet-BP is mostly for T2.
Some T0/T1 devices also have Ethernet-BP interfaces.
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.
Ethernet-BP is also for some smartswitches too, @kperumalbfn
{%- set LOSSLESS_TC = [] %} | ||
{%- if generate_lossless_tc_list is defined %} | ||
{{- generate_lossless_tc_list(LOSSLESS_TC) }} | ||
{%- else %} |
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.
Thanks @alpeshspatel, this is good. If we need to have different set of LOSSLESS_TCs, we could use this macro inside SKUs.
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.
Yes Kumaresh - that is the intent
/azp run |
Commenter does not have sufficient privileges for PR 21102 in repo sonic-net/sonic-buildimage |
@kevinwangsk @kperumalbfn
Cannot see the logs as the run is pretty old (Jan 28) |
/azp run |
Commenter does not have sufficient privileges for PR 21102 in repo sonic-net/sonic-buildimage |
@kevinskwang "/azp run" failed. |
/azp run |
You have several pipelines (over 10) configured to build pull requests in this repository. Specify which pipelines you would like to run by using /azp run [pipelines] command. You can specify multiple pipelines using a comma separated list. |
/azp run Azure.sonic-buildimage |
Azure Pipelines successfully started running 1 pipeline(s). |
kvmtest-t0-sonic failed at snmpwalk timeout, not related with buffer/qos j2 files. test case: macsec/test_interop_protocol.py::TestInteropProtocol::test_snmp[128_SCI] https://elastictest.org/scheduler/publictestplan/67d9148414a0c3680c255abe |
{%- if 'torrouter' in switch_role.lower() and 'mgmt' not in switch_role.lower()%} | ||
{%- if port_name.startswith('Ethernet-BP') %} | ||
{%- if 'internal' not in ports2cable %} | ||
{%- set _ = ports2cable.update({'internal': '5m'}) %} |
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.
@zhixzhu @alpeshspatel Does internal port support lossless configs?
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.
@zhixzhu @alpeshspatel How about other QoS table mappings for internal ports?
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.
@kperumalbfn Internal ports (back plane ports) support lossless configs. Other qos table mappings are also applied to back plane ports, by adding back plane ports to PORT_ACTIVE list.
@kperumalbfn @kevinskwang should this have a 202411 label? |
Hi @kperumalbfn @kevinskwang should this have a 202411 label? |
Hi @kperumalbfn @kevinskwang @r12f |
Thanks @alpeshspatel @stephenxs added 202412 tag. |
Cherry-pick PR to msft-202412: Azure/sonic-buildimage-msft#994 |
Buffer and qos j2 file modularization
Why I did it
It usually requires update on both upstream j2 files and platform j2 files, when there is new configuration.
This change is intend to reduce changes in upstream j2 files in future.
Work item tracking
How I did it
For each config section, define a macro for it.
How to verify it
Verified with T0/T1/T2 config.
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)