* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* * Neither the name of Intel Corporation nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
* * Neither the name of Intel Corporation nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
uint32_t *qconfig; /**< Configuration of RTE_RED queues for test */
uint32_t *q; /**< Queue size */
uint32_t q_ramp_up; /**< Num of enqueues to ramp up the queue */
uint32_t *qconfig; /**< Configuration of RTE_RED queues for test */
uint32_t *q; /**< Queue size */
uint32_t q_ramp_up; /**< Num of enqueues to ramp up the queue */
uint32_t avg_tolerance; /**< Tolerance in queue average */
double drop_tolerance; /**< Drop tolerance of packets not enqueued */
};
uint32_t avg_tolerance; /**< Tolerance in queue average */
double drop_tolerance; /**< Drop tolerance of packets not enqueued */
};
static struct rte_red_config ft_wrconfig[1];
static struct rte_red ft_rtdata[1];
static uint8_t ft_wq_log2[] = {9};
static struct rte_red_config ft_wrconfig[1];
static struct rte_red ft_rtdata[1];
static uint8_t ft_wq_log2[] = {9};
static uint32_t ft_qconfig[] = {0, 0, 1, 1};
static uint32_t ft_q[] ={0};
static uint32_t ft_dropped[] ={0};
static uint32_t ft_qconfig[] = {0, 0, 1, 1};
static uint32_t ft_q[] ={0};
static uint32_t ft_dropped[] ={0};
tcfg->tqueue->rdata);
if (!check_avg(&diff, avg_after, exp_avg, (double)tcfg->tqueue->avg_tolerance))
result = FAIL;
tcfg->tqueue->rdata);
if (!check_avg(&diff, avg_after, exp_avg, (double)tcfg->tqueue->avg_tolerance))
result = FAIL;
drop_rate = calc_drop_rate(tcfg->tvar->enqueued[j],tcfg->tvar->dropped[j]);
drop_prob = calc_drop_prob(tcfg->tconfig->min_th, tcfg->tconfig->max_th,
drop_rate = calc_drop_rate(tcfg->tvar->enqueued[j],tcfg->tvar->dropped[j]);
drop_prob = calc_drop_prob(tcfg->tconfig->min_th, tcfg->tconfig->max_th,
*tcfg->tlevel);
if (!check_drop_rate(&diff, drop_rate, drop_prob, (double)tcfg->tqueue->drop_tolerance))
result = FAIL;
*tcfg->tlevel);
if (!check_drop_rate(&diff, drop_rate, drop_prob, (double)tcfg->tqueue->drop_tolerance))
result = FAIL;
(1 << tcfg->tconfig->wq_log2[tcfg->tqueue->qconfig[j]]),
tcfg->tvar->wait_usec);
avg_after = rte_red_get_avg_float(&tcfg->tconfig->rconfig[tcfg->tqueue->qconfig[j]],
(1 << tcfg->tconfig->wq_log2[tcfg->tqueue->qconfig[j]]),
tcfg->tvar->wait_usec);
avg_after = rte_red_get_avg_float(&tcfg->tconfig->rconfig[tcfg->tqueue->qconfig[j]],
static struct rte_red_config pt_wrconfig[1];
static struct rte_red pt_rtdata[1];
static uint8_t pt_wq_log2[] = {9};
static struct rte_red_config pt_wrconfig[1];
static struct rte_red pt_rtdata[1];
static uint8_t pt_wq_log2[] = {9};
static uint32_t pt_qconfig[] = {0};
static uint32_t pt_q[] = {0};
static uint32_t pt_dropped[] = {0};
static uint32_t pt_qconfig[] = {0};
static uint32_t pt_q[] = {0};
static uint32_t pt_dropped[] = {0};
* performance tests 1, 2 and 3
*/
static uint32_t pt1_tlevel[] = {16};
* performance tests 1, 2 and 3
*/
static uint32_t pt1_tlevel[] = {16};
- * Performance test function to measure enqueue performance.
- * This runs performance tests 1, 2 and 3
+ * Performance test function to measure enqueue performance.
+ * This runs performance tests 1, 2 and 3
* performance tests 4, 5 and 6
*/
static uint32_t pt4_tlevel[] = {16};
* performance tests 4, 5 and 6
*/
static uint32_t pt4_tlevel[] = {16};
- * Performance test function to measure enqueue performance when the
- * queue is empty. This runs performance tests 4, 5 and 6
+ * Performance test function to measure enqueue performance when the
+ * queue is empty. This runs performance tests 4, 5 and 6
(1 << *tcfg->tconfig->wq_log2),
tcfg->tvar->wait_usec);
if (check_avg(&diff, avg_after, exp_avg, (double)tcfg->tqueue->avg_tolerance))
(1 << *tcfg->tconfig->wq_log2),
tcfg->tvar->wait_usec);
if (check_avg(&diff, avg_after, exp_avg, (double)tcfg->tqueue->avg_tolerance))
static uint32_t ovfl_qconfig[] = {0, 0, 1, 1};
static uint32_t ovfl_q[] ={0};
static uint32_t ovfl_dropped[] ={0};
static uint32_t ovfl_qconfig[] = {0, 0, 1, 1};
static uint32_t ovfl_q[] ={0};
static uint32_t ovfl_dropped[] ={0};
printf("%-16u%-9u%-15u0x%08x %-10u%-10u%-10u%-13.2lf%-13.2lf\n",
avg, *tcfg->tconfig->wq_log2, RTE_RED_SCALING,
avg_max, avg_max_bits,
printf("%-16u%-9u%-15u0x%08x %-10u%-10u%-10u%-13.2lf%-13.2lf\n",
avg, *tcfg->tconfig->wq_log2, RTE_RED_SCALING,
avg_max, avg_max_bits,
{ &func_test3_config, func_test3 },
{ &func_test4_config, func_test4 },
{ &func_test5_config, func_test5 },
{ &func_test6_config, func_test6 },
{ &func_test3_config, func_test3 },
{ &func_test4_config, func_test4 },
{ &func_test5_config, func_test5 },
{ &func_test6_config, func_test6 },
{ &perf1_test1_config, perf1_test },
{ &perf1_test2_config, perf1_test },
{ &perf1_test3_config, perf1_test },
{ &perf1_test1_config, perf1_test },
{ &perf1_test2_config, perf1_test },
{ &perf1_test3_config, perf1_test },