From: Sunil Kumar Kori Date: Wed, 22 Apr 2020 19:03:45 +0000 (+0530) Subject: ethdev: add tracepoints X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=78d44153de8f7041ff35cb2c676fac8b9488f753;p=dpdk.git ethdev: add tracepoints Add tracepoints at important and mandatory APIs for tracing support. Signed-off-by: Sunil Kumar Kori Acked-by: David Marchand --- diff --git a/examples/cmdline/Makefile b/examples/cmdline/Makefile index 0b6b54540a..9a33355d0b 100644 --- a/examples/cmdline/Makefile +++ b/examples/cmdline/Makefile @@ -57,6 +57,7 @@ SRCS-y := main.c commands.c parse_obj_list.c CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) +CFLAGS += -DALLOW_EXPERIMENTAL_API include $(RTE_SDK)/mk/rte.extapp.mk diff --git a/examples/cmdline/meson.build b/examples/cmdline/meson.build index a8608c21a6..7de0f16251 100644 --- a/examples/cmdline/meson.build +++ b/examples/cmdline/meson.build @@ -6,6 +6,7 @@ # To build this example as a standalone application with an already-installed # DPDK instance, use 'make' +allow_experimental_apis = true sources = files( 'commands.c', 'main.c', 'parse_obj_list.c' ) diff --git a/examples/distributor/Makefile b/examples/distributor/Makefile index 4192d8a4ae..63c14dfcad 100644 --- a/examples/distributor/Makefile +++ b/examples/distributor/Makefile @@ -50,6 +50,7 @@ RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.conf include $(RTE_SDK)/mk/rte.vars.mk CFLAGS += $(WERROR_FLAGS) +CFLAGS += -DALLOW_EXPERIMENTAL_API # workaround for a gcc bug with noreturn attribute # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603 diff --git a/examples/distributor/meson.build b/examples/distributor/meson.build index 26f108d653..9fec7f883f 100644 --- a/examples/distributor/meson.build +++ b/examples/distributor/meson.build @@ -9,6 +9,7 @@ # require the power library build = dpdk_conf.has('RTE_LIBRTE_POWER') +allow_experimental_apis = true deps += ['distributor', 'power'] sources = files( 'main.c' diff --git a/examples/ethtool/ethtool-app/Makefile b/examples/ethtool/ethtool-app/Makefile index 3543bdee0c..20ac0d3240 100644 --- a/examples/ethtool/ethtool-app/Makefile +++ b/examples/ethtool/ethtool-app/Makefile @@ -18,6 +18,7 @@ SRCS-y := main.c ethapp.c CFLAGS += -O3 -pthread -I$(SRCDIR)/../lib CFLAGS += $(WERROR_FLAGS) +CFLAGS += -DALLOW_EXPERIMENTAL_API LDLIBS += -L$(subst ethtool-app,lib,$(RTE_OUTPUT))/lib LDLIBS += -lrte_ethtool diff --git a/examples/eventdev_pipeline/meson.build b/examples/eventdev_pipeline/meson.build index a54c35aa7f..1dfeba0d3f 100644 --- a/examples/eventdev_pipeline/meson.build +++ b/examples/eventdev_pipeline/meson.build @@ -6,6 +6,7 @@ # To build this example as a standalone application with an already-installed # DPDK instance, use 'make' +allow_experimental_apis = true deps += 'eventdev' sources = files( 'main.c', diff --git a/examples/flow_filtering/Makefile b/examples/flow_filtering/Makefile index 6c51c0b7a0..e0d546de96 100644 --- a/examples/flow_filtering/Makefile +++ b/examples/flow_filtering/Makefile @@ -49,6 +49,7 @@ include $(RTE_SDK)/mk/rte.vars.mk CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) +CFLAGS += -DALLOW_EXPERIMENTAL_API include $(RTE_SDK)/mk/rte.extapp.mk diff --git a/examples/flow_filtering/meson.build b/examples/flow_filtering/meson.build index 407795c428..6f5d1b08a9 100644 --- a/examples/flow_filtering/meson.build +++ b/examples/flow_filtering/meson.build @@ -6,6 +6,7 @@ # To build this example as a standalone application with an already-installed # DPDK instance, use 'make' +allow_experimental_apis = true sources = files( 'main.c', ) diff --git a/examples/helloworld/Makefile b/examples/helloworld/Makefile index 16d82b02f0..0f5af0806b 100644 --- a/examples/helloworld/Makefile +++ b/examples/helloworld/Makefile @@ -51,6 +51,7 @@ include $(RTE_SDK)/mk/rte.vars.mk CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) +CFLAGS += -DALLOW_EXPERIMENTAL_API include $(RTE_SDK)/mk/rte.extapp.mk diff --git a/examples/helloworld/meson.build b/examples/helloworld/meson.build index c34e11e36d..2b0a250361 100644 --- a/examples/helloworld/meson.build +++ b/examples/helloworld/meson.build @@ -6,6 +6,7 @@ # To build this example as a standalone application with an already-installed # DPDK instance, use 'make' +allow_experimental_apis = true sources = files( 'main.c' ) diff --git a/examples/ioat/Makefile b/examples/ioat/Makefile index ef63f5d689..9b277eb7b9 100644 --- a/examples/ioat/Makefile +++ b/examples/ioat/Makefile @@ -51,6 +51,7 @@ include $(RTE_SDK)/mk/rte.vars.mk CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) +CFLAGS += -DALLOW_EXPERIMENTAL_API include $(RTE_SDK)/mk/rte.extapp.mk endif diff --git a/examples/ioat/meson.build b/examples/ioat/meson.build index ed83289636..f72cf70e7e 100644 --- a/examples/ioat/meson.build +++ b/examples/ioat/meson.build @@ -6,6 +6,7 @@ # To build this example as a standalone application with an already-installed # DPDK instance, use 'make' +allow_experimental_apis = true build = dpdk_conf.has('RTE_LIBRTE_PMD_IOAT_RAWDEV') deps += ['rawdev_ioat'] diff --git a/examples/ip_fragmentation/Makefile b/examples/ip_fragmentation/Makefile index ede0c4f02b..8babbbf827 100644 --- a/examples/ip_fragmentation/Makefile +++ b/examples/ip_fragmentation/Makefile @@ -22,6 +22,7 @@ PKGCONF ?= pkg-config PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null) CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) @@ -52,6 +53,7 @@ include $(RTE_SDK)/mk/rte.vars.mk CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) +CFLAGS += -DALLOW_EXPERIMENTAL_API # workaround for a gcc bug with noreturn attribute # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603 diff --git a/examples/ip_fragmentation/meson.build b/examples/ip_fragmentation/meson.build index 304203eedd..1230db4776 100644 --- a/examples/ip_fragmentation/meson.build +++ b/examples/ip_fragmentation/meson.build @@ -6,6 +6,7 @@ # To build this example as a standalone application with an already-installed # DPDK instance, use 'make' +allow_experimental_apis = true deps += ['ip_frag', 'lpm'] sources = files( 'main.c' diff --git a/examples/ip_reassembly/Makefile b/examples/ip_reassembly/Makefile index 3f2888b338..11be2a74ac 100644 --- a/examples/ip_reassembly/Makefile +++ b/examples/ip_reassembly/Makefile @@ -52,6 +52,7 @@ include $(RTE_SDK)/mk/rte.vars.mk CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) +CFLAGS += -DALLOW_EXPERIMENTAL_API # workaround for a gcc bug with noreturn attribute # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603 diff --git a/examples/ip_reassembly/meson.build b/examples/ip_reassembly/meson.build index 8ebd482915..517bd4e19a 100644 --- a/examples/ip_reassembly/meson.build +++ b/examples/ip_reassembly/meson.build @@ -6,6 +6,7 @@ # To build this example as a standalone application with an already-installed # DPDK instance, use 'make' +allow_experimental_apis = true deps += ['lpm', 'ip_frag'] sources = files( 'main.c' diff --git a/examples/ipv4_multicast/Makefile b/examples/ipv4_multicast/Makefile index 92d3db0f4d..b9f0813ede 100644 --- a/examples/ipv4_multicast/Makefile +++ b/examples/ipv4_multicast/Makefile @@ -52,6 +52,7 @@ include $(RTE_SDK)/mk/rte.vars.mk CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) +CFLAGS += -DALLOW_EXPERIMENTAL_API # workaround for a gcc bug with noreturn attribute # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603 diff --git a/examples/ipv4_multicast/meson.build b/examples/ipv4_multicast/meson.build index d9e4c7c219..7dc13fb8fc 100644 --- a/examples/ipv4_multicast/meson.build +++ b/examples/ipv4_multicast/meson.build @@ -6,6 +6,7 @@ # To build this example as a standalone application with an already-installed # DPDK instance, use 'make' +allow_experimental_apis = true deps += 'hash' sources = files( 'main.c' diff --git a/examples/l2fwd-cat/Makefile b/examples/l2fwd-cat/Makefile index b0e53c37e8..ca1202be17 100644 --- a/examples/l2fwd-cat/Makefile +++ b/examples/l2fwd-cat/Makefile @@ -56,6 +56,7 @@ RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.conf include $(RTE_SDK)/mk/rte.vars.mk CFLAGS += $(WERROR_FLAGS) +CFLAGS += -DALLOW_EXPERIMENTAL_API # workaround for a gcc bug with noreturn attribute # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603 diff --git a/examples/l2fwd-cat/meson.build b/examples/l2fwd-cat/meson.build index 4e2777a033..2bed18e749 100644 --- a/examples/l2fwd-cat/meson.build +++ b/examples/l2fwd-cat/meson.build @@ -9,6 +9,7 @@ pqos = cc.find_library('pqos', required: false) build = pqos.found() ext_deps += pqos +allow_experimental_apis = true cflags += '-I/usr/local/include' # assume pqos lib installed in /usr/local sources = files( 'cat.c', 'l2fwd-cat.c' diff --git a/examples/l2fwd-event/Makefile b/examples/l2fwd-event/Makefile index 4cdae36f17..807f7f1b8b 100644 --- a/examples/l2fwd-event/Makefile +++ b/examples/l2fwd-event/Makefile @@ -57,6 +57,7 @@ include $(RTE_SDK)/mk/rte.vars.mk CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) +CFLAGS += -DALLOW_EXPERIMENTAL_API include $(RTE_SDK)/mk/rte.extapp.mk endif diff --git a/examples/l2fwd-event/meson.build b/examples/l2fwd-event/meson.build index 4e9a069d6a..4a546eaf81 100644 --- a/examples/l2fwd-event/meson.build +++ b/examples/l2fwd-event/meson.build @@ -7,6 +7,7 @@ # To build this example as a standalone application with an already-installed # DPDK instance, use 'make' +allow_experimental_apis = true deps += 'eventdev' sources = files( 'main.c', diff --git a/examples/l2fwd-jobstats/Makefile b/examples/l2fwd-jobstats/Makefile index 73c91faa8d..6cd9dcd9c0 100644 --- a/examples/l2fwd-jobstats/Makefile +++ b/examples/l2fwd-jobstats/Makefile @@ -52,6 +52,7 @@ include $(RTE_SDK)/mk/rte.vars.mk CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) +CFLAGS += -DALLOW_EXPERIMENTAL_API include $(RTE_SDK)/mk/rte.extapp.mk endif diff --git a/examples/l2fwd-jobstats/meson.build b/examples/l2fwd-jobstats/meson.build index 1ffd484e23..72273736b6 100644 --- a/examples/l2fwd-jobstats/meson.build +++ b/examples/l2fwd-jobstats/meson.build @@ -6,6 +6,7 @@ # To build this example as a standalone application with an already-installed # DPDK instance, use 'make' +allow_experimental_apis = true deps += ['jobstats', 'timer'] sources = files( 'main.c' diff --git a/examples/l2fwd-keepalive/Makefile b/examples/l2fwd-keepalive/Makefile index 94d1e58bb5..0db5e60154 100644 --- a/examples/l2fwd-keepalive/Makefile +++ b/examples/l2fwd-keepalive/Makefile @@ -53,6 +53,7 @@ include $(RTE_SDK)/mk/rte.vars.mk CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) +CFLAGS += -DALLOW_EXPERIMENTAL_API LDFLAGS += -lrt include $(RTE_SDK)/mk/rte.extapp.mk diff --git a/examples/l2fwd-keepalive/ka-agent/Makefile b/examples/l2fwd-keepalive/ka-agent/Makefile index 755e474383..8d5061b178 100644 --- a/examples/l2fwd-keepalive/ka-agent/Makefile +++ b/examples/l2fwd-keepalive/ka-agent/Makefile @@ -17,5 +17,6 @@ APP = ka-agent SRCS-y := main.c CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR)/../ +CFLAGS += -DALLOW_EXPERIMENTAL_API LDFLAGS += -lrt include $(RTE_SDK)/mk/rte.extapp.mk diff --git a/examples/l2fwd-keepalive/meson.build b/examples/l2fwd-keepalive/meson.build index 6f7b007e1e..d678a8ddd0 100644 --- a/examples/l2fwd-keepalive/meson.build +++ b/examples/l2fwd-keepalive/meson.build @@ -6,6 +6,7 @@ # To build this example as a standalone application with an already-installed # DPDK instance, use 'make' +allow_experimental_apis = true ext_deps += cc.find_library('rt') deps += 'timer' sources = files( diff --git a/examples/l3fwd-acl/Makefile b/examples/l3fwd-acl/Makefile index d9909584b1..9f31abef80 100644 --- a/examples/l3fwd-acl/Makefile +++ b/examples/l3fwd-acl/Makefile @@ -51,6 +51,7 @@ include $(RTE_SDK)/mk/rte.vars.mk CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) +CFLAGS += -DALLOW_EXPERIMENTAL_API # workaround for a gcc bug with noreturn attribute # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603 diff --git a/examples/l3fwd-acl/meson.build b/examples/l3fwd-acl/meson.build index 7096e00c10..6fa468b3aa 100644 --- a/examples/l3fwd-acl/meson.build +++ b/examples/l3fwd-acl/meson.build @@ -6,6 +6,7 @@ # To build this example as a standalone application with an already-installed # DPDK instance, use 'make' +allow_experimental_apis = true deps += ['acl', 'lpm', 'hash'] sources = files( 'main.c' diff --git a/examples/l3fwd/Makefile b/examples/l3fwd/Makefile index 59a110d12a..839439f0ff 100644 --- a/examples/l3fwd/Makefile +++ b/examples/l3fwd/Makefile @@ -53,6 +53,7 @@ include $(RTE_SDK)/mk/rte.vars.mk CFLAGS += -I$(SRCDIR) CFLAGS += -O3 $(USER_FLAGS) CFLAGS += $(WERROR_FLAGS) +CFLAGS += -DALLOW_EXPERIMENTAL_API include $(RTE_SDK)/mk/rte.extapp.mk endif diff --git a/examples/l3fwd/meson.build b/examples/l3fwd/meson.build index ebed3b518c..7d72b1b365 100644 --- a/examples/l3fwd/meson.build +++ b/examples/l3fwd/meson.build @@ -6,6 +6,7 @@ # To build this example as a standalone application with an already-installed # DPDK instance, use 'make' +allow_experimental_apis = true deps += ['hash', 'lpm', 'eventdev'] sources = files( 'l3fwd_em.c', 'l3fwd_lpm.c', 'l3fwd_event.c', diff --git a/examples/link_status_interrupt/Makefile b/examples/link_status_interrupt/Makefile index 4f02a89013..613bb1167a 100644 --- a/examples/link_status_interrupt/Makefile +++ b/examples/link_status_interrupt/Makefile @@ -51,6 +51,7 @@ include $(RTE_SDK)/mk/rte.vars.mk CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) +CFLAGS += -DALLOW_EXPERIMENTAL_API include $(RTE_SDK)/mk/rte.extapp.mk endif diff --git a/examples/link_status_interrupt/meson.build b/examples/link_status_interrupt/meson.build index c34e11e36d..2b0a250361 100644 --- a/examples/link_status_interrupt/meson.build +++ b/examples/link_status_interrupt/meson.build @@ -6,6 +6,7 @@ # To build this example as a standalone application with an already-installed # DPDK instance, use 'make' +allow_experimental_apis = true sources = files( 'main.c' ) diff --git a/examples/multi_process/client_server_mp/mp_client/Makefile b/examples/multi_process/client_server_mp/mp_client/Makefile index 298e1b0204..7c447feba3 100644 --- a/examples/multi_process/client_server_mp/mp_client/Makefile +++ b/examples/multi_process/client_server_mp/mp_client/Makefile @@ -16,5 +16,6 @@ SRCS-y := client.c CFLAGS += $(WERROR_FLAGS) -O3 CFLAGS += -I$(SRCDIR)/../shared +CFLAGS += -DALLOW_EXPERIMENTAL_API include $(RTE_SDK)/mk/rte.extapp.mk diff --git a/examples/multi_process/client_server_mp/mp_client/meson.build b/examples/multi_process/client_server_mp/mp_client/meson.build index a6241b83a3..69c3d3bfbe 100644 --- a/examples/multi_process/client_server_mp/mp_client/meson.build +++ b/examples/multi_process/client_server_mp/mp_client/meson.build @@ -8,6 +8,7 @@ includes += include_directories('../shared') +allow_experimental_apis = true sources = files( 'client.c' ) diff --git a/examples/multi_process/client_server_mp/mp_server/meson.build b/examples/multi_process/client_server_mp/mp_server/meson.build index 1b2f786389..0ef6424f4b 100644 --- a/examples/multi_process/client_server_mp/mp_server/meson.build +++ b/examples/multi_process/client_server_mp/mp_server/meson.build @@ -8,6 +8,7 @@ includes += include_directories('../shared') +allow_experimental_apis = true sources = files( 'args.c', 'init.c', 'main.c' ) diff --git a/examples/multi_process/hotplug_mp/Makefile b/examples/multi_process/hotplug_mp/Makefile index 3ff74d52a8..1fd7aa085c 100644 --- a/examples/multi_process/hotplug_mp/Makefile +++ b/examples/multi_process/hotplug_mp/Makefile @@ -18,5 +18,6 @@ SRCS-y := main.c commands.c CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) +CFLAGS += -DALLOW_EXPERIMENTAL_API include $(RTE_SDK)/mk/rte.extapp.mk diff --git a/examples/multi_process/hotplug_mp/meson.build b/examples/multi_process/hotplug_mp/meson.build index 076f4e3dcb..f82f4d48a2 100644 --- a/examples/multi_process/hotplug_mp/meson.build +++ b/examples/multi_process/hotplug_mp/meson.build @@ -6,6 +6,7 @@ # To build this example as a standalone application with an already-installed # DPDK instance, use 'make' +allow_experimental_apis = true sources = files( 'commands.c', 'main.c' ) diff --git a/examples/multi_process/simple_mp/Makefile b/examples/multi_process/simple_mp/Makefile index 4c0764451a..f88b499bdc 100644 --- a/examples/multi_process/simple_mp/Makefile +++ b/examples/multi_process/simple_mp/Makefile @@ -18,5 +18,6 @@ SRCS-y := main.c mp_commands.c CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) +CFLAGS += -DALLOW_EXPERIMENTAL_API include $(RTE_SDK)/mk/rte.extapp.mk diff --git a/examples/multi_process/simple_mp/meson.build b/examples/multi_process/simple_mp/meson.build index b2261e00e9..cb02c65a69 100644 --- a/examples/multi_process/simple_mp/meson.build +++ b/examples/multi_process/simple_mp/meson.build @@ -6,6 +6,7 @@ # To build this example as a standalone application with an already-installed # DPDK instance, use 'make' +allow_experimental_apis = true sources = files( 'mp_commands.c', 'main.c' ) diff --git a/examples/multi_process/symmetric_mp/Makefile b/examples/multi_process/symmetric_mp/Makefile index bdc415621f..b7544489bb 100644 --- a/examples/multi_process/symmetric_mp/Makefile +++ b/examples/multi_process/symmetric_mp/Makefile @@ -18,5 +18,6 @@ SRCS-y := main.c CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) +CFLAGS += -DALLOW_EXPERIMENTAL_API include $(RTE_SDK)/mk/rte.extapp.mk diff --git a/examples/multi_process/symmetric_mp/meson.build b/examples/multi_process/symmetric_mp/meson.build index 458f83642a..14167825b0 100644 --- a/examples/multi_process/symmetric_mp/meson.build +++ b/examples/multi_process/symmetric_mp/meson.build @@ -6,6 +6,7 @@ # To build this example as a standalone application with an already-installed # DPDK instance, use 'make' +allow_experimental_apis = true sources = files( 'main.c' ) diff --git a/examples/ntb/Makefile b/examples/ntb/Makefile index baeba11e85..f2920ed548 100644 --- a/examples/ntb/Makefile +++ b/examples/ntb/Makefile @@ -25,6 +25,7 @@ LDFLAGS += -pthread PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null) CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +CFLAGS += -DALLOW_EXPERIMENTAL_API LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) diff --git a/examples/ntb/meson.build b/examples/ntb/meson.build index f5435fe120..ab449d0939 100644 --- a/examples/ntb/meson.build +++ b/examples/ntb/meson.build @@ -6,6 +6,7 @@ # To build this example as a standalone application with an already-installed # DPDK instance, use 'make' +allow_experimental_apis = true if host_machine.system() != 'linux' build = false endif diff --git a/examples/packet_ordering/Makefile b/examples/packet_ordering/Makefile index 261b7f06a8..f5b68c97e8 100644 --- a/examples/packet_ordering/Makefile +++ b/examples/packet_ordering/Makefile @@ -51,6 +51,7 @@ include $(RTE_SDK)/mk/rte.vars.mk CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) +CFLAGS += -DALLOW_EXPERIMENTAL_API include $(RTE_SDK)/mk/rte.extapp.mk endif diff --git a/examples/packet_ordering/meson.build b/examples/packet_ordering/meson.build index 6c2fccdcb0..b381959145 100644 --- a/examples/packet_ordering/meson.build +++ b/examples/packet_ordering/meson.build @@ -6,6 +6,7 @@ # To build this example as a standalone application with an already-installed # DPDK instance, use 'make' +allow_experimental_apis = true deps += 'reorder' sources = files( 'main.c' diff --git a/examples/performance-thread/l3fwd-thread/Makefile b/examples/performance-thread/l3fwd-thread/Makefile index b14b21e30b..c6cf05a438 100644 --- a/examples/performance-thread/l3fwd-thread/Makefile +++ b/examples/performance-thread/l3fwd-thread/Makefile @@ -19,5 +19,6 @@ SRCS-y := main.c include $(RTE_SDK)/examples/performance-thread/common/common.mk CFLAGS += -O3 -g $(USER_FLAGS) $(INCLUDES) $(WERROR_FLAGS) +CFLAGS += -DALLOW_EXPERIMENTAL_API include $(RTE_SDK)/mk/rte.extapp.mk diff --git a/examples/performance-thread/l3fwd-thread/meson.build b/examples/performance-thread/l3fwd-thread/meson.build index 185fa59a42..99de24be7d 100644 --- a/examples/performance-thread/l3fwd-thread/meson.build +++ b/examples/performance-thread/l3fwd-thread/meson.build @@ -8,6 +8,7 @@ build = dpdk_conf.has('RTE_ARCH_X86_64') deps += ['timer', 'lpm'] +allow_experimental_apis = true # get the performance thread (pt) architecture subdir if dpdk_conf.has('RTE_ARCH_ARM64') diff --git a/examples/performance-thread/pthread_shim/Makefile b/examples/performance-thread/pthread_shim/Makefile index efd66febf4..cdadf2cb77 100644 --- a/examples/performance-thread/pthread_shim/Makefile +++ b/examples/performance-thread/pthread_shim/Makefile @@ -20,6 +20,7 @@ include $(RTE_SDK)/examples/performance-thread/common/common.mk CFLAGS += -g -O3 $(USER_FLAGS) $(INCLUDES) CFLAGS += $(WERROR_FLAGS) +CFLAGS += -DALLOW_EXPERIMENTAL_API LDFLAGS += -lpthread diff --git a/examples/performance-thread/pthread_shim/meson.build b/examples/performance-thread/pthread_shim/meson.build index 393fbd122c..26ef78635a 100644 --- a/examples/performance-thread/pthread_shim/meson.build +++ b/examples/performance-thread/pthread_shim/meson.build @@ -8,6 +8,7 @@ build = dpdk_conf.has('RTE_ARCH_X86_64') or dpdk_conf.has('RTE_ARCH_ARM64') deps += ['timer'] +allow_experimental_apis = true # get the performance thread (pt) architecture subdir if dpdk_conf.has('RTE_ARCH_ARM64') diff --git a/examples/ptpclient/Makefile b/examples/ptpclient/Makefile index 82d72b3e31..7cd36632a9 100644 --- a/examples/ptpclient/Makefile +++ b/examples/ptpclient/Makefile @@ -51,6 +51,7 @@ include $(RTE_SDK)/mk/rte.vars.mk CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) +CFLAGS += -DALLOW_EXPERIMENTAL_API # workaround for a gcc bug with noreturn attribute # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603 diff --git a/examples/ptpclient/meson.build b/examples/ptpclient/meson.build index fa0cbe93c8..d4171a2183 100644 --- a/examples/ptpclient/meson.build +++ b/examples/ptpclient/meson.build @@ -6,6 +6,7 @@ # To build this example as a standalone application with an already-installed # DPDK instance, use 'make' +allow_experimental_apis = true sources = files( 'ptpclient.c' ) diff --git a/examples/qos_meter/Makefile b/examples/qos_meter/Makefile index 7c2bf88a90..90e3533d10 100644 --- a/examples/qos_meter/Makefile +++ b/examples/qos_meter/Makefile @@ -53,6 +53,7 @@ include $(RTE_SDK)/mk/rte.vars.mk CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) +CFLAGS += -DALLOW_EXPERIMENTAL_API # workaround for a gcc bug with noreturn attribute # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603 diff --git a/examples/qos_meter/meson.build b/examples/qos_meter/meson.build index ef7779f2f1..2f9ab13afd 100644 --- a/examples/qos_meter/meson.build +++ b/examples/qos_meter/meson.build @@ -6,6 +6,7 @@ # To build this example as a standalone application with an already-installed # DPDK instance, use 'make' +allow_experimental_apis = true deps += 'meter' sources = files( 'main.c', 'rte_policer.c' diff --git a/examples/qos_sched/Makefile b/examples/qos_sched/Makefile index 525061ca07..92e3de79be 100644 --- a/examples/qos_sched/Makefile +++ b/examples/qos_sched/Makefile @@ -58,6 +58,7 @@ else CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) +CFLAGS += -DALLOW_EXPERIMENTAL_API include $(RTE_SDK)/mk/rte.extapp.mk diff --git a/examples/qos_sched/meson.build b/examples/qos_sched/meson.build index 289b81ce80..ba59d3c9e5 100644 --- a/examples/qos_sched/meson.build +++ b/examples/qos_sched/meson.build @@ -6,6 +6,7 @@ # To build this example as a standalone application with an already-installed # DPDK instance, use 'make' +allow_experimental_apis = true deps += ['sched', 'cfgfile'] sources = files( 'app_thread.c', 'args.c', 'cfg_file.c', 'cmdline.c', diff --git a/examples/server_node_efd/node/Makefile b/examples/server_node_efd/node/Makefile index fffbe35767..ecc551e1d6 100644 --- a/examples/server_node_efd/node/Makefile +++ b/examples/server_node_efd/node/Makefile @@ -16,5 +16,6 @@ SRCS-y := node.c CFLAGS += $(WERROR_FLAGS) -O3 CFLAGS += -I$(SRCDIR)/../shared +CFLAGS += -DALLOW_EXPERIMENTAL_API include $(RTE_SDK)/mk/rte.extapp.mk diff --git a/examples/server_node_efd/node/meson.build b/examples/server_node_efd/node/meson.build index 30f28761fe..1c720968af 100644 --- a/examples/server_node_efd/node/meson.build +++ b/examples/server_node_efd/node/meson.build @@ -8,6 +8,7 @@ name = 'efd_node' +allow_experimental_apis = true deps += ['hash'] sources += files('node.c') includes += include_directories('../shared') diff --git a/examples/server_node_efd/server/Makefile b/examples/server_node_efd/server/Makefile index 4837bd3eab..acbd12ae23 100644 --- a/examples/server_node_efd/server/Makefile +++ b/examples/server_node_efd/server/Makefile @@ -25,5 +25,6 @@ INC := $(sort $(wildcard *.h)) CFLAGS += $(WERROR_FLAGS) -O3 CFLAGS += -I$(SRCDIR)/../shared +CFLAGS += -DALLOW_EXPERIMENTAL_API include $(RTE_SDK)/mk/rte.extapp.mk diff --git a/examples/server_node_efd/server/meson.build b/examples/server_node_efd/server/meson.build index 23e08d1ae6..7abc333e1d 100644 --- a/examples/server_node_efd/server/meson.build +++ b/examples/server_node_efd/server/meson.build @@ -8,6 +8,7 @@ name = 'efd_server' +allow_experimental_apis = true deps += 'efd' sources += files('args.c', 'init.c', 'main.c') includes += include_directories('../shared') diff --git a/examples/service_cores/Makefile b/examples/service_cores/Makefile index c47055813e..aac207bd99 100644 --- a/examples/service_cores/Makefile +++ b/examples/service_cores/Makefile @@ -50,6 +50,7 @@ RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.conf include $(RTE_SDK)/mk/rte.vars.mk CFLAGS += $(WERROR_FLAGS) +CFLAGS += -DALLOW_EXPERIMENTAL_API # workaround for a gcc bug with noreturn attribute # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603 diff --git a/examples/service_cores/meson.build b/examples/service_cores/meson.build index c34e11e36d..2b0a250361 100644 --- a/examples/service_cores/meson.build +++ b/examples/service_cores/meson.build @@ -6,6 +6,7 @@ # To build this example as a standalone application with an already-installed # DPDK instance, use 'make' +allow_experimental_apis = true sources = files( 'main.c' ) diff --git a/examples/skeleton/Makefile b/examples/skeleton/Makefile index 2c29004d79..2612688c0e 100644 --- a/examples/skeleton/Makefile +++ b/examples/skeleton/Makefile @@ -50,6 +50,7 @@ RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.conf include $(RTE_SDK)/mk/rte.vars.mk CFLAGS += $(WERROR_FLAGS) +CFLAGS += -DALLOW_EXPERIMENTAL_API # workaround for a gcc bug with noreturn attribute # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603 diff --git a/examples/skeleton/meson.build b/examples/skeleton/meson.build index 9bb9ec3294..ef46b187e7 100644 --- a/examples/skeleton/meson.build +++ b/examples/skeleton/meson.build @@ -6,6 +6,7 @@ # To build this example as a standalone application with an already-installed # DPDK instance, use 'make' +allow_experimental_apis = true sources = files( 'basicfwd.c' ) diff --git a/examples/timer/Makefile b/examples/timer/Makefile index bf86339ab7..e58e90a286 100644 --- a/examples/timer/Makefile +++ b/examples/timer/Makefile @@ -51,6 +51,7 @@ include $(RTE_SDK)/mk/rte.vars.mk CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) +CFLAGS += -DALLOW_EXPERIMENTAL_API # workaround for a gcc bug with noreturn attribute # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603 diff --git a/examples/timer/meson.build b/examples/timer/meson.build index c3d9016378..87c21a8679 100644 --- a/examples/timer/meson.build +++ b/examples/timer/meson.build @@ -6,6 +6,7 @@ # To build this example as a standalone application with an already-installed # DPDK instance, use 'make' +allow_experimental_apis = true deps += 'timer' sources = files( 'main.c' diff --git a/examples/vm_power_manager/Makefile b/examples/vm_power_manager/Makefile index 2fdb991d7c..65c2ad179e 100644 --- a/examples/vm_power_manager/Makefile +++ b/examples/vm_power_manager/Makefile @@ -28,6 +28,7 @@ endif CFLAGS += -O3 -I$(RTE_SDK)/lib/librte_power/ CFLAGS += $(WERROR_FLAGS) +CFLAGS += -DALLOW_EXPERIMENTAL_API LDLIBS += -lvirt diff --git a/examples/vm_power_manager/meson.build b/examples/vm_power_manager/meson.build index 20a4a05b3b..54e2b584f6 100644 --- a/examples/vm_power_manager/meson.build +++ b/examples/vm_power_manager/meson.build @@ -25,6 +25,7 @@ if dpdk_conf.has('RTE_LIBRTE_IXGBE_PMD') deps += ['pmd_ixgbe'] endif +allow_experimental_apis = true sources = files( 'channel_manager.c', 'channel_monitor.c', 'main.c', 'parse.c', 'power_manager.c', 'vm_power_cli.c' ) diff --git a/examples/vmdq/Makefile b/examples/vmdq/Makefile index 0767c715a1..98e644fa73 100644 --- a/examples/vmdq/Makefile +++ b/examples/vmdq/Makefile @@ -50,6 +50,7 @@ RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.conf include $(RTE_SDK)/mk/rte.vars.mk CFLAGS += $(WERROR_FLAGS) +CFLAGS += -DALLOW_EXPERIMENTAL_API EXTRA_CFLAGS += -O3 diff --git a/examples/vmdq/meson.build b/examples/vmdq/meson.build index c34e11e36d..2b0a250361 100644 --- a/examples/vmdq/meson.build +++ b/examples/vmdq/meson.build @@ -6,6 +6,7 @@ # To build this example as a standalone application with an already-installed # DPDK instance, use 'make' +allow_experimental_apis = true sources = files( 'main.c' ) diff --git a/examples/vmdq_dcb/Makefile b/examples/vmdq_dcb/Makefile index 2a9b04143f..3eb7c9f43b 100644 --- a/examples/vmdq_dcb/Makefile +++ b/examples/vmdq_dcb/Makefile @@ -50,6 +50,7 @@ RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.conf include $(RTE_SDK)/mk/rte.vars.mk CFLAGS += $(WERROR_FLAGS) +CFLAGS += -DALLOW_EXPERIMENTAL_API # workaround for a gcc bug with noreturn attribute # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603 diff --git a/examples/vmdq_dcb/meson.build b/examples/vmdq_dcb/meson.build index c34e11e36d..2b0a250361 100644 --- a/examples/vmdq_dcb/meson.build +++ b/examples/vmdq_dcb/meson.build @@ -6,6 +6,7 @@ # To build this example as a standalone application with an already-installed # DPDK instance, use 'make' +allow_experimental_apis = true sources = files( 'main.c' ) diff --git a/lib/librte_ethdev/Makefile b/lib/librte_ethdev/Makefile index 943fb8c877..d50b7ddf10 100644 --- a/lib/librte_ethdev/Makefile +++ b/lib/librte_ethdev/Makefile @@ -22,6 +22,7 @@ SRCS-y += rte_flow.c SRCS-y += rte_tm.c SRCS-y += rte_mtr.c SRCS-y += ethdev_profile.c +SRCS-y += ethdev_trace_points.c # # Export include files @@ -30,6 +31,8 @@ SYMLINK-y-include += rte_ethdev.h SYMLINK-y-include += rte_ethdev_driver.h SYMLINK-y-include += rte_ethdev_core.h SYMLINK-y-include += rte_ethdev_pci.h +SYMLINK-y-include += rte_ethdev_trace.h +SYMLINK-y-include += rte_ethdev_trace_fp.h SYMLINK-y-include += rte_ethdev_vdev.h SYMLINK-y-include += rte_eth_ctrl.h SYMLINK-y-include += rte_dev_info.h diff --git a/lib/librte_ethdev/ethdev_trace_points.c b/lib/librte_ethdev/ethdev_trace_points.c new file mode 100644 index 0000000000..05de34f3ca --- /dev/null +++ b/lib/librte_ethdev/ethdev_trace_points.c @@ -0,0 +1,43 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright(C) 2020 Marvell International Ltd. + */ + +#define RTE_TRACE_POINT_REGISTER_SELECT + +#include + +RTE_TRACE_POINT_DEFINE(rte_ethdev_trace_configure); +RTE_TRACE_POINT_DEFINE(rte_ethdev_trace_rxq_setup); +RTE_TRACE_POINT_DEFINE(rte_ethdev_trace_txq_setup); +RTE_TRACE_POINT_DEFINE(rte_ethdev_trace_start); +RTE_TRACE_POINT_DEFINE(rte_ethdev_trace_stop); +RTE_TRACE_POINT_DEFINE(rte_ethdev_trace_close); +RTE_TRACE_POINT_DEFINE(rte_ethdev_trace_rx_burst); +RTE_TRACE_POINT_DEFINE(rte_ethdev_trace_tx_burst); + +RTE_INIT(ethdev_trace_init) +{ + RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_configure, + lib.ethdev.configure); + + RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_rxq_setup, + lib.ethdev.rxq.setup); + + RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_txq_setup, + lib.ethdev.txq.setup); + + RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_start, + lib.ethdev.start); + + RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_stop, + lib.ethdev.stop); + + RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_close, + lib.ethdev.close); + + RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_rx_burst, + lib.ethdev.rx.burst); + + RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_tx_burst, + lib.ethdev.tx.burst); +} diff --git a/lib/librte_ethdev/meson.build b/lib/librte_ethdev/meson.build index ab341d9c04..e5fd82e93c 100644 --- a/lib/librte_ethdev/meson.build +++ b/lib/librte_ethdev/meson.build @@ -4,6 +4,7 @@ name = 'ethdev' sources = files('ethdev_private.c', 'ethdev_profile.c', + 'ethdev_trace_points.c', 'rte_class_eth.c', 'rte_ethdev.c', 'rte_flow.c', @@ -14,6 +15,8 @@ headers = files('rte_ethdev.h', 'rte_ethdev_driver.h', 'rte_ethdev_core.h', 'rte_ethdev_pci.h', + 'rte_ethdev_trace.h', + 'rte_ethdev_trace_fp.h', 'rte_ethdev_vdev.h', 'rte_eth_ctrl.h', 'rte_dev_info.h', diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c index 0854ef8832..72aed59a54 100644 --- a/lib/librte_ethdev/rte_ethdev.c +++ b/lib/librte_ethdev/rte_ethdev.c @@ -39,6 +39,7 @@ #include #include +#include "rte_ethdev_trace.h" #include "rte_ethdev.h" #include "rte_ethdev_driver.h" #include "ethdev_profile.h" @@ -1470,6 +1471,7 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q, goto reset_queues; } + rte_ethdev_trace_configure(port_id, nb_rx_q, nb_tx_q, dev_conf, 0); return 0; reset_queues: rte_eth_dev_rx_queue_config(dev, 0); @@ -1477,6 +1479,7 @@ reset_queues: rollback: memcpy(&dev->data->dev_conf, &orig_conf, sizeof(dev->data->dev_conf)); + rte_ethdev_trace_configure(port_id, nb_rx_q, nb_tx_q, dev_conf, ret); return ret; } @@ -1647,6 +1650,8 @@ rte_eth_dev_start(uint16_t port_id) RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->link_update, -ENOTSUP); (*dev->dev_ops->link_update)(dev, 0); } + + rte_ethdev_trace_start(port_id); return 0; } @@ -1669,6 +1674,7 @@ rte_eth_dev_stop(uint16_t port_id) dev->data->dev_started = 0; (*dev->dev_ops->dev_stop)(dev); + rte_ethdev_trace_stop(port_id); } int @@ -1709,6 +1715,7 @@ rte_eth_dev_close(uint16_t port_id) dev->data->dev_started = 0; (*dev->dev_ops->dev_close)(dev); + rte_ethdev_trace_close(port_id); /* check behaviour flag - temporary for PMD migration */ if ((dev->data->dev_flags & RTE_ETH_DEV_CLOSE_REMOVE) != 0) { /* new behaviour: send event + reset state + free all data */ @@ -1918,6 +1925,8 @@ rte_eth_rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id, dev->data->min_rx_buf_size = mbp_buf_size; } + rte_ethdev_trace_rxq_setup(port_id, rx_queue_id, nb_rx_desc, mp, + rx_conf, ret); return eth_err(port_id, ret); } @@ -2088,6 +2097,7 @@ rte_eth_tx_queue_setup(uint16_t port_id, uint16_t tx_queue_id, return -EINVAL; } + rte_ethdev_trace_txq_setup(port_id, tx_queue_id, nb_tx_desc, tx_conf); return eth_err(port_id, (*dev->dev_ops->tx_queue_setup)(dev, tx_queue_id, nb_tx_desc, socket_id, &local_conf)); } diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h index e9e3a16995..bd0bca6e00 100644 --- a/lib/librte_ethdev/rte_ethdev.h +++ b/lib/librte_ethdev/rte_ethdev.h @@ -158,6 +158,7 @@ extern "C" { #include #include +#include "rte_ethdev_trace_fp.h" #include "rte_dev_info.h" extern int rte_eth_dev_logtype; @@ -4400,6 +4401,7 @@ rte_eth_rx_burst(uint16_t port_id, uint16_t queue_id, } #endif + rte_ethdev_trace_rx_burst(port_id, queue_id, (void **)rx_pkts, nb_rx); return nb_rx; } @@ -4663,6 +4665,8 @@ rte_eth_tx_burst(uint16_t port_id, uint16_t queue_id, } #endif + rte_ethdev_trace_tx_burst(port_id, queue_id, (void **)tx_pkts, + nb_pkts); return (*dev->tx_pkt_burst)(dev->data->tx_queues[queue_id], tx_pkts, nb_pkts); } diff --git a/lib/librte_ethdev/rte_ethdev_trace.h b/lib/librte_ethdev/rte_ethdev_trace.h new file mode 100644 index 0000000000..16f5bf24b9 --- /dev/null +++ b/lib/librte_ethdev/rte_ethdev_trace.h @@ -0,0 +1,94 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright(C) 2020 Marvell International Ltd. + */ + +#ifndef _RTE_ETHDEV_TRACE_H_ +#define _RTE_ETHDEV_TRACE_H_ + +/** + * @file + * + * API for ethdev trace support + */ + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +#include "rte_ethdev.h" + +RTE_TRACE_POINT( + rte_ethdev_trace_configure, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t nb_rx_q, + uint16_t nb_tx_q, const struct rte_eth_conf *dev_conf, int rc), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u16(nb_rx_q); + rte_trace_point_emit_u16(nb_tx_q); + rte_trace_point_emit_u32(dev_conf->link_speeds); + rte_trace_point_emit_u32(dev_conf->rxmode.mq_mode); + rte_trace_point_emit_u32(dev_conf->rxmode.max_rx_pkt_len); + rte_trace_point_emit_u64(dev_conf->rxmode.offloads); + rte_trace_point_emit_u32(dev_conf->txmode.mq_mode); + rte_trace_point_emit_u64(dev_conf->txmode.offloads); + rte_trace_point_emit_u32(dev_conf->lpbk_mode); + rte_trace_point_emit_int(rc); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_rxq_setup, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t rx_queue_id, + uint16_t nb_rx_desc, void *mp, + const struct rte_eth_rxconf *rx_conf, int rc), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u16(rx_queue_id); + rte_trace_point_emit_u16(nb_rx_desc); + rte_trace_point_emit_ptr(mp); + rte_trace_point_emit_u8(rx_conf->rx_thresh.pthresh); + rte_trace_point_emit_u8(rx_conf->rx_thresh.hthresh); + rte_trace_point_emit_u8(rx_conf->rx_thresh.wthresh); + rte_trace_point_emit_u8(rx_conf->rx_drop_en); + rte_trace_point_emit_u8(rx_conf->rx_deferred_start); + rte_trace_point_emit_u64(rx_conf->offloads); + rte_trace_point_emit_int(rc); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_txq_setup, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t tx_queue_id, + uint16_t nb_tx_desc, const struct rte_eth_txconf *tx_conf), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u16(tx_queue_id); + rte_trace_point_emit_u16(nb_tx_desc); + rte_trace_point_emit_u8(tx_conf->tx_thresh.pthresh); + rte_trace_point_emit_u8(tx_conf->tx_thresh.hthresh); + rte_trace_point_emit_u8(tx_conf->tx_thresh.wthresh); + rte_trace_point_emit_u8(tx_conf->tx_deferred_start); + rte_trace_point_emit_u16(tx_conf->tx_free_thresh); + rte_trace_point_emit_u64(tx_conf->offloads); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_start, + RTE_TRACE_POINT_ARGS(uint16_t port_id), + rte_trace_point_emit_u16(port_id); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_stop, + RTE_TRACE_POINT_ARGS(uint16_t port_id), + rte_trace_point_emit_u16(port_id); +) + +RTE_TRACE_POINT( + rte_ethdev_trace_close, + RTE_TRACE_POINT_ARGS(uint16_t port_id), + rte_trace_point_emit_u16(port_id); +) + +#ifdef __cplusplus +} +#endif + +#endif /* _RTE_ETHDEV_TRACE_H_ */ diff --git a/lib/librte_ethdev/rte_ethdev_trace_fp.h b/lib/librte_ethdev/rte_ethdev_trace_fp.h new file mode 100644 index 0000000000..40084d1929 --- /dev/null +++ b/lib/librte_ethdev/rte_ethdev_trace_fp.h @@ -0,0 +1,44 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright(C) 2020 Marvell International Ltd. + */ + +#ifndef _RTE_ETHDEV_TRACE_FP_H_ +#define _RTE_ETHDEV_TRACE_FP_H_ + +/** + * @file + * + * API for ethdev trace support + */ + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +RTE_TRACE_POINT_FP( + rte_ethdev_trace_rx_burst, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_id, + void **pkt_tbl, uint16_t nb_rx), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u16(queue_id); + rte_trace_point_emit_ptr(pkt_tbl); + rte_trace_point_emit_u16(nb_rx); +) + +RTE_TRACE_POINT_FP( + rte_ethdev_trace_tx_burst, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_id, + void **pkts_tbl, uint16_t nb_pkts), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u16(queue_id); + rte_trace_point_emit_ptr(pkts_tbl); + rte_trace_point_emit_u16(nb_pkts); +) + +#ifdef __cplusplus +} +#endif + +#endif /* _RTE_ETHDEV_TRACE_FP_H_ */ diff --git a/lib/librte_ethdev/rte_ethdev_version.map b/lib/librte_ethdev/rte_ethdev_version.map index 3f32fdecf7..95efe50fbb 100644 --- a/lib/librte_ethdev/rte_ethdev_version.map +++ b/lib/librte_ethdev/rte_ethdev_version.map @@ -230,4 +230,14 @@ EXPERIMENTAL { # added in 20.02 rte_flow_dev_dump; + + # added in 20.05 + __rte_ethdev_trace_configure; + __rte_ethdev_trace_rxq_setup; + __rte_ethdev_trace_txq_setup; + __rte_ethdev_trace_start; + __rte_ethdev_trace_stop; + __rte_ethdev_trace_close; + __rte_ethdev_trace_rx_burst; + __rte_ethdev_trace_tx_burst; };