X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=app%2Ftest%2Ftest_red.c;h=84c292f8d8798d55d5eb25ac2e4a51204f222757;hb=a2dfcd1ff609f5a4fd3b65774618a35c5c9f73c6;hp=348075dc396e4a154d7935722abdaf0a2de2e2f9;hpb=26e09db6cb5fd9bbf0feb928561af9932694574b;p=dpdk.git diff --git a/app/test/test_red.c b/app/test/test_red.c index 348075dc39..84c292f8d8 100644 --- a/app/test/test_red.c +++ b/app/test/test_red.c @@ -1,48 +1,43 @@ -/*- - * BSD LICENSE - * - * Copyright(c) 2010-2014 Intel Corporation. All rights reserved. - * All rights reserved. - * - * 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 - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * 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 - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2010-2014 Intel Corporation */ +#include "test.h" + #include #include #include #include #include #include + +#ifdef RTE_EXEC_ENV_WINDOWS +static int +test_red(void) +{ + printf("red not supported on Windows, skipping test\n"); + return TEST_SKIPPED; +} + +static int +test_red_perf(void) +{ + printf("red_perf not supported on Windows, skipping test\n"); + return TEST_SKIPPED; +} + +static int +test_red_all(void) +{ + printf("red_all not supported on Windows, skipping test\n"); + return TEST_SKIPPED; +} +#else + #include #include #include -#include "test.h" - #include #ifdef __INTEL_COMPILER @@ -1078,7 +1073,7 @@ static struct test_queue ft6_tqueue = { static struct test_config func_test6_config = { .ifname = "functional test 6 interface", .msg = "functional test 6 : use several queues (each with its own run-time data),\n" - " use several RED configurations (such that each configuration is sharte_red by multiple queues),\n" + " use several RED configurations (such that each configuration is shared by multiple queues),\n" " increase average queue size to target level,\n" " dequeue all packets until queue is empty,\n" " confirm that average queue size is computed correctly while queue is empty\n" @@ -1595,10 +1590,10 @@ static void ovfl_check_avg(uint32_t avg) } static struct test_config ovfl_test1_config = { - .ifname = "queue avergage overflow test interface", + .ifname = "queue average overflow test interface", .msg = "overflow test 1 : use one RED configuration,\n" " increase average queue size to target level,\n" - " check maximum number of bits requirte_red to represent avg_s\n\n", + " check maximum number of bits required to represent avg_s\n\n", .htxt = "avg queue size " "wq_log2 " "fraction bits " @@ -1786,12 +1781,12 @@ test_invalid_parameters(void) printf("%i: rte_red_config_init should have failed!\n", __LINE__); return -1; } - /* min_treshold == max_treshold */ + /* min_threshold == max_threshold */ if (rte_red_config_init(&config, 0, 1, 1, 0) == 0) { printf("%i: rte_red_config_init should have failed!\n", __LINE__); return -1; } - /* min_treshold > max_treshold */ + /* min_threshold > max_threshold */ if (rte_red_config_init(&config, 0, 2, 1, 0) == 0) { printf("%i: rte_red_config_init should have failed!\n", __LINE__); return -1; @@ -1880,6 +1875,8 @@ test_red_all(void) return tell_the_result(num_tests, num_pass); } +#endif /* !RTE_EXEC_ENV_WINDOWS */ + REGISTER_TEST_COMMAND(red_autotest, test_red); REGISTER_TEST_COMMAND(red_perf, test_red_perf); REGISTER_TEST_COMMAND(red_all, test_red_all);