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

[qosorch]: Add cir and pir parameters for scheduler #991

Merged
merged 4 commits into from
Jul 25, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
24 changes: 24 additions & 0 deletions orchagent/qosorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -869,6 +869,30 @@ task_process_status QosOrch::handleSchedulerTable(Consumer& consumer)
// TODO: The meaning is to be able to adjus priority of the given scheduler group.
// However currently SAI model does not provide such ability.
}
else if (fvField(*i) == scheduler_min_bandwidth_rate_field_name)
{
attr.id = SAI_SCHEDULER_ATTR_MIN_BANDWIDTH_RATE;
attr.value.u64 = (uint64_t)stoi(fvValue(*i));
sai_attr_list.push_back(attr);
}
else if (fvField(*i) == scheduler_min_bandwidth_burst_rate_field_name)
{
attr.id = SAI_SCHEDULER_ATTR_MIN_BANDWIDTH_BURST_RATE;
attr.value.u64 = (uint64_t)stoi(fvValue(*i));
sai_attr_list.push_back(attr);
}
else if (fvField(*i) == scheduler_max_bandwidth_rate_field_name)
{
attr.id = SAI_SCHEDULER_ATTR_MAX_BANDWIDTH_RATE;
attr.value.u64 = (uint64_t)stoi(fvValue(*i));
sai_attr_list.push_back(attr);
}
else if (fvField(*i) == scheduler_max_bandwidth_burst_rate_field_name)
{
attr.id = SAI_SCHEDULER_ATTR_MAX_BANDWIDTH_BURST_RATE;
attr.value.u64 = (uint64_t)stoi(fvValue(*i));
sai_attr_list.push_back(attr);
}
else {
SWSS_LOG_ERROR("Unknown field:%s", fvField(*i).c_str());
return task_process_status::task_invalid_entry;
Expand Down
5 changes: 5 additions & 0 deletions orchagent/qosorch.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ const string scheduler_algo_STRICT = "STRICT";
const string scheduler_weight_field_name = "weight";
const string scheduler_priority_field_name = "priority";

const string scheduler_min_bandwidth_rate_field_name = "cir";
tengfei-astfs marked this conversation as resolved.
Show resolved Hide resolved
const string scheduler_min_bandwidth_burst_rate_field_name = "cbs";
const string scheduler_max_bandwidth_rate_field_name = "pir";
const string scheduler_max_bandwidth_burst_rate_field_name = "pbs";

const string ecn_field_name = "ecn";
const string ecn_none = "ecn_none";
const string ecn_red = "ecn_red";
Expand Down