From 4d2ca079d4279209c0b9099d708c0c53c1e24b6f Mon Sep 17 00:00:00 2001 From: Intel Date: Fri, 8 Nov 2013 03:00:00 +0100 Subject: [PATCH] app/test: rename pmac_acl as acl Signed-off-by: Intel --- app/test/Makefile | 5 ++++- app/test/commands.c | 12 +++++++++--- app/test/test.h | 2 +- app/test/{test_pmac_acl.c => test_acl.c} | 16 ++++++++-------- app/test/{test_pmac_acl.h => test_acl.h} | 6 +++--- lib/Makefile | 2 +- lib/librte_eal/common/include/rte_log.h | 2 +- mk/rte.app.mk | 4 ++-- 8 files changed, 29 insertions(+), 20 deletions(-) rename app/test/{test_pmac_acl.c => test_acl.c} (98%) rename app/test/{test_pmac_acl.h => test_acl.h} (99%) diff --git a/app/test/Makefile b/app/test/Makefile index d4bfd8423f..db85ddf3f4 100644 --- a/app/test/Makefile +++ b/app/test/Makefile @@ -89,11 +89,14 @@ SRCS-$(CONFIG_RTE_APP_TEST) += test_red.c SRCS-$(CONFIG_RTE_APP_TEST) += test_sched.c SRCS-$(CONFIG_RTE_APP_TEST) += test_meter.c SRCS-$(CONFIG_RTE_APP_TEST) += test_kni.c -SRCS-$(CONFIG_RTE_APP_TEST) += test_pmac_acl.c SRCS-$(CONFIG_RTE_APP_TEST) += test_power.c SRCS-$(CONFIG_RTE_APP_TEST) += test_common.c SRCS-$(CONFIG_RTE_APP_TEST) += test_timer_perf.c +ifeq ($(CONFIG_RTE_APP_TEST),y) +SRCS-$(CONFIG_RTE_LIBRTE_ACL) += test_acl.c +endif + CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) diff --git a/app/test/commands.c b/app/test/commands.c index a907ff77b6..f36533f6f5 100644 --- a/app/test/commands.c +++ b/app/test/commands.c @@ -178,12 +178,14 @@ static void cmd_autotest_parsed(void *parsed_result, ret |= test_meter(); if (all || !strcmp(res->autotest, "kni_autotest")) ret |= test_kni(); - if (all || !strcmp(res->autotest, "acl_autotest")) - ret |= test_pmac_acl(); if (all || !strcmp(res->autotest, "power_autotest")) ret |= test_power(); if (all || !strcmp(res->autotest, "common_autotest")) ret |= test_common(); +#ifdef RTE_LIBRTE_ACL + if (all || !strcmp(res->autotest, "acl_autotest")) + ret |= test_acl(); +#endif /* RTE_LIBRTE_ACL */ if (ret == 0) printf("Test OK\n"); @@ -215,7 +217,11 @@ cmdline_parse_token_string_t cmd_autotest_autotest = "memcpy_perf_autotest#ring_perf_autotest#" "red_autotest#meter_autotest#sched_autotest#" "memcpy_perf_autotest#kni_autotest#" - "pm_autotest#acl_autotest#power_autotest#" + "pm_autotest#" +#ifdef RTE_LIBRTE_ACL + "acl_autotest#" +#endif + "power_autotest#" "timer_perf_autotest#" "common_autotest#all_autotests"); diff --git a/app/test/test.h b/app/test/test.h index 1ce0c31abd..487a97ecbf 100644 --- a/app/test/test.h +++ b/app/test/test.h @@ -90,7 +90,7 @@ int test_func_reentrancy(void); int test_red(void); int test_sched(void); int test_meter(void); -int test_pmac_acl(void); +int test_acl(void); int test_kni(void); int test_power(void); int test_common(void); diff --git a/app/test/test_pmac_acl.c b/app/test/test_acl.c similarity index 98% rename from app/test/test_pmac_acl.c rename to app/test/test_acl.c index cc2df09b88..668be33048 100644 --- a/app/test/test_pmac_acl.c +++ b/app/test/test_acl.c @@ -41,13 +41,13 @@ #include "test.h" -#ifdef RTE_LIBRTE_PMAC +#ifdef RTE_LIBRTE_ACL #include #include #include -#include "test_pmac_acl.h" +#include "test_acl.h" #define LEN RTE_ACL_MAX_CATEGORIES @@ -404,7 +404,7 @@ test_create_find_add(void) goto err; } - /* try to find existing PM contexts */ + /* try to find existing ACL contexts */ tmp = rte_acl_find_existing(acx_name); if (tmp != acx) { printf("Line %i: Finding %s failed!\n", __LINE__, acx_name); @@ -424,7 +424,7 @@ test_create_find_add(void) /* try to find non-existing context */ tmp = rte_acl_find_existing("invalid"); if (tmp != NULL) { - printf("Line %i: Non-existent PM context found!\n", __LINE__); + printf("Line %i: Non-existent ACL context found!\n", __LINE__); goto err; } @@ -858,7 +858,7 @@ test_misc(void) } int -test_pmac_acl(void) +test_acl(void) { if (test_invalid_parameters() < 0) return -1; @@ -878,10 +878,10 @@ test_pmac_acl(void) #else int -test_pmac_acl(void) +test_acl(void) { - printf("This binary was not compiled with PMAC support!\n"); + printf("This binary was not compiled with ACL support!\n"); return 0; } -#endif /* RTE_LIBRTE_PMAC */ +#endif /* RTE_LIBRTE_ACL */ diff --git a/app/test/test_pmac_acl.h b/app/test/test_acl.h similarity index 99% rename from app/test/test_pmac_acl.h rename to app/test/test_acl.h index f3c6d6eb5c..9515e04e60 100644 --- a/app/test/test_pmac_acl.h +++ b/app/test/test_acl.h @@ -31,8 +31,8 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef TEST_PMAC_ACL_H_ -#define TEST_PMAC_ACL_H_ +#ifndef TEST_ACL_H_ +#define TEST_ACL_H_ struct ipv4_7tuple { uint16_t vlan; @@ -630,4 +630,4 @@ struct ipv4_7tuple acl_test_data[] = { }, /* should not match */ }; -#endif /* TEST_PMAC_ACL_H_ */ +#endif /* TEST_ACL_H_ */ diff --git a/lib/Makefile b/lib/Makefile index c43fb4d2f1..b655d4fa48 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -51,7 +51,7 @@ DIRS-$(CONFIG_RTE_LIBRTE_NET) += librte_net DIRS-$(CONFIG_RTE_LIBRTE_POWER) += librte_power DIRS-$(CONFIG_RTE_LIBRTE_METER) += librte_meter DIRS-$(CONFIG_RTE_LIBRTE_SCHED) += librte_sched -DIRS-$(CONFIG_RTE_LIBRTE_PMAC) += librte_pmac +DIRS-$(CONFIG_RTE_LIBRTE_ACL) += librte_acl ifeq ($(CONFIG_RTE_EXEC_ENV_LINUXAPP),y) DIRS-$(CONFIG_RTE_LIBRTE_KNI) += librte_kni diff --git a/lib/librte_eal/common/include/rte_log.h b/lib/librte_eal/common/include/rte_log.h index c83368e011..37a9c2a9ce 100644 --- a/lib/librte_eal/common/include/rte_log.h +++ b/lib/librte_eal/common/include/rte_log.h @@ -70,7 +70,7 @@ extern struct rte_logs rte_logs; #define RTE_LOGTYPE_HASH 0x00000040 /**< Log related to hash table. */ #define RTE_LOGTYPE_LPM 0x00000080 /**< Log related to LPM. */ #define RTE_LOGTYPE_KNI 0x00000100 /**< Log related to KNI. */ -#define RTE_LOGTYPE_PMAC 0x00000200 /**< Log related to PMAC. */ +#define RTE_LOGTYPE_ACL 0x00000200 /**< Log related to ACL. */ #define RTE_LOGTYPE_POWER 0x00000400 /**< Log related to power. */ #define RTE_LOGTYPE_METER 0x00000800 /**< Log related to QoS meter. */ #define RTE_LOGTYPE_SCHED 0x00001000 /**< Log related to QoS port scheduler. */ diff --git a/mk/rte.app.mk b/mk/rte.app.mk index 728e5b509e..f863bfdf56 100644 --- a/mk/rte.app.mk +++ b/mk/rte.app.mk @@ -96,8 +96,8 @@ ifeq ($(CONFIG_RTE_LIBRTE_POWER),y) LDLIBS += -lrte_power endif -ifeq ($(CONFIG_RTE_LIBRTE_PMAC),y) -LDLIBS += -lrte_pmac +ifeq ($(CONFIG_RTE_LIBRTE_ACL),y) +LDLIBS += -lrte_acl endif ifeq ($(CONFIG_RTE_LIBRTE_METER),y) -- 2.20.1