This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "".
The branch, master has been updated via 160f71a48b5891b49a84cc849f08c1ff99d26b3f (commit) from 8b9783b7f5667b3a37f039222e06448af2eec070 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit 160f71a48b5891b49a84cc849f08c1ff99d26b3f Author: Dmitriy Krot globaxbiz@gmail.com Date: Fri May 12 03:00:13 2017 +0300
linux-gen: tm: fix wrr/wfq bug when weight=1
Usage of 0x10000 in the inverted weight calculation causes overflow of uint16_t if weight=1. As a result of this bug, frame len used for virtual finish time calculation is always zero, despite of packet size, so packets from input with weight=1 always pass first.
Signed-off-by: Dmitriy Krot globaxbiz@gmail.com Reviewed-and-tested-by: Bill Fischofer bill.fischofer@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/platform/linux-generic/odp_traffic_mngr.c b/platform/linux-generic/odp_traffic_mngr.c index 4e9358b9..a93b3ba9 100644 --- a/platform/linux-generic/odp_traffic_mngr.c +++ b/platform/linux-generic/odp_traffic_mngr.c @@ -3238,7 +3238,7 @@ static void tm_sched_params_cvt_to(odp_tm_sched_params_t *odp_sched_params, if (weight == 0) inv_weight = 0; else - inv_weight = 0x10000 / weight; + inv_weight = 0xFFFF / weight;
tm_sched_params->sched_modes[priority] = sched_mode; tm_sched_params->inverted_weights[priority] = inv_weight; @@ -3254,7 +3254,7 @@ static void tm_sched_params_cvt_from(tm_sched_params_t *tm_sched_params, for (priority = 0; priority < ODP_TM_MAX_PRIORITIES; priority++) { sched_mode = tm_sched_params->sched_modes[priority]; inv_weight = tm_sched_params->inverted_weights[priority]; - weight = 0x10000 / inv_weight; + weight = 0xFFFF / inv_weight;
odp_sched_params->sched_modes[priority] = sched_mode; odp_sched_params->sched_weights[priority] = weight;
-----------------------------------------------------------------------
Summary of changes: platform/linux-generic/odp_traffic_mngr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
hooks/post-receive