Skip to content

Commit 8f4c54a

Browse files
Sabareesh-Kumar-Anandanlguohan
authored andcommitted
[qosorch] converting shaper bandwidth value to unsigned long instead 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 <[email protected]>
1 parent 84415f6 commit 8f4c54a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

orchagent/qosorch.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -816,25 +816,25 @@ task_process_status QosOrch::handleSchedulerTable(Consumer& consumer)
816816
else if (fvField(*i) == scheduler_min_bandwidth_rate_field_name)
817817
{
818818
attr.id = SAI_SCHEDULER_ATTR_MIN_BANDWIDTH_RATE;
819-
attr.value.u64 = (uint64_t)stoi(fvValue(*i));
819+
attr.value.u64 = stoul(fvValue(*i));
820820
sai_attr_list.push_back(attr);
821821
}
822822
else if (fvField(*i) == scheduler_min_bandwidth_burst_rate_field_name)
823823
{
824824
attr.id = SAI_SCHEDULER_ATTR_MIN_BANDWIDTH_BURST_RATE;
825-
attr.value.u64 = (uint64_t)stoi(fvValue(*i));
825+
attr.value.u64 = stoul(fvValue(*i));
826826
sai_attr_list.push_back(attr);
827827
}
828828
else if (fvField(*i) == scheduler_max_bandwidth_rate_field_name)
829829
{
830830
attr.id = SAI_SCHEDULER_ATTR_MAX_BANDWIDTH_RATE;
831-
attr.value.u64 = (uint64_t)stoi(fvValue(*i));
831+
attr.value.u64 = stoul(fvValue(*i));
832832
sai_attr_list.push_back(attr);
833833
}
834834
else if (fvField(*i) == scheduler_max_bandwidth_burst_rate_field_name)
835835
{
836836
attr.id = SAI_SCHEDULER_ATTR_MAX_BANDWIDTH_BURST_RATE;
837-
attr.value.u64 = (uint64_t)stoi(fvValue(*i));
837+
attr.value.u64 = stoul(fvValue(*i));
838838
sai_attr_list.push_back(attr);
839839
}
840840
else {

0 commit comments

Comments
 (0)