Skip to content

Commit

Permalink
[qosorch] converting shaper bandwidth value to unsigned long instead …
Browse files Browse the repository at this point in the history
…of int (#1167)

For higher shaper rates greater than 20Gbps, integer is not sufficient. So I changed the conversion function to stoul()

Signed-off-by: Sabareesh Kumar Anandan <sanandan@marvell.com>
  • Loading branch information
Sabareesh-Kumar-Anandan authored and lguohan committed Jan 30, 2020
1 parent 84415f6 commit 8f4c54a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions orchagent/qosorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -816,25 +816,25 @@ task_process_status QosOrch::handleSchedulerTable(Consumer& consumer)
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));
attr.value.u64 = stoul(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));
attr.value.u64 = stoul(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));
attr.value.u64 = stoul(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));
attr.value.u64 = stoul(fvValue(*i));
sai_attr_list.push_back(attr);
}
else {
Expand Down

0 comments on commit 8f4c54a

Please sign in to comment.