Skip to content
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

[CBF] Added configuration templates to generate configs for CBF #8689

Merged
merged 4 commits into from
Oct 30, 2021
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 82 additions & 0 deletions files/build_templates/cbf_config.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
{
"DSCP_TO_TC_MAP": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DSCP_TO_TC_MAP is already used by qos_config.j2.

If the intention is to use the same mapping, no need to add here. QoS config generation will create the config for DSCP_TO_TC_MAP. Having in two places will result in race condition where the last config generation will overwrite the DSCP_TO_TC_MAP.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this DSCP_TO_FC_MAP ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a mistake I've made while updating the dscp mapping to cover all 64 associations. CBF has to have its own separate mapping. I've updated it to DSCP_TO_FC_MAP, as it should be.

"AZURE": {
"0" : "1",
"1" : "1",
"2" : "1",
"3" : "3",
"4" : "4",
"5" : "2",
"6" : "1",
"7" : "1",
"8" : "0",
"9" : "1",
"10": "1",
"11": "1",
"12": "1",
"13": "1",
"14": "1",
"15": "1",
"16": "1",
"17": "1",
"18": "1",
"19": "1",
"20": "1",
"21": "1",
"22": "1",
"23": "1",
"24": "1",
"25": "1",
"26": "1",
"27": "1",
"28": "1",
"29": "1",
"30": "1",
"31": "1",
"32": "1",
"33": "1",
"34": "1",
"35": "1",
"36": "1",
"37": "1",
"38": "1",
"39": "1",
"40": "1",
"41": "1",
"42": "1",
"43": "1",
"44": "1",
"45": "1",
"46": "5",
"47": "1",
"48": "6",
"49": "1",
"50": "1",
"51": "1",
"52": "1",
"53": "1",
"54": "1",
"55": "1",
"56": "1",
"57": "1",
"58": "1",
"59": "1",
"60": "1",
"61": "1",
"62": "1",
"63": "1"
}
},
"EXP_TO_FC_MAP": {
"AZURE": {
"0": "0",
"1": "1",
"2": "2",
"3": "3",
"4": "4",
"5": "5",
"6": "6",
"7": "7"
}
}
}
1 change: 1 addition & 0 deletions rules/scripts.dep
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ $(CONFIGDB_LOAD_SCRIPT)_CACHE_MODE := none
$(BUFFERS_CONFIG_TEMPLATE)_CACHE_MODE := none
$(UPDATE_PROC_VARIABLES_SCRIPT)_CACHE_MODE := none
$(QOS_CONFIG_TEMPLATE)_CACHE_MODE := none
$(CBF_CONFIG_TEMPLATE)_CACHE_MODE := none
$(SUPERVISOR_PROC_EXIT_LISTENER_SCRIPT)_CACHE_MODE := none
$(COPP_CONFIG_TEMPLATE)_CACHE_MODE := none
4 changes: 4 additions & 0 deletions rules/scripts.mk
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ $(BUFFERS_CONFIG_TEMPLATE)_PATH = files/build_templates
QOS_CONFIG_TEMPLATE = qos_config.j2
$(QOS_CONFIG_TEMPLATE)_PATH = files/build_templates

CBF_CONFIG_TEMPLATE = cbf_config.j2
$(CBF_CONFIG_TEMPLATE)_PATH = files/build_templates

SUPERVISOR_PROC_EXIT_LISTENER_SCRIPT = supervisor-proc-exit-listener
$(SUPERVISOR_PROC_EXIT_LISTENER_SCRIPT)_PATH = files/scripts

Expand All @@ -34,6 +37,7 @@ SONIC_COPY_FILES += $(CONFIGDB_LOAD_SCRIPT) \
$(ARP_UPDATE_VARS_TEMPLATE) \
$(BUFFERS_CONFIG_TEMPLATE) \
$(QOS_CONFIG_TEMPLATE) \
$(CBF_CONFIG_TEMPLATE) \
$(SUPERVISOR_PROC_EXIT_LISTENER_SCRIPT) \
$(SYSCTL_NET_CONFIG) \
$(UPDATE_CHASSISDB_CONFIG_SCRIPT) \
Expand Down