-
Notifications
You must be signed in to change notification settings - Fork 558
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Move QoS configuration to config DB #378
Merged
Merged
Changes from 1 commit
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,15 +41,15 @@ map<string, sai_port_attr_t> qos_to_attr_map = { | |
}; | ||
|
||
type_map QosOrch::m_qos_maps = { | ||
{APP_DSCP_TO_TC_MAP_TABLE_NAME, new object_map()}, | ||
{APP_TC_TO_QUEUE_MAP_TABLE_NAME, new object_map()}, | ||
{APP_SCHEDULER_TABLE_NAME, new object_map()}, | ||
{APP_WRED_PROFILE_TABLE_NAME, new object_map()}, | ||
{APP_PORT_QOS_MAP_TABLE_NAME, new object_map()}, | ||
{APP_QUEUE_TABLE_NAME, new object_map()}, | ||
{APP_TC_TO_PRIORITY_GROUP_MAP_NAME, new object_map()}, | ||
{APP_PFC_PRIORITY_TO_PRIORITY_GROUP_MAP_NAME, new object_map()}, | ||
{APP_PFC_PRIORITY_TO_QUEUE_MAP_NAME, new object_map()} | ||
{CFG_DSCP_TO_TC_MAP_TABLE_NAME, new object_map()}, | ||
{CFG_TC_TO_QUEUE_MAP_TABLE_NAME, new object_map()}, | ||
{CFG_SCHEDULER_TABLE_NAME, new object_map()}, | ||
{CFG_WRED_PROFILE_TABLE_NAME, new object_map()}, | ||
{CFG_PORT_QOS_MAP_TABLE_NAME, new object_map()}, | ||
{CFG_QUEUE_TABLE_NAME, new object_map()}, | ||
{CFG_TC_TO_PRIORITY_GROUP_MAP_TABLE_NAME, new object_map()}, | ||
{CFG_PFC_PRIORITY_TO_PRIORITY_GROUP_MAP_TABLE_NAME, new object_map()}, | ||
{CFG_PFC_PRIORITY_TO_QUEUE_MAP_TABLE_NAME, new object_map()} | ||
}; | ||
|
||
task_process_status QosMapHandler::processWorkItem(Consumer& consumer) | ||
|
@@ -744,16 +744,16 @@ void QosOrch::initAclEntryForEcn(sai_object_id_t acl_table_id, sai_uint32_t prio | |
void QosOrch::initTableHandlers() | ||
{ | ||
SWSS_LOG_ENTER(); | ||
m_qos_handler_map.insert(qos_handler_pair(APP_DSCP_TO_TC_MAP_TABLE_NAME, &QosOrch::handleDscpToTcTable)); | ||
m_qos_handler_map.insert(qos_handler_pair(APP_TC_TO_QUEUE_MAP_TABLE_NAME, &QosOrch::handleTcToQueueTable)); | ||
m_qos_handler_map.insert(qos_handler_pair(APP_SCHEDULER_TABLE_NAME, &QosOrch::handleSchedulerTable)); | ||
m_qos_handler_map.insert(qos_handler_pair(APP_QUEUE_TABLE_NAME, &QosOrch::handleQueueTable)); | ||
m_qos_handler_map.insert(qos_handler_pair(APP_PORT_QOS_MAP_TABLE_NAME, &QosOrch::handlePortQosMapTable)); | ||
m_qos_handler_map.insert(qos_handler_pair(APP_WRED_PROFILE_TABLE_NAME, &QosOrch::handleWredProfileTable)); | ||
|
||
m_qos_handler_map.insert(qos_handler_pair(APP_TC_TO_PRIORITY_GROUP_MAP_NAME, &QosOrch::handleTcToPgTable)); | ||
m_qos_handler_map.insert(qos_handler_pair(APP_PFC_PRIORITY_TO_PRIORITY_GROUP_MAP_NAME, &QosOrch::handlePfcPrioToPgTable)); | ||
m_qos_handler_map.insert(qos_handler_pair(APP_PFC_PRIORITY_TO_QUEUE_MAP_NAME, &QosOrch::handlePfcToQueueTable)); | ||
m_qos_handler_map.insert(qos_handler_pair(CFG_DSCP_TO_TC_MAP_TABLE_NAME, &QosOrch::handleDscpToTcTable)); | ||
m_qos_handler_map.insert(qos_handler_pair(CFG_TC_TO_QUEUE_MAP_TABLE_NAME, &QosOrch::handleTcToQueueTable)); | ||
m_qos_handler_map.insert(qos_handler_pair(CFG_SCHEDULER_TABLE_NAME, &QosOrch::handleSchedulerTable)); | ||
m_qos_handler_map.insert(qos_handler_pair(CFG_QUEUE_TABLE_NAME, &QosOrch::handleQueueTable)); | ||
m_qos_handler_map.insert(qos_handler_pair(CFG_PORT_QOS_MAP_TABLE_NAME, &QosOrch::handlePortQosMapTable)); | ||
m_qos_handler_map.insert(qos_handler_pair(CFG_WRED_PROFILE_TABLE_NAME, &QosOrch::handleWredProfileTable)); | ||
|
||
m_qos_handler_map.insert(qos_handler_pair(CFG_TC_TO_PRIORITY_GROUP_MAP_TABLE_NAME, &QosOrch::handleTcToPgTable)); | ||
m_qos_handler_map.insert(qos_handler_pair(CFG_PFC_PRIORITY_TO_PRIORITY_GROUP_MAP_TABLE_NAME, &QosOrch::handlePfcPrioToPgTable)); | ||
m_qos_handler_map.insert(qos_handler_pair(CFG_PFC_PRIORITY_TO_QUEUE_MAP_TABLE_NAME, &QosOrch::handlePfcToQueueTable)); | ||
} | ||
|
||
task_process_status QosOrch::handleSchedulerTable(Consumer& consumer) | ||
|
@@ -764,7 +764,7 @@ task_process_status QosOrch::handleSchedulerTable(Consumer& consumer) | |
sai_object_id_t sai_object = SAI_NULL_OBJECT_ID; | ||
|
||
KeyOpFieldsValuesTuple tuple = consumer.m_toSync.begin()->second; | ||
string qos_map_type_name = APP_SCHEDULER_TABLE_NAME; | ||
string qos_map_type_name = CFG_SCHEDULER_TABLE_NAME; | ||
string qos_object_name = kfvKey(tuple); | ||
string op = kfvOp(tuple); | ||
|
||
|
@@ -1014,7 +1014,7 @@ task_process_status QosOrch::handleQueueTable(Consumer& consumer) | |
|
||
ref_resolve_status resolve_result; | ||
// sample "QUEUE_TABLE:ETHERNET4:1" | ||
tokens = tokenize(key, delimiter); | ||
tokens = tokenize(key, delimiter2); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The example doesn't match the code change here. Can you also update the example? |
||
if (tokens.size() != 2) | ||
{ | ||
SWSS_LOG_ERROR("malformed key:%s. Must contain 2 tokens", key.c_str()); | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
delimiter2 doesn't tell what it is separating, can you give it a more meaningful name? like field_delimiter if it is separating fields, or attr_delimiter if it is separating attributes, for example.