On Mon, 15 Jan 2018 16:16:09 +0000
[email protected] wrote:
Looks like a good idea, minor editing feedback.
> - red_cfg->min_th = ((uint32_t) min_th) << (wq_log2 + RTE_RED_SCALING);
> - red_cfg->max_th = ((uint32_t) max_th) << (wq_log2 + RTE_RED_SCALING);
> - red_cfg->pa_const = (2 * (max_th - min_th) * maxp_inv) <<
> RTE_RED_SCALING;
> + red_cfg->min_th = ((uint32_t) min_th) << (wq_log2 + rte_red_scaling);
> + red_cfg->max_th = ((uint32_t) max_th) << (wq_log2 + rte_red_scaling);
While you are at it remove unnecessary parenthesis here.
> + red_cfg->pa_const = (2 * (max_th - min_th) * maxp_inv) <<
> + rte_red_scaling;
It reads easier if the the shift operator on the next line
red_cfg->pa_const = (2 * (max_th - min_th) * maxp_inv)
<< rte_red_scaling;
Why do functional tests have to be in same file and clutter the code?