aboutsummaryrefslogtreecommitdiffstats
path: root/vnet/vnet/policer/xlate.c
diff options
context:
space:
mode:
Diffstat (limited to 'vnet/vnet/policer/xlate.c')
-rw-r--r--vnet/vnet/policer/xlate.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/vnet/vnet/policer/xlate.c b/vnet/vnet/policer/xlate.c
index 61976b1cbde..c9250eb8d87 100644
--- a/vnet/vnet/policer/xlate.c
+++ b/vnet/vnet/policer/xlate.c
@@ -1238,11 +1238,11 @@ sse2_pol_convert_hw_to_cfg_params (sse2_qos_pol_hw_params_st *hw,
return EINVAL;
}
- temp_rate = ((hw->avg_rate_man << hw->rate_exp) * 8LL *
+ temp_rate = (((uint64_t) hw->avg_rate_man << hw->rate_exp) * 8LL *
SSE2_QOS_POL_TICKS_PER_SEC)/1000;
cfg->rb.kbps.cir_kbps = (uint32_t)temp_rate;
- temp_rate = ((hw->peak_rate_man << hw->rate_exp) * 8LL *
+ temp_rate = (((uint64_t) hw->peak_rate_man << hw->rate_exp) * 8LL *
SSE2_QOS_POL_TICKS_PER_SEC)/1000;
cfg->rb.kbps.eir_kbps = (uint32_t)temp_rate;