[dpdk-dev] Signature filter for virtual function
Could you explain what exactly you want? Director packet to a VF? Or director packet to different queue in a VF? For the first one, I think if you know which queue the VF is using, the flow director can do it (it's my understanding, haven't try). But for the latter, I have no idea which way can be used instead. > -Original Message- > From: Ilan Borenshtein [mailto:ilan at asocstech.com] > Sent: Sunday, August 17, 2014 3:34 PM > To: Wu, Jingjing; dev at dpdk.org > Subject: RE: Signature filter for virtual function > > Hi, > > Is there any other way except of the Flow director to use the different Rx > queues by a VF ? > Will the next versions support flow director for VF ? > > Thanks, > Ilan B > > > -Original Message- > From: Wu, Jingjing [mailto:jingjing.wu at intel.com] > Sent: Friday, August 15, 2014 10:51 AM > To: Ilan Borenshtein; dev at dpdk.org > Subject: RE: Signature filter for virtual function > > Hi > > Flow director is not supported on VF now. > I think this may be the reason why ENOTSUP is returned. > > > > -Original Message- > > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Ilan Borenshtein > > Sent: Thursday, August 14, 2014 8:34 PM > > To: dev at dpdk.org > > Subject: [dpdk-dev] Signature filter for virtual function > > > > Hello, > > > > I'm trying to configure the flow director of VF 82599 port using > > rte_eth_dev_fdir_add_signature_filter (). > > The function returns with ENOTSUP. > > Doe's flow director supported for VF ? > > What can be the reason for ENOTSUP ? > > > > Thanks, > > Ilan B
[dpdk-dev] [PATCH 3/6]i40e:Add VxLAN Cloud filter API
Hi Thomas, > -Original Message- > From: Alex Markuze [mailto:alex at weka.io] > Sent: Wednesday, August 13, 2014 10:18 PM > To: Thomas Monjalon > Cc: Liu, Jijiang; dev at dpdk.org > Subject: Re: [dpdk-dev] [PATCH 3/6]i40e:Add VxLAN Cloud filter API > > All are L2 over L3(UDP) - General name - Network Overlay. > > > On Wed, Aug 13, 2014 at 4:50 PM, Thomas Monjalon > wrote: > > 2014-08-13 08:23, Liu, Jijiang: > >> From: Thomas Monjalon [mailto:thomas.monjalon at 6wind.com] > >> > About API, why name it cloud filter instead of VxLAN? > >> > >> VxLAN is just a kind tunnel type, there are another tunnel types > >> based on protocol type, they are below. > >> Tunnel Type: > >> * 0x0: VXLAN > >> * 0x1: NVGRE or other MAC in GRE > >> * 0x2: Geneve > >> 0x3: IP in GRE > >> Currently, I just implemented VxLAN tunnel type, and we will support > >> another tunnel types in cloud filter API later. > > > > OK, I understand. But cloud filter is just a marketing name. > > Please let's stick to technical and precise names. > > It seems these tunnels are L2 over IP, right? > > > > -- > > Thomas I agree. I will change the API name as rte_eth_dev_tunnel_filter_set(), which means the API supports tunneled packet filtering. Any comments? Thanks Jijiang Liu
[dpdk-dev] Signature filter for virtual function
Looking for director packet to different queues in a VF. Will it be implemented in future releases ? -Original Message- From: Wu, Jingjing [mailto:jingjing...@intel.com] Sent: Monday, August 18, 2014 3:40 AM To: Ilan Borenshtein; dev at dpdk.org Subject: RE: Signature filter for virtual function Could you explain what exactly you want? Director packet to a VF? Or director packet to different queue in a VF? For the first one, I think if you know which queue the VF is using, the flow director can do it (it's my understanding, haven't try). But for the latter, I have no idea which way can be used instead. > -Original Message- > From: Ilan Borenshtein [mailto:ilan at asocstech.com] > Sent: Sunday, August 17, 2014 3:34 PM > To: Wu, Jingjing; dev at dpdk.org > Subject: RE: Signature filter for virtual function > > Hi, > > Is there any other way except of the Flow director to use the different Rx > queues by a VF ? > Will the next versions support flow director for VF ? > > Thanks, > Ilan B > > > -Original Message- > From: Wu, Jingjing [mailto:jingjing.wu at intel.com] > Sent: Friday, August 15, 2014 10:51 AM > To: Ilan Borenshtein; dev at dpdk.org > Subject: RE: Signature filter for virtual function > > Hi > > Flow director is not supported on VF now. > I think this may be the reason why ENOTSUP is returned. > > > > -Original Message- > > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Ilan > > Borenshtein > > Sent: Thursday, August 14, 2014 8:34 PM > > To: dev at dpdk.org > > Subject: [dpdk-dev] Signature filter for virtual function > > > > Hello, > > > > I'm trying to configure the flow director of VF 82599 port using > > rte_eth_dev_fdir_add_signature_filter (). > > The function returns with ENOTSUP. > > Doe's flow director supported for VF ? > > What can be the reason for ENOTSUP ? > > > > Thanks, > > Ilan B
[dpdk-dev] [PATCH 0/7] fix build errors
This patch series resolves build errors I encountered after disabling some parts of the dpdk. - simplified app/*/Makefile, - fixed some build error when disabling refcnt, - removed dead code (reference to pm_autotest), - reworked all the tests from app/test to use a dynamic register mechanism (this makes it easier to enable/disable them), - reworked app/test Makefile to only enable the relevant tests. -- David Marchand David Marchand (7): app: simplify makefiles app/test: use accessor to set refcnt field app/test: remove pm_autotest app/test: introduce dynamic commands list app/test: convert all tests to register system app/test: no more builtin commands app/test: only build what has been selected in config app/cmdline_test/Makefile|8 +- app/dump_cfg/Makefile|5 +- app/test-acl/Makefile|9 +- app/test-pipeline/Makefile | 26 ++--- app/test-pmd/Makefile| 40 app/test/Makefile| 145 app/test/autotest_data.py|6 -- app/test/commands.c | 193 -- app/test/test.c |5 + app/test/test.h | 74 +-- app/test/test_acl.c | 18 ++-- app/test/test_alarm.c|7 +- app/test/test_atomic.c |7 +- app/test/test_byteorder.c|8 +- app/test/test_cmdline.c | 11 ++- app/test/test_common.c |8 +- app/test/test_cpuflags.c |8 +- app/test/test_cycles.c |8 +- app/test/test_debug.c|8 +- app/test/test_devargs.c |8 +- app/test/test_distributor.c | 22 ++--- app/test/test_distributor_perf.c | 20 ++-- app/test/test_eal_flags.c| 20 ++-- app/test/test_eal_fs.c | 17 ++-- app/test/test_errno.c|8 +- app/test/test_func_reentrancy.c |8 +- app/test/test_hash.c | 19 ++-- app/test/test_hash_perf.c| 19 ++-- app/test/test_interrupts.c |7 +- app/test/test_ivshmem.c | 15 +-- app/test/test_kni.c | 18 ++-- app/test/test_kvargs.c |9 +- app/test/test_link_bonding.c |8 +- app/test/test_logs.c |8 +- app/test/test_lpm.c | 19 ++-- app/test/test_lpm6.c | 19 ++-- app/test/test_malloc.c |8 +- app/test/test_mbuf.c |8 +- app/test/test_memcpy.c |8 +- app/test/test_memcpy_perf.c |8 +- app/test/test_memory.c |8 +- app/test/test_mempool.c |8 +- app/test/test_mempool_perf.c |8 +- app/test/test_memzone.c |8 +- app/test/test_meter.c| 18 ++-- app/test/test_mp_secondary.c | 19 +--- app/test/test_pci.c |6 ++ app/test/test_per_lcore.c|8 +- app/test/test_pmd_ring.c | 19 ++-- app/test/test_power.c| 20 ++-- app/test/test_prefetch.c |8 +- app/test/test_red.c | 20 ++-- app/test/test_ring.c |8 +- app/test/test_ring_perf.c|8 +- app/test/test_rwlock.c |8 +- app/test/test_sched.c| 18 ++-- app/test/test_spinlock.c |8 +- app/test/test_string_fns.c |8 +- app/test/test_table.c| 21 ++--- app/test/test_table.h|1 - app/test/test_table_acl.c|4 - app/test/test_table_combined.c |3 - app/test/test_table_pipeline.c |8 -- app/test/test_table_ports.c |4 - app/test/test_table_tables.c |4 - app/test/test_tailq.c|8 +- app/test/test_timer.c| 17 ++-- app/test/test_timer_perf.c | 17 ++-- app/test/test_version.c |8 +- 69 files changed, 550 insertions(+), 623 deletions(-) -- 1.7.10.4
[dpdk-dev] [PATCH 1/7] app: simplify makefiles
No need to test some build option multiple times in a Makefile. Besides, such option is needed by the associated app, so move it at the top of the Makefile. Signed-off-by: David Marchand --- app/cmdline_test/Makefile |8 ++- app/dump_cfg/Makefile |5 +- app/test-acl/Makefile |9 ++-- app/test-pipeline/Makefile | 26 +- app/test-pmd/Makefile | 40 +++ app/test/Makefile | 122 ++-- 6 files changed, 110 insertions(+), 100 deletions(-) diff --git a/app/cmdline_test/Makefile b/app/cmdline_test/Makefile index 11c3aba..e9eafd2 100644 --- a/app/cmdline_test/Makefile +++ b/app/cmdline_test/Makefile @@ -31,6 +31,8 @@ include $(RTE_SDK)/mk/rte.vars.mk +ifeq ($(CONFIG_RTE_LIBRTE_CMDLINE),y) + # # library name # @@ -39,10 +41,12 @@ APP = cmdline_test # # all sources are stored in SRCS-y # -SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += cmdline_test.c -SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += commands.c +SRCS-y += cmdline_test.c +SRCS-y += commands.c CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) include $(RTE_SDK)/mk/rte.app.mk + +endif diff --git a/app/dump_cfg/Makefile b/app/dump_cfg/Makefile index 4c0714e..3257127 100644 --- a/app/dump_cfg/Makefile +++ b/app/dump_cfg/Makefile @@ -40,7 +40,6 @@ CFLAGS += $(WERROR_FLAGS) SRCS-y := main.c # this application needs libraries first - DEPDIRS-y += lib - - include $(RTE_SDK)/mk/rte.app.mk +DEPDIRS-y += lib +include $(RTE_SDK)/mk/rte.app.mk diff --git a/app/test-acl/Makefile b/app/test-acl/Makefile index 00fa3b6..43dfdcb 100644 --- a/app/test-acl/Makefile +++ b/app/test-acl/Makefile @@ -31,15 +31,18 @@ include $(RTE_SDK)/mk/rte.vars.mk +ifeq ($(CONFIG_RTE_LIBRTE_ACL),y) + APP = testacl CFLAGS += $(WERROR_FLAGS) # all source are stored in SRCS-y -SRCS-$(CONFIG_RTE_LIBRTE_ACL) := main.c +SRCS-y := main.c # this application needs libraries first -DEPDIRS-$(CONFIG_RTE_LIBRTE_ACL) += lib - +DEPDIRS-y += lib include $(RTE_SDK)/mk/rte.app.mk + +endif diff --git a/app/test-pipeline/Makefile b/app/test-pipeline/Makefile index 6cc0985..b81652f 100644 --- a/app/test-pipeline/Makefile +++ b/app/test-pipeline/Makefile @@ -31,6 +31,8 @@ include $(RTE_SDK)/mk/rte.vars.mk +ifeq ($(CONFIG_RTE_LIBRTE_PIPELINE),y) + # # library name # @@ -46,21 +48,21 @@ endif # # all source are stored in SRCS-y # -SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) := main.c -SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += config.c -SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += init.c -SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += runtime.c -SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += pipeline_stub.c -SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += pipeline_hash.c -SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += pipeline_lpm.c -SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += pipeline_lpm_ipv6.c +SRCS-y := main.c +SRCS-y += config.c +SRCS-y += init.c +SRCS-y += runtime.c +SRCS-y += pipeline_stub.c +SRCS-y += pipeline_hash.c +SRCS-y += pipeline_lpm.c +SRCS-y += pipeline_lpm_ipv6.c # include ACL lib if available -ifeq ($(CONFIG_RTE_LIBRTE_ACL),y) -SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += pipeline_acl.c -endif +SRCS-$(CONFIG_RTE_LIBRTE_ACL) += pipeline_acl.c # this application needs libraries first -DEPDIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) += lib +DEPDIRS-y += lib include $(RTE_SDK)/mk/rte.app.mk + +endif diff --git a/app/test-pmd/Makefile b/app/test-pmd/Makefile index debf880..97dc2e6 100644 --- a/app/test-pmd/Makefile +++ b/app/test-pmd/Makefile @@ -31,6 +31,8 @@ include $(RTE_SDK)/mk/rte.vars.mk +ifeq ($(CONFIG_RTE_TEST_PMD),y) + # # library name # @@ -46,25 +48,21 @@ endif # # all source are stored in SRCS-y # -SRCS-$(CONFIG_RTE_TEST_PMD) := testpmd.c -SRCS-$(CONFIG_RTE_TEST_PMD) += parameters.c -ifeq ($(CONFIG_RTE_LIBRTE_CMDLINE),y) -SRCS-$(CONFIG_RTE_TEST_PMD) += cmdline.c -endif -SRCS-$(CONFIG_RTE_TEST_PMD) += config.c -SRCS-$(CONFIG_RTE_TEST_PMD) += iofwd.c -SRCS-$(CONFIG_RTE_TEST_PMD) += macfwd.c -SRCS-$(CONFIG_RTE_TEST_PMD) += macfwd-retry.c -SRCS-$(CONFIG_RTE_TEST_PMD) += macswap.c -SRCS-$(CONFIG_RTE_TEST_PMD) += flowgen.c -SRCS-$(CONFIG_RTE_TEST_PMD) += rxonly.c -SRCS-$(CONFIG_RTE_TEST_PMD) += txonly.c -SRCS-$(CONFIG_RTE_TEST_PMD) += csumonly.c -SRCS-$(CONFIG_RTE_TEST_PMD) += icmpecho.c -ifeq ($(CONFIG_RTE_LIBRTE_IEEE1588),y) -SRCS-$(CONFIG_RTE_TEST_PMD) += ieee1588fwd.c -endif -SRCS-$(CONFIG_RTE_TEST_PMD) += mempool_anon.c +SRCS-y := testpmd.c +SRCS-y += parameters.c +SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += cmdline.c +SRCS-y += config.c +SRCS-y += iofwd.c +SRCS-y += macfwd.c +SRCS-y += macfwd-retry.c +SRCS-y += macswap.c +SRCS-y += flowgen.c +SRCS-y += rxonly.c +SRCS-y += txonly.c +SRCS-y += csumonly.c +SRCS-y += icmpecho.c +SRCS-$(CONFIG_RTE_LIBRTE_IEEE1588) += ieee1588fwd.c +SRCS-y += mempool_anon.c ifeq ($(CONFIG_RTE_EXEC_ENV_LINUXAPP),y) CFLAGS_mempool_anon.o := -D_GNU_SOURCE @@ -72,6 +70,8 @@ endif CFLAGS_cmdline.o := -D_GNU_SOURCE # this application needs libraries first -DEPDIRS-$(CONFIG_RTE_TEST_PMD) += lib +DEPDIRS-y += lib include $
[dpdk-dev] [PATCH 2/7] app/test: use accessor to set refcnt field
refcnt field can not be accessed directly as it depends on the RTE_MBUF_REFCNT build option. Signed-off-by: David Marchand --- app/test/test_distributor.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/test/test_distributor.c b/app/test/test_distributor.c index e7dc1fb..7648ed1 100644 --- a/app/test/test_distributor.c +++ b/app/test/test_distributor.c @@ -282,7 +282,7 @@ sanity_test_with_mbuf_alloc(struct rte_distributor *d, struct rte_mempool *p) rte_distributor_process(d, NULL, 0); for (j = 0; j < BURST; j++) { bufs[j]->pkt.hash.rss = (i+j) << 1; - bufs[j]->refcnt = 1; + rte_mbuf_refcnt_set(bufs[j], 1); } rte_distributor_process(d, bufs, BURST); -- 1.7.10.4
[dpdk-dev] [PATCH 3/7] app/test: remove pm_autotest
This test is not linked to any code, remove it. It may be some leftover from 24f42575dfe2226f126546d0ca501cba9fbd6373. Signed-off-by: David Marchand --- app/test/autotest_data.py |6 -- app/test/commands.c |2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/app/test/autotest_data.py b/app/test/autotest_data.py index d0c55c8..878c72e 100644 --- a/app/test/autotest_data.py +++ b/app/test/autotest_data.py @@ -340,12 +340,6 @@ parallel_test_group_list = [ "Func" : default_autotest, "Report" : None, }, - { -"Name" : "Pattern match autotest", -"Command" :"pm_autotest", -"Func" : default_autotest, -"Report" : None, - }, { "Name" :"Sched autotest", "Command" : "sched_autotest", diff --git a/app/test/commands.c b/app/test/commands.c index 5f23420..4a0cc05 100644 --- a/app/test/commands.c +++ b/app/test/commands.c @@ -238,7 +238,7 @@ 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#ivshmem_autotest#" + "ivshmem_autotest#" "devargs_autotest#table_autotest#" #ifdef RTE_LIBRTE_ACL "acl_autotest#" -- 1.7.10.4
[dpdk-dev] [PATCH 4/7] app/test: introduce dynamic commands list
This patch adds a way to dynamically add a test without modifying commands.c. Move all current tests in a builtin_commands[] list, next patch will convert them to this new system. Signed-off-by: David Marchand --- app/test/commands.c | 118 ++- app/test/test.c |3 ++ app/test/test.h | 21 + 3 files changed, 103 insertions(+), 39 deletions(-) diff --git a/app/test/commands.c b/app/test/commands.c index 4a0cc05..a1ffd43 100644 --- a/app/test/commands.c +++ b/app/test/commands.c @@ -78,6 +78,15 @@ // +static struct test_commands_list commands_list = + TAILQ_HEAD_INITIALIZER(commands_list); + +void +add_test_command(struct test_command *t) +{ + TAILQ_INSERT_TAIL(&commands_list, t, next); +} + struct cmd_autotest_result { cmdline_fixed_string_t autotest; }; @@ -86,9 +95,15 @@ static void cmd_autotest_parsed(void *parsed_result, __attribute__((unused)) struct cmdline *cl, __attribute__((unused)) void *data) { + struct test_command *t; struct cmd_autotest_result *res = parsed_result; int ret = 0; + TAILQ_FOREACH(t, &commands_list, next) { + if (!strcmp(res->autotest, t->command)) + ret = t->callback(); + } + if (!strcmp(res->autotest, "version_autotest")) ret = test_version(); if (!strcmp(res->autotest, "eal_fs_autotest")) @@ -214,45 +229,7 @@ static void cmd_autotest_parsed(void *parsed_result, cmdline_parse_token_string_t cmd_autotest_autotest = TOKEN_STRING_INITIALIZER(struct cmd_autotest_result, autotest, - "pci_autotest#memory_autotest#" - "per_lcore_autotest#spinlock_autotest#" - "rwlock_autotest#atomic_autotest#" - "byteorder_autotest#prefetch_autotest#" - "cycles_autotest#logs_autotest#" - "memzone_autotest#ring_autotest#" - "mempool_autotest#mbuf_autotest#" - "timer_autotest#malloc_autotest#" - "memcpy_autotest#hash_autotest#" - "lpm_autotest#debug_autotest#" - "lpm6_autotest#" - "errno_autotest#tailq_autotest#" - "string_autotest#multiprocess_autotest#" - "cpuflags_autotest#eal_flags_autotest#" - "alarm_autotest#interrupt_autotest#" - "version_autotest#eal_fs_autotest#" - "cmdline_autotest#func_reentrancy_autotest#" -#ifdef RTE_LIBRTE_PMD_BOND - "link_bonding_autotest#" -#endif - "mempool_perf_autotest#hash_perf_autotest#" - "memcpy_perf_autotest#ring_perf_autotest#" - "red_autotest#meter_autotest#sched_autotest#" - "memcpy_perf_autotest#kni_autotest#" - "ivshmem_autotest#" - "devargs_autotest#table_autotest#" -#ifdef RTE_LIBRTE_ACL - "acl_autotest#" -#endif - "power_autotest#" - "timer_perf_autotest#" -#ifdef RTE_LIBRTE_PMD_RING - "ring_pmd_autotest#" -#endif -#ifdef RTE_LIBRTE_KVARGS - "kvargs_autotest#" -#endif - "common_autotest#" - "distributor_autotest#distributor_perf_autotest"); +""); cmdline_parse_inst_t cmd_autotest = { .f = cmd_autotest_parsed, /* function to call */ @@ -460,3 +437,66 @@ cmdline_parse_ctx_t main_ctx[] = { NULL, }; +int commands_init(void) +{ + struct test_command *t; + char builtin_commands[] = + "pci_autotest#memory_autotest#" + "per_lcore_autotest#spinlock_autotest#" + "rwlock_autotest#atomic_autotest#" + "byteorder_autotest#prefetch_autotest#" + "cycles_autotest#logs_autotest#" + "memzone_autotest#ring_autotest#" + "mempool_autotest#mbuf_autotest#" + "timer_autotest#malloc_autotest#" + "memcpy_autotest#hash_autotest#" + "lpm_autotest#debug_autotest#" + "lpm6_autotest#" + "errno_autotest#tailq_autotest#" + "string_autotest#multiprocess_autotest#" + "cpuflags_autotest#eal_flags_autotest#" + "alarm_autotest#interrupt_autotest#" + "version_autotest#eal_fs_autotest#" + "cmdline_autotest#func_reentrancy_autotest#" +#ifdef RTE_LIBRTE_PMD_BOND + "link_bonding_autotest#" +
[dpdk-dev] [PATCH 5/7] app/test: convert all tests to register system
Remove all tests from the builtin commands list and use the dynamic commands list register macro. Signed-off-by: David Marchand --- app/test/commands.c | 157 +- app/test/test.c |2 + app/test/test.h | 55 + app/test/test_acl.c | 15 ++-- app/test/test_alarm.c|7 +- app/test/test_atomic.c |7 +- app/test/test_byteorder.c|8 +- app/test/test_cmdline.c | 13 ++-- app/test/test_common.c |8 +- app/test/test_cpuflags.c |8 +- app/test/test_cycles.c |8 +- app/test/test_debug.c|8 +- app/test/test_devargs.c |8 +- app/test/test_distributor.c | 18 ++--- app/test/test_distributor_perf.c | 18 ++--- app/test/test_eal_flags.c| 18 ++--- app/test/test_eal_fs.c | 15 ++-- app/test/test_errno.c|8 +- app/test/test_func_reentrancy.c |8 +- app/test/test_hash.c | 16 ++-- app/test/test_hash_perf.c| 16 ++-- app/test/test_interrupts.c |7 +- app/test/test_ivshmem.c | 12 ++- app/test/test_kni.c | 16 ++-- app/test/test_kvargs.c |9 ++- app/test/test_link_bonding.c |8 +- app/test/test_logs.c |8 +- app/test/test_lpm.c | 16 ++-- app/test/test_lpm6.c | 16 ++-- app/test/test_malloc.c |8 +- app/test/test_mbuf.c |8 +- app/test/test_memcpy.c |8 +- app/test/test_memcpy_perf.c |8 +- app/test/test_memory.c |8 +- app/test/test_mempool.c |8 +- app/test/test_mempool_perf.c |8 +- app/test/test_memzone.c |8 +- app/test/test_meter.c| 15 ++-- app/test/test_mp_secondary.c | 17 ++--- app/test/test_pci.c |6 ++ app/test/test_per_lcore.c|8 +- app/test/test_pmd_ring.c | 15 ++-- app/test/test_power.c| 16 ++-- app/test/test_prefetch.c |8 +- app/test/test_red.c | 17 ++--- app/test/test_ring.c |8 +- app/test/test_ring_perf.c|8 +- app/test/test_rwlock.c |8 +- app/test/test_sched.c| 15 ++-- app/test/test_spinlock.c |8 +- app/test/test_string_fns.c |8 +- app/test/test_table.c| 19 ++--- app/test/test_table.h|1 - app/test/test_tailq.c|8 +- app/test/test_timer.c| 15 ++-- app/test/test_timer_perf.c | 15 ++-- app/test/test_version.c |8 +- 57 files changed, 358 insertions(+), 442 deletions(-) diff --git a/app/test/commands.c b/app/test/commands.c index a1ffd43..0640ac9 100644 --- a/app/test/commands.c +++ b/app/test/commands.c @@ -104,122 +104,6 @@ static void cmd_autotest_parsed(void *parsed_result, ret = t->callback(); } - if (!strcmp(res->autotest, "version_autotest")) - ret = test_version(); - if (!strcmp(res->autotest, "eal_fs_autotest")) - ret = test_eal_fs(); - if (!strcmp(res->autotest, "debug_autotest")) - ret = test_debug(); - if (!strcmp(res->autotest, "pci_autotest")) - ret = test_pci(); - if (!strcmp(res->autotest, "prefetch_autotest")) - ret = test_prefetch(); - if (!strcmp(res->autotest, "byteorder_autotest")) - ret = test_byteorder(); - if (!strcmp(res->autotest, "per_lcore_autotest")) - ret = test_per_lcore(); - if (!strcmp(res->autotest, "atomic_autotest")) - ret = test_atomic(); - if (!strcmp(res->autotest, "malloc_autotest")) - ret = test_malloc(); - if (!strcmp(res->autotest, "spinlock_autotest")) - ret = test_spinlock(); - if (!strcmp(res->autotest, "memory_autotest")) - ret = test_memory(); - if (!strcmp(res->autotest, "memzone_autotest")) - ret = test_memzone(); - if (!strcmp(res->autotest, "rwlock_autotest")) - ret = test_rwlock(); - if (!strcmp(res->autotest, "mbuf_autotest")) - ret = test_mbuf(); - if (!strcmp(res->autotest, "logs_autotest")) - ret = test_logs(); - if (!strcmp(res->autotest, "errno_autotest")) - ret = test_errno(); - if (!strcmp(res->autotest, "hash_autotest")) - ret = test_hash(); - if (!strcmp(res->autotest, "hash_perf_autotest")) - ret = test_hash_perf(); - if (!strcmp(res->autotest, "lpm_autotest")) - ret = test_lpm(); - if (!strcmp(res->autotest, "lpm6_autotest")) - ret = test_lpm6(); - if (!strcmp(res->autotest, "cpuflags_autotest")) - ret = test_cpuflags(); -
[dpdk-dev] [PATCH 6/7] app/test: no more builtin commands
The builtin commands list is now empty, we can remove it. Signed-off-by: David Marchand --- app/test/commands.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/test/commands.c b/app/test/commands.c index 0640ac9..b7c6ee0 100644 --- a/app/test/commands.c +++ b/app/test/commands.c @@ -324,9 +324,8 @@ cmdline_parse_ctx_t main_ctx[] = { int commands_init(void) { struct test_command *t; - char builtin_commands[] = ""; char *commands, *ptr; - int commands_len = strlen(builtin_commands) + 1; + int commands_len = 0; TAILQ_FOREACH(t, &commands_list, next) { commands_len += strlen(t->command) + 1; @@ -340,7 +339,8 @@ int commands_init(void) TAILQ_FOREACH(t, &commands_list, next) { ptr += sprintf(ptr, "%s#", t->command); } - ptr += sprintf(ptr, "%s", builtin_commands); + ptr--; + ptr[0] = '\0'; cmd_autotest_autotest.string_data.str = commands; return 0; -- 1.7.10.4
[dpdk-dev] [PATCH 7/7] app/test: only build what has been selected in config
Avoid building tests if their counterparts are not selected in config. This has the nice side effect of fixing build errors when disabling parts of the dpdk. Signed-off-by: David Marchand --- app/test/Makefile| 61 ++ app/test/test_acl.c |3 -- app/test/test_cmdline.c |2 -- app/test/test_distributor.c |2 -- app/test/test_distributor_perf.c |2 -- app/test/test_eal_flags.c|2 -- app/test/test_eal_fs.c |2 -- app/test/test_hash.c |3 -- app/test/test_hash_perf.c|3 -- app/test/test_ivshmem.c |3 -- app/test/test_kni.c |2 -- app/test/test_lpm.c |3 -- app/test/test_lpm6.c |3 -- app/test/test_meter.c|3 -- app/test/test_mp_secondary.c |2 -- app/test/test_pmd_ring.c |4 --- app/test/test_power.c|4 --- app/test/test_red.c |3 -- app/test/test_sched.c|3 -- app/test/test_table.c|4 --- app/test/test_table_acl.c|4 --- app/test/test_table_combined.c |3 -- app/test/test_table_pipeline.c |8 - app/test/test_table_ports.c |4 --- app/test/test_table_tables.c |4 --- app/test/test_timer.c|2 -- app/test/test_timer_perf.c |2 -- 27 files changed, 42 insertions(+), 99 deletions(-) diff --git a/app/test/Makefile b/app/test/Makefile index abb7426..4797382 100644 --- a/app/test/Makefile +++ b/app/test/Makefile @@ -53,39 +53,57 @@ SRCS-y += test_cycles.c SRCS-y += test_spinlock.c SRCS-y += test_memory.c SRCS-y += test_memzone.c + SRCS-y += test_ring.c +SRCS-y += test_ring_perf.c + +ifeq ($(CONFIG_RTE_LIBRTE_TABLE),y) SRCS-y += test_table.c -SRCS-y += test_table_pipeline.c +SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += test_table_pipeline.c SRCS-y += test_table_tables.c SRCS-y += test_table_ports.c SRCS-y += test_table_combined.c -SRCS-y += test_table_acl.c -SRCS-y += test_ring_perf.c +SRCS-$(CONFIG_RTE_LIBRTE_ACL) += test_table_acl.c +endif + SRCS-y += test_rwlock.c -SRCS-y += test_timer.c + +SRCS-$(CONFIG_RTE_LIBRTE_TIMER) += test_timer.c +SRCS-$(CONFIG_RTE_LIBRTE_TIMER) += test_timer_perf.c + SRCS-y += test_mempool.c SRCS-y += test_mempool_perf.c + SRCS-y += test_mbuf.c SRCS-y += test_logs.c + SRCS-y += test_memcpy.c SRCS-y += test_memcpy_perf.c -SRCS-y += test_hash.c -SRCS-y += test_hash_perf.c -SRCS-y += test_lpm.c -SRCS-y += test_lpm6.c + +SRCS-$(CONFIG_RTE_LIBRTE_HASH) += test_hash.c +SRCS-$(CONFIG_RTE_LIBRTE_HASH) += test_hash_perf.c + +SRCS-$(CONFIG_RTE_LIBRTE_LPM) += test_lpm.c +SRCS-$(CONFIG_RTE_LIBRTE_LPM) += test_lpm6.c + SRCS-y += test_debug.c SRCS-y += test_errno.c SRCS-y += test_tailq.c SRCS-y += test_string_fns.c -SRCS-y += test_mp_secondary.c SRCS-y += test_cpuflags.c + +ifeq ($(CONFIG_RTE_EXEC_ENV_BAREMETAL),) +SRCS-y += test_mp_secondary.c SRCS-y += test_eal_flags.c +SRCS-y += test_eal_fs.c +endif + SRCS-y += test_alarm.c SRCS-y += test_interrupts.c SRCS-y += test_version.c -SRCS-y += test_eal_fs.c SRCS-y += test_func_reentrancy.c -SRCS-y += test_cmdline.c + +SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += test_cmdline.c SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += test_cmdline_num.c SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += test_cmdline_etheraddr.c SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += test_cmdline_portlist.c @@ -93,16 +111,21 @@ SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += test_cmdline_ipaddr.c SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += test_cmdline_cirbuf.c SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += test_cmdline_string.c SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += test_cmdline_lib.c + +ifeq ($(CONFIG_RTE_LIBRTE_SCHED),y) SRCS-y += test_red.c -SRCS-y += test_sched.c -SRCS-y += test_meter.c -SRCS-y += test_kni.c -SRCS-y += test_power.c +SRCS-$(CONFIG_RTE_ARCH_X86_64) += test_sched.c +endif + +SRCS-$(CONFIG_RTE_LIBRTE_METER) += test_meter.c +SRCS-$(CONFIG_RTE_LIBRTE_KNI) += test_kni.c +SRCS-$(CONFIG_RTE_LIBRTE_POWER) += test_power.c SRCS-y += test_common.c -SRCS-y += test_timer_perf.c -SRCS-y += test_ivshmem.c -SRCS-y += test_distributor.c -SRCS-y += test_distributor_perf.c +SRCS-$(CONFIG_RTE_LIBRTE_IVSHMEM) += test_ivshmem.c + +SRCS-$(CONFIG_RTE_LIBRTE_DISTRIBUTOR) += test_distributor.c +SRCS-$(CONFIG_RTE_LIBRTE_DISTRIBUTOR) += test_distributor_perf.c + SRCS-y += test_devargs.c SRCS-y += virtual_pmd.c SRCS-y += packet_burst_generator.c diff --git a/app/test/test_acl.c b/app/test/test_acl.c index 4e7b470..c6b3f86 100644 --- a/app/test/test_acl.c +++ b/app/test/test_acl.c @@ -36,8 +36,6 @@ #include "test.h" -#ifdef RTE_LIBRTE_ACL - #include #include #include @@ -934,4 +932,3 @@ static struct test_command acl_cmd = { .callback = test_acl, }; REGISTER_TEST_COMMAND(acl_cmd); -#endif /* RTE_LIBRTE_ACL */ diff --git a/app/test/test_cmdline.c b/app/test/test_cmdline.c index 9b8bd5c..2b5840f 100644 --- a/app/test/test_cmdline.c
[dpdk-dev] [PATCH 0/7] fix build errors
self-nack on the first patch ... There is a typo in app/test/Makefile (RTE_CONFIG.. vs CONFIG_RTE..) that I introduced while rebasing... I will send a v2 shortly. -- David Marchand On Mon, Aug 18, 2014 at 11:26 AM, David Marchand wrote: > This patch series resolves build errors I encountered after disabling some > parts > of the dpdk. > > - simplified app/*/Makefile, > - fixed some build error when disabling refcnt, > - removed dead code (reference to pm_autotest), > - reworked all the tests from app/test to use a dynamic register mechanism > (this makes it easier to enable/disable them), > - reworked app/test Makefile to only enable the relevant tests. > > -- > David Marchand > > David Marchand (7): > app: simplify makefiles > app/test: use accessor to set refcnt field > app/test: remove pm_autotest > app/test: introduce dynamic commands list > app/test: convert all tests to register system > app/test: no more builtin commands > app/test: only build what has been selected in config > > app/cmdline_test/Makefile|8 +- > app/dump_cfg/Makefile|5 +- > app/test-acl/Makefile|9 +- > app/test-pipeline/Makefile | 26 ++--- > app/test-pmd/Makefile| 40 > app/test/Makefile| 145 > app/test/autotest_data.py|6 -- > app/test/commands.c | 193 > -- > app/test/test.c |5 + > app/test/test.h | 74 +-- > app/test/test_acl.c | 18 ++-- > app/test/test_alarm.c|7 +- > app/test/test_atomic.c |7 +- > app/test/test_byteorder.c|8 +- > app/test/test_cmdline.c | 11 ++- > app/test/test_common.c |8 +- > app/test/test_cpuflags.c |8 +- > app/test/test_cycles.c |8 +- > app/test/test_debug.c|8 +- > app/test/test_devargs.c |8 +- > app/test/test_distributor.c | 22 ++--- > app/test/test_distributor_perf.c | 20 ++-- > app/test/test_eal_flags.c| 20 ++-- > app/test/test_eal_fs.c | 17 ++-- > app/test/test_errno.c|8 +- > app/test/test_func_reentrancy.c |8 +- > app/test/test_hash.c | 19 ++-- > app/test/test_hash_perf.c| 19 ++-- > app/test/test_interrupts.c |7 +- > app/test/test_ivshmem.c | 15 +-- > app/test/test_kni.c | 18 ++-- > app/test/test_kvargs.c |9 +- > app/test/test_link_bonding.c |8 +- > app/test/test_logs.c |8 +- > app/test/test_lpm.c | 19 ++-- > app/test/test_lpm6.c | 19 ++-- > app/test/test_malloc.c |8 +- > app/test/test_mbuf.c |8 +- > app/test/test_memcpy.c |8 +- > app/test/test_memcpy_perf.c |8 +- > app/test/test_memory.c |8 +- > app/test/test_mempool.c |8 +- > app/test/test_mempool_perf.c |8 +- > app/test/test_memzone.c |8 +- > app/test/test_meter.c| 18 ++-- > app/test/test_mp_secondary.c | 19 +--- > app/test/test_pci.c |6 ++ > app/test/test_per_lcore.c|8 +- > app/test/test_pmd_ring.c | 19 ++-- > app/test/test_power.c| 20 ++-- > app/test/test_prefetch.c |8 +- > app/test/test_red.c | 20 ++-- > app/test/test_ring.c |8 +- > app/test/test_ring_perf.c|8 +- > app/test/test_rwlock.c |8 +- > app/test/test_sched.c| 18 ++-- > app/test/test_spinlock.c |8 +- > app/test/test_string_fns.c |8 +- > app/test/test_table.c| 21 ++--- > app/test/test_table.h|1 - > app/test/test_table_acl.c|4 - > app/test/test_table_combined.c |3 - > app/test/test_table_pipeline.c |8 -- > app/test/test_table_ports.c |4 - > app/test/test_table_tables.c |4 - > app/test/test_tailq.c|8 +- > app/test/test_timer.c| 17 ++-- > app/test/test_timer_perf.c | 17 ++-- > app/test/test_version.c |8 +- > 69 files changed, 550 insertions(+), 623 deletions(-) > > -- > 1.7.10.4 > >
[dpdk-dev] [PATCH v2 0/7] fix build errors
This patch series resolves build errors I encountered after disabling some parts of the dpdk. - simplified app/*/Makefile, - fixed some build error when disabling refcnt, - removed dead code (reference to pm_autotest), - reworked all the tests from app/test to use a dynamic register mechanism (this makes it easier to enable/disable them), - reworked app/test Makefile to only enable the relevant tests. Changes since v1: - fixed typo in first patch (RTE_CONFIG.. in app/test/Makefile) -- David Marchand David Marchand (7): app: simplify makefiles app/test: use accessor to set refcnt field app/test: remove pm_autotest app/test: introduce dynamic commands list app/test: convert all tests to register system app/test: no more builtin commands app/test: only build what has been selected in config app/cmdline_test/Makefile|8 +- app/dump_cfg/Makefile|5 +- app/test-acl/Makefile|9 +- app/test-pipeline/Makefile | 26 ++--- app/test-pmd/Makefile| 40 app/test/Makefile| 145 app/test/autotest_data.py|6 -- app/test/commands.c | 193 -- app/test/test.c |5 + app/test/test.h | 74 +-- app/test/test_acl.c | 18 ++-- app/test/test_alarm.c|7 +- app/test/test_atomic.c |7 +- app/test/test_byteorder.c|8 +- app/test/test_cmdline.c | 11 ++- app/test/test_common.c |8 +- app/test/test_cpuflags.c |8 +- app/test/test_cycles.c |8 +- app/test/test_debug.c|8 +- app/test/test_devargs.c |8 +- app/test/test_distributor.c | 22 ++--- app/test/test_distributor_perf.c | 20 ++-- app/test/test_eal_flags.c| 20 ++-- app/test/test_eal_fs.c | 17 ++-- app/test/test_errno.c|8 +- app/test/test_func_reentrancy.c |8 +- app/test/test_hash.c | 19 ++-- app/test/test_hash_perf.c| 19 ++-- app/test/test_interrupts.c |7 +- app/test/test_ivshmem.c | 15 +-- app/test/test_kni.c | 18 ++-- app/test/test_kvargs.c |9 +- app/test/test_link_bonding.c |8 +- app/test/test_logs.c |8 +- app/test/test_lpm.c | 19 ++-- app/test/test_lpm6.c | 19 ++-- app/test/test_malloc.c |8 +- app/test/test_mbuf.c |8 +- app/test/test_memcpy.c |8 +- app/test/test_memcpy_perf.c |8 +- app/test/test_memory.c |8 +- app/test/test_mempool.c |8 +- app/test/test_mempool_perf.c |8 +- app/test/test_memzone.c |8 +- app/test/test_meter.c| 18 ++-- app/test/test_mp_secondary.c | 19 +--- app/test/test_pci.c |6 ++ app/test/test_per_lcore.c|8 +- app/test/test_pmd_ring.c | 19 ++-- app/test/test_power.c| 20 ++-- app/test/test_prefetch.c |8 +- app/test/test_red.c | 20 ++-- app/test/test_ring.c |8 +- app/test/test_ring_perf.c|8 +- app/test/test_rwlock.c |8 +- app/test/test_sched.c| 18 ++-- app/test/test_spinlock.c |8 +- app/test/test_string_fns.c |8 +- app/test/test_table.c| 21 ++--- app/test/test_table.h|1 - app/test/test_table_acl.c|4 - app/test/test_table_combined.c |3 - app/test/test_table_pipeline.c |8 -- app/test/test_table_ports.c |4 - app/test/test_table_tables.c |4 - app/test/test_tailq.c|8 +- app/test/test_timer.c| 17 ++-- app/test/test_timer_perf.c | 17 ++-- app/test/test_version.c |8 +- 69 files changed, 550 insertions(+), 623 deletions(-) -- 1.7.10.4
[dpdk-dev] [PATCH v2 1/7] app: simplify makefiles
No need to test some build option multiple times in a Makefile. Besides, such option is needed by the associated app, so move it at the top of the Makefile. Signed-off-by: David Marchand --- app/cmdline_test/Makefile |8 ++- app/dump_cfg/Makefile |5 +- app/test-acl/Makefile |9 ++-- app/test-pipeline/Makefile | 26 +- app/test-pmd/Makefile | 40 +++ app/test/Makefile | 122 ++-- 6 files changed, 110 insertions(+), 100 deletions(-) diff --git a/app/cmdline_test/Makefile b/app/cmdline_test/Makefile index 11c3aba..e9eafd2 100644 --- a/app/cmdline_test/Makefile +++ b/app/cmdline_test/Makefile @@ -31,6 +31,8 @@ include $(RTE_SDK)/mk/rte.vars.mk +ifeq ($(CONFIG_RTE_LIBRTE_CMDLINE),y) + # # library name # @@ -39,10 +41,12 @@ APP = cmdline_test # # all sources are stored in SRCS-y # -SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += cmdline_test.c -SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += commands.c +SRCS-y += cmdline_test.c +SRCS-y += commands.c CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) include $(RTE_SDK)/mk/rte.app.mk + +endif diff --git a/app/dump_cfg/Makefile b/app/dump_cfg/Makefile index 4c0714e..3257127 100644 --- a/app/dump_cfg/Makefile +++ b/app/dump_cfg/Makefile @@ -40,7 +40,6 @@ CFLAGS += $(WERROR_FLAGS) SRCS-y := main.c # this application needs libraries first - DEPDIRS-y += lib - - include $(RTE_SDK)/mk/rte.app.mk +DEPDIRS-y += lib +include $(RTE_SDK)/mk/rte.app.mk diff --git a/app/test-acl/Makefile b/app/test-acl/Makefile index 00fa3b6..43dfdcb 100644 --- a/app/test-acl/Makefile +++ b/app/test-acl/Makefile @@ -31,15 +31,18 @@ include $(RTE_SDK)/mk/rte.vars.mk +ifeq ($(CONFIG_RTE_LIBRTE_ACL),y) + APP = testacl CFLAGS += $(WERROR_FLAGS) # all source are stored in SRCS-y -SRCS-$(CONFIG_RTE_LIBRTE_ACL) := main.c +SRCS-y := main.c # this application needs libraries first -DEPDIRS-$(CONFIG_RTE_LIBRTE_ACL) += lib - +DEPDIRS-y += lib include $(RTE_SDK)/mk/rte.app.mk + +endif diff --git a/app/test-pipeline/Makefile b/app/test-pipeline/Makefile index 6cc0985..b81652f 100644 --- a/app/test-pipeline/Makefile +++ b/app/test-pipeline/Makefile @@ -31,6 +31,8 @@ include $(RTE_SDK)/mk/rte.vars.mk +ifeq ($(CONFIG_RTE_LIBRTE_PIPELINE),y) + # # library name # @@ -46,21 +48,21 @@ endif # # all source are stored in SRCS-y # -SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) := main.c -SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += config.c -SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += init.c -SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += runtime.c -SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += pipeline_stub.c -SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += pipeline_hash.c -SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += pipeline_lpm.c -SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += pipeline_lpm_ipv6.c +SRCS-y := main.c +SRCS-y += config.c +SRCS-y += init.c +SRCS-y += runtime.c +SRCS-y += pipeline_stub.c +SRCS-y += pipeline_hash.c +SRCS-y += pipeline_lpm.c +SRCS-y += pipeline_lpm_ipv6.c # include ACL lib if available -ifeq ($(CONFIG_RTE_LIBRTE_ACL),y) -SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += pipeline_acl.c -endif +SRCS-$(CONFIG_RTE_LIBRTE_ACL) += pipeline_acl.c # this application needs libraries first -DEPDIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) += lib +DEPDIRS-y += lib include $(RTE_SDK)/mk/rte.app.mk + +endif diff --git a/app/test-pmd/Makefile b/app/test-pmd/Makefile index debf880..97dc2e6 100644 --- a/app/test-pmd/Makefile +++ b/app/test-pmd/Makefile @@ -31,6 +31,8 @@ include $(RTE_SDK)/mk/rte.vars.mk +ifeq ($(CONFIG_RTE_TEST_PMD),y) + # # library name # @@ -46,25 +48,21 @@ endif # # all source are stored in SRCS-y # -SRCS-$(CONFIG_RTE_TEST_PMD) := testpmd.c -SRCS-$(CONFIG_RTE_TEST_PMD) += parameters.c -ifeq ($(CONFIG_RTE_LIBRTE_CMDLINE),y) -SRCS-$(CONFIG_RTE_TEST_PMD) += cmdline.c -endif -SRCS-$(CONFIG_RTE_TEST_PMD) += config.c -SRCS-$(CONFIG_RTE_TEST_PMD) += iofwd.c -SRCS-$(CONFIG_RTE_TEST_PMD) += macfwd.c -SRCS-$(CONFIG_RTE_TEST_PMD) += macfwd-retry.c -SRCS-$(CONFIG_RTE_TEST_PMD) += macswap.c -SRCS-$(CONFIG_RTE_TEST_PMD) += flowgen.c -SRCS-$(CONFIG_RTE_TEST_PMD) += rxonly.c -SRCS-$(CONFIG_RTE_TEST_PMD) += txonly.c -SRCS-$(CONFIG_RTE_TEST_PMD) += csumonly.c -SRCS-$(CONFIG_RTE_TEST_PMD) += icmpecho.c -ifeq ($(CONFIG_RTE_LIBRTE_IEEE1588),y) -SRCS-$(CONFIG_RTE_TEST_PMD) += ieee1588fwd.c -endif -SRCS-$(CONFIG_RTE_TEST_PMD) += mempool_anon.c +SRCS-y := testpmd.c +SRCS-y += parameters.c +SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += cmdline.c +SRCS-y += config.c +SRCS-y += iofwd.c +SRCS-y += macfwd.c +SRCS-y += macfwd-retry.c +SRCS-y += macswap.c +SRCS-y += flowgen.c +SRCS-y += rxonly.c +SRCS-y += txonly.c +SRCS-y += csumonly.c +SRCS-y += icmpecho.c +SRCS-$(CONFIG_RTE_LIBRTE_IEEE1588) += ieee1588fwd.c +SRCS-y += mempool_anon.c ifeq ($(CONFIG_RTE_EXEC_ENV_LINUXAPP),y) CFLAGS_mempool_anon.o := -D_GNU_SOURCE @@ -72,6 +70,8 @@ endif CFLAGS_cmdline.o := -D_GNU_SOURCE # this application needs libraries first -DEPDIRS-$(CONFIG_RTE_TEST_PMD) += lib +DEPDIRS-y += lib include $
[dpdk-dev] [PATCH v2 2/7] app/test: use accessor to set refcnt field
refcnt field can not be accessed directly as it depends on the RTE_MBUF_REFCNT build option. Signed-off-by: David Marchand --- app/test/test_distributor.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/test/test_distributor.c b/app/test/test_distributor.c index e7dc1fb..7648ed1 100644 --- a/app/test/test_distributor.c +++ b/app/test/test_distributor.c @@ -282,7 +282,7 @@ sanity_test_with_mbuf_alloc(struct rte_distributor *d, struct rte_mempool *p) rte_distributor_process(d, NULL, 0); for (j = 0; j < BURST; j++) { bufs[j]->pkt.hash.rss = (i+j) << 1; - bufs[j]->refcnt = 1; + rte_mbuf_refcnt_set(bufs[j], 1); } rte_distributor_process(d, bufs, BURST); -- 1.7.10.4
[dpdk-dev] [PATCH v2 3/7] app/test: remove pm_autotest
This test is not linked to any code, remove it. It may be some leftover from 24f42575dfe2226f126546d0ca501cba9fbd6373. Signed-off-by: David Marchand --- app/test/autotest_data.py |6 -- app/test/commands.c |2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/app/test/autotest_data.py b/app/test/autotest_data.py index d0c55c8..878c72e 100644 --- a/app/test/autotest_data.py +++ b/app/test/autotest_data.py @@ -340,12 +340,6 @@ parallel_test_group_list = [ "Func" : default_autotest, "Report" : None, }, - { -"Name" : "Pattern match autotest", -"Command" :"pm_autotest", -"Func" : default_autotest, -"Report" : None, - }, { "Name" :"Sched autotest", "Command" : "sched_autotest", diff --git a/app/test/commands.c b/app/test/commands.c index 5f23420..4a0cc05 100644 --- a/app/test/commands.c +++ b/app/test/commands.c @@ -238,7 +238,7 @@ 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#ivshmem_autotest#" + "ivshmem_autotest#" "devargs_autotest#table_autotest#" #ifdef RTE_LIBRTE_ACL "acl_autotest#" -- 1.7.10.4
[dpdk-dev] [PATCH v2 4/7] app/test: introduce dynamic commands list
This patch adds a way to dynamically add a test without modifying commands.c. Move all current tests in a builtin_commands[] list, next patch will convert them to this new system. Signed-off-by: David Marchand --- app/test/commands.c | 118 ++- app/test/test.c |3 ++ app/test/test.h | 21 + 3 files changed, 103 insertions(+), 39 deletions(-) diff --git a/app/test/commands.c b/app/test/commands.c index 4a0cc05..a1ffd43 100644 --- a/app/test/commands.c +++ b/app/test/commands.c @@ -78,6 +78,15 @@ // +static struct test_commands_list commands_list = + TAILQ_HEAD_INITIALIZER(commands_list); + +void +add_test_command(struct test_command *t) +{ + TAILQ_INSERT_TAIL(&commands_list, t, next); +} + struct cmd_autotest_result { cmdline_fixed_string_t autotest; }; @@ -86,9 +95,15 @@ static void cmd_autotest_parsed(void *parsed_result, __attribute__((unused)) struct cmdline *cl, __attribute__((unused)) void *data) { + struct test_command *t; struct cmd_autotest_result *res = parsed_result; int ret = 0; + TAILQ_FOREACH(t, &commands_list, next) { + if (!strcmp(res->autotest, t->command)) + ret = t->callback(); + } + if (!strcmp(res->autotest, "version_autotest")) ret = test_version(); if (!strcmp(res->autotest, "eal_fs_autotest")) @@ -214,45 +229,7 @@ static void cmd_autotest_parsed(void *parsed_result, cmdline_parse_token_string_t cmd_autotest_autotest = TOKEN_STRING_INITIALIZER(struct cmd_autotest_result, autotest, - "pci_autotest#memory_autotest#" - "per_lcore_autotest#spinlock_autotest#" - "rwlock_autotest#atomic_autotest#" - "byteorder_autotest#prefetch_autotest#" - "cycles_autotest#logs_autotest#" - "memzone_autotest#ring_autotest#" - "mempool_autotest#mbuf_autotest#" - "timer_autotest#malloc_autotest#" - "memcpy_autotest#hash_autotest#" - "lpm_autotest#debug_autotest#" - "lpm6_autotest#" - "errno_autotest#tailq_autotest#" - "string_autotest#multiprocess_autotest#" - "cpuflags_autotest#eal_flags_autotest#" - "alarm_autotest#interrupt_autotest#" - "version_autotest#eal_fs_autotest#" - "cmdline_autotest#func_reentrancy_autotest#" -#ifdef RTE_LIBRTE_PMD_BOND - "link_bonding_autotest#" -#endif - "mempool_perf_autotest#hash_perf_autotest#" - "memcpy_perf_autotest#ring_perf_autotest#" - "red_autotest#meter_autotest#sched_autotest#" - "memcpy_perf_autotest#kni_autotest#" - "ivshmem_autotest#" - "devargs_autotest#table_autotest#" -#ifdef RTE_LIBRTE_ACL - "acl_autotest#" -#endif - "power_autotest#" - "timer_perf_autotest#" -#ifdef RTE_LIBRTE_PMD_RING - "ring_pmd_autotest#" -#endif -#ifdef RTE_LIBRTE_KVARGS - "kvargs_autotest#" -#endif - "common_autotest#" - "distributor_autotest#distributor_perf_autotest"); +""); cmdline_parse_inst_t cmd_autotest = { .f = cmd_autotest_parsed, /* function to call */ @@ -460,3 +437,66 @@ cmdline_parse_ctx_t main_ctx[] = { NULL, }; +int commands_init(void) +{ + struct test_command *t; + char builtin_commands[] = + "pci_autotest#memory_autotest#" + "per_lcore_autotest#spinlock_autotest#" + "rwlock_autotest#atomic_autotest#" + "byteorder_autotest#prefetch_autotest#" + "cycles_autotest#logs_autotest#" + "memzone_autotest#ring_autotest#" + "mempool_autotest#mbuf_autotest#" + "timer_autotest#malloc_autotest#" + "memcpy_autotest#hash_autotest#" + "lpm_autotest#debug_autotest#" + "lpm6_autotest#" + "errno_autotest#tailq_autotest#" + "string_autotest#multiprocess_autotest#" + "cpuflags_autotest#eal_flags_autotest#" + "alarm_autotest#interrupt_autotest#" + "version_autotest#eal_fs_autotest#" + "cmdline_autotest#func_reentrancy_autotest#" +#ifdef RTE_LIBRTE_PMD_BOND + "link_bonding_autotest#" +
[dpdk-dev] [PATCH v2 5/7] app/test: convert all tests to register system
Remove all tests from the builtin commands list and use the dynamic commands list register macro. Signed-off-by: David Marchand --- app/test/commands.c | 157 +- app/test/test.c |2 + app/test/test.h | 55 + app/test/test_acl.c | 15 ++-- app/test/test_alarm.c|7 +- app/test/test_atomic.c |7 +- app/test/test_byteorder.c|8 +- app/test/test_cmdline.c | 13 ++-- app/test/test_common.c |8 +- app/test/test_cpuflags.c |8 +- app/test/test_cycles.c |8 +- app/test/test_debug.c|8 +- app/test/test_devargs.c |8 +- app/test/test_distributor.c | 18 ++--- app/test/test_distributor_perf.c | 18 ++--- app/test/test_eal_flags.c| 18 ++--- app/test/test_eal_fs.c | 15 ++-- app/test/test_errno.c|8 +- app/test/test_func_reentrancy.c |8 +- app/test/test_hash.c | 16 ++-- app/test/test_hash_perf.c| 16 ++-- app/test/test_interrupts.c |7 +- app/test/test_ivshmem.c | 12 ++- app/test/test_kni.c | 16 ++-- app/test/test_kvargs.c |9 ++- app/test/test_link_bonding.c |8 +- app/test/test_logs.c |8 +- app/test/test_lpm.c | 16 ++-- app/test/test_lpm6.c | 16 ++-- app/test/test_malloc.c |8 +- app/test/test_mbuf.c |8 +- app/test/test_memcpy.c |8 +- app/test/test_memcpy_perf.c |8 +- app/test/test_memory.c |8 +- app/test/test_mempool.c |8 +- app/test/test_mempool_perf.c |8 +- app/test/test_memzone.c |8 +- app/test/test_meter.c| 15 ++-- app/test/test_mp_secondary.c | 17 ++--- app/test/test_pci.c |6 ++ app/test/test_per_lcore.c|8 +- app/test/test_pmd_ring.c | 15 ++-- app/test/test_power.c| 16 ++-- app/test/test_prefetch.c |8 +- app/test/test_red.c | 17 ++--- app/test/test_ring.c |8 +- app/test/test_ring_perf.c|8 +- app/test/test_rwlock.c |8 +- app/test/test_sched.c| 15 ++-- app/test/test_spinlock.c |8 +- app/test/test_string_fns.c |8 +- app/test/test_table.c| 19 ++--- app/test/test_table.h|1 - app/test/test_tailq.c|8 +- app/test/test_timer.c| 15 ++-- app/test/test_timer_perf.c | 15 ++-- app/test/test_version.c |8 +- 57 files changed, 358 insertions(+), 442 deletions(-) diff --git a/app/test/commands.c b/app/test/commands.c index a1ffd43..0640ac9 100644 --- a/app/test/commands.c +++ b/app/test/commands.c @@ -104,122 +104,6 @@ static void cmd_autotest_parsed(void *parsed_result, ret = t->callback(); } - if (!strcmp(res->autotest, "version_autotest")) - ret = test_version(); - if (!strcmp(res->autotest, "eal_fs_autotest")) - ret = test_eal_fs(); - if (!strcmp(res->autotest, "debug_autotest")) - ret = test_debug(); - if (!strcmp(res->autotest, "pci_autotest")) - ret = test_pci(); - if (!strcmp(res->autotest, "prefetch_autotest")) - ret = test_prefetch(); - if (!strcmp(res->autotest, "byteorder_autotest")) - ret = test_byteorder(); - if (!strcmp(res->autotest, "per_lcore_autotest")) - ret = test_per_lcore(); - if (!strcmp(res->autotest, "atomic_autotest")) - ret = test_atomic(); - if (!strcmp(res->autotest, "malloc_autotest")) - ret = test_malloc(); - if (!strcmp(res->autotest, "spinlock_autotest")) - ret = test_spinlock(); - if (!strcmp(res->autotest, "memory_autotest")) - ret = test_memory(); - if (!strcmp(res->autotest, "memzone_autotest")) - ret = test_memzone(); - if (!strcmp(res->autotest, "rwlock_autotest")) - ret = test_rwlock(); - if (!strcmp(res->autotest, "mbuf_autotest")) - ret = test_mbuf(); - if (!strcmp(res->autotest, "logs_autotest")) - ret = test_logs(); - if (!strcmp(res->autotest, "errno_autotest")) - ret = test_errno(); - if (!strcmp(res->autotest, "hash_autotest")) - ret = test_hash(); - if (!strcmp(res->autotest, "hash_perf_autotest")) - ret = test_hash_perf(); - if (!strcmp(res->autotest, "lpm_autotest")) - ret = test_lpm(); - if (!strcmp(res->autotest, "lpm6_autotest")) - ret = test_lpm6(); - if (!strcmp(res->autotest, "cpuflags_autotest")) - ret = test_cpuflags(); -
[dpdk-dev] [PATCH v2 6/7] app/test: no more builtin commands
The builtin commands list is now empty, we can remove it. Signed-off-by: David Marchand --- app/test/commands.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/test/commands.c b/app/test/commands.c index 0640ac9..b7c6ee0 100644 --- a/app/test/commands.c +++ b/app/test/commands.c @@ -324,9 +324,8 @@ cmdline_parse_ctx_t main_ctx[] = { int commands_init(void) { struct test_command *t; - char builtin_commands[] = ""; char *commands, *ptr; - int commands_len = strlen(builtin_commands) + 1; + int commands_len = 0; TAILQ_FOREACH(t, &commands_list, next) { commands_len += strlen(t->command) + 1; @@ -340,7 +339,8 @@ int commands_init(void) TAILQ_FOREACH(t, &commands_list, next) { ptr += sprintf(ptr, "%s#", t->command); } - ptr += sprintf(ptr, "%s", builtin_commands); + ptr--; + ptr[0] = '\0'; cmd_autotest_autotest.string_data.str = commands; return 0; -- 1.7.10.4
[dpdk-dev] [PATCH v2 7/7] app/test: only build what has been selected in config
Avoid building tests if their counterparts are not selected in config. This has the nice side effect of fixing build errors when disabling parts of the dpdk. Signed-off-by: David Marchand --- app/test/Makefile| 61 ++ app/test/test_acl.c |3 -- app/test/test_cmdline.c |2 -- app/test/test_distributor.c |2 -- app/test/test_distributor_perf.c |2 -- app/test/test_eal_flags.c|2 -- app/test/test_eal_fs.c |2 -- app/test/test_hash.c |3 -- app/test/test_hash_perf.c|3 -- app/test/test_ivshmem.c |3 -- app/test/test_kni.c |2 -- app/test/test_lpm.c |3 -- app/test/test_lpm6.c |3 -- app/test/test_meter.c|3 -- app/test/test_mp_secondary.c |2 -- app/test/test_pmd_ring.c |4 --- app/test/test_power.c|4 --- app/test/test_red.c |3 -- app/test/test_sched.c|3 -- app/test/test_table.c|4 --- app/test/test_table_acl.c|4 --- app/test/test_table_combined.c |3 -- app/test/test_table_pipeline.c |8 - app/test/test_table_ports.c |4 --- app/test/test_table_tables.c |4 --- app/test/test_timer.c|2 -- app/test/test_timer_perf.c |2 -- 27 files changed, 42 insertions(+), 99 deletions(-) diff --git a/app/test/Makefile b/app/test/Makefile index 445405a..37a3772 100644 --- a/app/test/Makefile +++ b/app/test/Makefile @@ -53,39 +53,57 @@ SRCS-y += test_cycles.c SRCS-y += test_spinlock.c SRCS-y += test_memory.c SRCS-y += test_memzone.c + SRCS-y += test_ring.c +SRCS-y += test_ring_perf.c + +ifeq ($(CONFIG_RTE_LIBRTE_TABLE),y) SRCS-y += test_table.c -SRCS-y += test_table_pipeline.c +SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += test_table_pipeline.c SRCS-y += test_table_tables.c SRCS-y += test_table_ports.c SRCS-y += test_table_combined.c -SRCS-y += test_table_acl.c -SRCS-y += test_ring_perf.c +SRCS-$(CONFIG_RTE_LIBRTE_ACL) += test_table_acl.c +endif + SRCS-y += test_rwlock.c -SRCS-y += test_timer.c + +SRCS-$(CONFIG_RTE_LIBRTE_TIMER) += test_timer.c +SRCS-$(CONFIG_RTE_LIBRTE_TIMER) += test_timer_perf.c + SRCS-y += test_mempool.c SRCS-y += test_mempool_perf.c + SRCS-y += test_mbuf.c SRCS-y += test_logs.c + SRCS-y += test_memcpy.c SRCS-y += test_memcpy_perf.c -SRCS-y += test_hash.c -SRCS-y += test_hash_perf.c -SRCS-y += test_lpm.c -SRCS-y += test_lpm6.c + +SRCS-$(CONFIG_RTE_LIBRTE_HASH) += test_hash.c +SRCS-$(CONFIG_RTE_LIBRTE_HASH) += test_hash_perf.c + +SRCS-$(CONFIG_RTE_LIBRTE_LPM) += test_lpm.c +SRCS-$(CONFIG_RTE_LIBRTE_LPM) += test_lpm6.c + SRCS-y += test_debug.c SRCS-y += test_errno.c SRCS-y += test_tailq.c SRCS-y += test_string_fns.c -SRCS-y += test_mp_secondary.c SRCS-y += test_cpuflags.c + +ifeq ($(CONFIG_RTE_EXEC_ENV_BAREMETAL),) +SRCS-y += test_mp_secondary.c SRCS-y += test_eal_flags.c +SRCS-y += test_eal_fs.c +endif + SRCS-y += test_alarm.c SRCS-y += test_interrupts.c SRCS-y += test_version.c -SRCS-y += test_eal_fs.c SRCS-y += test_func_reentrancy.c -SRCS-y += test_cmdline.c + +SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += test_cmdline.c SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += test_cmdline_num.c SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += test_cmdline_etheraddr.c SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += test_cmdline_portlist.c @@ -93,16 +111,21 @@ SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += test_cmdline_ipaddr.c SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += test_cmdline_cirbuf.c SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += test_cmdline_string.c SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += test_cmdline_lib.c + +ifeq ($(CONFIG_RTE_LIBRTE_SCHED),y) SRCS-y += test_red.c -SRCS-y += test_sched.c -SRCS-y += test_meter.c -SRCS-y += test_kni.c -SRCS-y += test_power.c +SRCS-$(CONFIG_RTE_ARCH_X86_64) += test_sched.c +endif + +SRCS-$(CONFIG_RTE_LIBRTE_METER) += test_meter.c +SRCS-$(CONFIG_RTE_LIBRTE_KNI) += test_kni.c +SRCS-$(CONFIG_RTE_LIBRTE_POWER) += test_power.c SRCS-y += test_common.c -SRCS-y += test_timer_perf.c -SRCS-y += test_ivshmem.c -SRCS-y += test_distributor.c -SRCS-y += test_distributor_perf.c +SRCS-$(CONFIG_RTE_LIBRTE_IVSHMEM) += test_ivshmem.c + +SRCS-$(CONFIG_RTE_LIBRTE_DISTRIBUTOR) += test_distributor.c +SRCS-$(CONFIG_RTE_LIBRTE_DISTRIBUTOR) += test_distributor_perf.c + SRCS-y += test_devargs.c SRCS-y += virtual_pmd.c SRCS-y += packet_burst_generator.c diff --git a/app/test/test_acl.c b/app/test/test_acl.c index 4e7b470..c6b3f86 100644 --- a/app/test/test_acl.c +++ b/app/test/test_acl.c @@ -36,8 +36,6 @@ #include "test.h" -#ifdef RTE_LIBRTE_ACL - #include #include #include @@ -934,4 +932,3 @@ static struct test_command acl_cmd = { .callback = test_acl, }; REGISTER_TEST_COMMAND(acl_cmd); -#endif /* RTE_LIBRTE_ACL */ diff --git a/app/test/test_cmdline.c b/app/test/test_cmdline.c index 9b8bd5c..2b5840f 100644 --- a/app/test/test_cmdline.c
[dpdk-dev] How to use dpdk ring and mem lib in kernel level?
> -Original Message- > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of GongJinrong > Sent: Sunday, August 17, 2014 7:10 AM > To: dev at dpdk.org > Subject: [dpdk-dev] How to use dpdk ring and mem lib in kernel level? > > Hi, guys > >Can dpdk support allocate mempool and create ring in kernel level? I know > dpdk is user space driver, but many application need a channel to transmit > data from kernel to user space without any hardware dependency(just like pf > ring)? Anyone has a sample like this? > > Best Regards > John Gong Have you looked at the KNI kernel module and library, it might provide what you need? It is documented in the programmers guide, if you want to read up about it. Regards, /Bruce
[dpdk-dev] [PATCH] kni: fix build with Linux 3.17
In the series of ever-lasting ugly #ifdefs trying make out-of-tree drivers to support latest mainline kernel... Signed-off-by: Aaro Koskinen --- lib/librte_eal/linuxapp/kni/kni_misc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/librte_eal/linuxapp/kni/kni_misc.c b/lib/librte_eal/linuxapp/kni/kni_misc.c index 1c085d9..ba6 100644 --- a/lib/librte_eal/linuxapp/kni/kni_misc.c +++ b/lib/librte_eal/linuxapp/kni/kni_misc.c @@ -345,6 +345,9 @@ kni_ioctl_create(unsigned int ioctl_num, unsigned long ioctl_param) up_read(&kni_list_lock); net_dev = alloc_netdev(sizeof(struct kni_dev), dev_info.name, +#ifdef NET_NAME_UNKNOWN + NET_NAME_UNKNOWN, +#endif kni_net_init); if (net_dev == NULL) { KNI_ERR("error allocating device \"%s\"\n", dev_info.name); -- 2.0.0
[dpdk-dev] [PATCH v2 0/7] fix build errors
On Mon, Aug 18, 2014 at 01:29:18PM +0200, David Marchand wrote: > This patch series resolves build errors I encountered after disabling some > parts > of the dpdk. > > - simplified app/*/Makefile, > - fixed some build error when disabling refcnt, > - removed dead code (reference to pm_autotest), > - reworked all the tests from app/test to use a dynamic register mechanism > (this makes it easier to enable/disable them), > - reworked app/test Makefile to only enable the relevant tests. > > Changes since v1: > - fixed typo in first patch (RTE_CONFIG.. in app/test/Makefile) > > -- > David Marchand > This looks like a good idea to me, simplifies the code and the boiler-plate work to be done when adding new tests. Series Acked-by: Bruce Richardson
[dpdk-dev] support ipip and ipsec tunnel
I wonder if there is a way to do IP-over-IP (gif) or IPsec tunneling over DPDK? If not, what would it take to add that support?
[dpdk-dev] [PATCH 0/7] fix build errors
On Mon, Aug 18, 2014 at 11:26:06AM +0200, David Marchand wrote: > This patch series resolves build errors I encountered after disabling some > parts > of the dpdk. > > - simplified app/*/Makefile, > - fixed some build error when disabling refcnt, > - removed dead code (reference to pm_autotest), > - reworked all the tests from app/test to use a dynamic register mechanism > (this makes it easier to enable/disable them), > - reworked app/test Makefile to only enable the relevant tests. > > -- > David Marchand > > David Marchand (7): > app: simplify makefiles > app/test: use accessor to set refcnt field > app/test: remove pm_autotest > app/test: introduce dynamic commands list > app/test: convert all tests to register system > app/test: no more builtin commands > app/test: only build what has been selected in config > > app/cmdline_test/Makefile|8 +- > app/dump_cfg/Makefile|5 +- > app/test-acl/Makefile|9 +- > app/test-pipeline/Makefile | 26 ++--- > app/test-pmd/Makefile| 40 > app/test/Makefile| 145 > app/test/autotest_data.py|6 -- > app/test/commands.c | 193 > -- > app/test/test.c |5 + > app/test/test.h | 74 +-- > app/test/test_acl.c | 18 ++-- > app/test/test_alarm.c|7 +- > app/test/test_atomic.c |7 +- > app/test/test_byteorder.c|8 +- > app/test/test_cmdline.c | 11 ++- > app/test/test_common.c |8 +- > app/test/test_cpuflags.c |8 +- > app/test/test_cycles.c |8 +- > app/test/test_debug.c|8 +- > app/test/test_devargs.c |8 +- > app/test/test_distributor.c | 22 ++--- > app/test/test_distributor_perf.c | 20 ++-- > app/test/test_eal_flags.c| 20 ++-- > app/test/test_eal_fs.c | 17 ++-- > app/test/test_errno.c|8 +- > app/test/test_func_reentrancy.c |8 +- > app/test/test_hash.c | 19 ++-- > app/test/test_hash_perf.c| 19 ++-- > app/test/test_interrupts.c |7 +- > app/test/test_ivshmem.c | 15 +-- > app/test/test_kni.c | 18 ++-- > app/test/test_kvargs.c |9 +- > app/test/test_link_bonding.c |8 +- > app/test/test_logs.c |8 +- > app/test/test_lpm.c | 19 ++-- > app/test/test_lpm6.c | 19 ++-- > app/test/test_malloc.c |8 +- > app/test/test_mbuf.c |8 +- > app/test/test_memcpy.c |8 +- > app/test/test_memcpy_perf.c |8 +- > app/test/test_memory.c |8 +- > app/test/test_mempool.c |8 +- > app/test/test_mempool_perf.c |8 +- > app/test/test_memzone.c |8 +- > app/test/test_meter.c| 18 ++-- > app/test/test_mp_secondary.c | 19 +--- > app/test/test_pci.c |6 ++ > app/test/test_per_lcore.c|8 +- > app/test/test_pmd_ring.c | 19 ++-- > app/test/test_power.c| 20 ++-- > app/test/test_prefetch.c |8 +- > app/test/test_red.c | 20 ++-- > app/test/test_ring.c |8 +- > app/test/test_ring_perf.c|8 +- > app/test/test_rwlock.c |8 +- > app/test/test_sched.c| 18 ++-- > app/test/test_spinlock.c |8 +- > app/test/test_string_fns.c |8 +- > app/test/test_table.c| 21 ++--- > app/test/test_table.h|1 - > app/test/test_table_acl.c|4 - > app/test/test_table_combined.c |3 - > app/test/test_table_pipeline.c |8 -- > app/test/test_table_ports.c |4 - > app/test/test_table_tables.c |4 - > app/test/test_tailq.c|8 +- > app/test/test_timer.c| 17 ++-- > app/test/test_timer_perf.c | 17 ++-- > app/test/test_version.c |8 +- > 69 files changed, 550 insertions(+), 623 deletions(-) > > -- > 1.7.10.4 > > Agree with Bruce here, this is a nice consolidation. Acked-by: Neil Horman
[dpdk-dev] VMware Fusion + DPDK and KNI
Thought I'd put this out there in case anyone else runs into it. Using DPDK 1.6 on Ubuntu 14.04 LTS in a hardware appliance. Also using KNI to share the data ports with an app that needs a normal TCP/IP stack interface. We had everything working reasonably well on the hardware, but most of our developers run their code in a VM on their laptops: OS X (Mavericks) + VMware Fusion 6 Pro. On some VMs, we were getting errors trying to configure KNI ports: $ sudo ifconfig ffEth0 10.111.2.100 netmask 255.255.0.0 up SIOCSIFFLAGS: Timer expired SIOCSIFFLAGS: Timer expired Skipping the "fun" involved with trying to track down the problem, here's what ended up fixing it. We had 4 network ports on the VM: - eth0 - Management port - eth1 - "other" function not related to the problem - eth2 & eth3 - inline datapath (bump-in-the-wire), but also KNI mapped to ffEth0 & ffEth1 by our DPDK app If eth2 and eth3 are on the same vmnet, you'll get the "SIOCSIFFLAGS: Timer expired" errors. Depending on what parameters you try to set, ifconfig may think some of them have taken effect (they haven't) or it won't (setting the MTU, etc.). If you put eth2 and eth3 on separate vmnets, then no issues and you can configure the KNI ports via ifconfig as expected. No idea why having the ports on the same vmnet matters, since our app doesn't care, but I haven't gone spelunking through the KNI source to find the root cause. Doubtful this will matter to many (any?), but maybe it'll save someone some time. Jay Rolette *infinite io*