ethdev: add tracepoints
authorSunil Kumar Kori <skori@marvell.com>
Wed, 22 Apr 2020 19:03:45 +0000 (00:33 +0530)
committerDavid Marchand <david.marchand@redhat.com>
Thu, 23 Apr 2020 13:40:06 +0000 (15:40 +0200)
Add tracepoints at important and mandatory APIs for tracing support.

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: David Marchand <david.marchand@redhat.com>
80 files changed:
examples/cmdline/Makefile
examples/cmdline/meson.build
examples/distributor/Makefile
examples/distributor/meson.build
examples/ethtool/ethtool-app/Makefile
examples/eventdev_pipeline/meson.build
examples/flow_filtering/Makefile
examples/flow_filtering/meson.build
examples/helloworld/Makefile
examples/helloworld/meson.build
examples/ioat/Makefile
examples/ioat/meson.build
examples/ip_fragmentation/Makefile
examples/ip_fragmentation/meson.build
examples/ip_reassembly/Makefile
examples/ip_reassembly/meson.build
examples/ipv4_multicast/Makefile
examples/ipv4_multicast/meson.build
examples/l2fwd-cat/Makefile
examples/l2fwd-cat/meson.build
examples/l2fwd-event/Makefile
examples/l2fwd-event/meson.build
examples/l2fwd-jobstats/Makefile
examples/l2fwd-jobstats/meson.build
examples/l2fwd-keepalive/Makefile
examples/l2fwd-keepalive/ka-agent/Makefile
examples/l2fwd-keepalive/meson.build
examples/l3fwd-acl/Makefile
examples/l3fwd-acl/meson.build
examples/l3fwd/Makefile
examples/l3fwd/meson.build
examples/link_status_interrupt/Makefile
examples/link_status_interrupt/meson.build
examples/multi_process/client_server_mp/mp_client/Makefile
examples/multi_process/client_server_mp/mp_client/meson.build
examples/multi_process/client_server_mp/mp_server/meson.build
examples/multi_process/hotplug_mp/Makefile
examples/multi_process/hotplug_mp/meson.build
examples/multi_process/simple_mp/Makefile
examples/multi_process/simple_mp/meson.build
examples/multi_process/symmetric_mp/Makefile
examples/multi_process/symmetric_mp/meson.build
examples/ntb/Makefile
examples/ntb/meson.build
examples/packet_ordering/Makefile
examples/packet_ordering/meson.build
examples/performance-thread/l3fwd-thread/Makefile
examples/performance-thread/l3fwd-thread/meson.build
examples/performance-thread/pthread_shim/Makefile
examples/performance-thread/pthread_shim/meson.build
examples/ptpclient/Makefile
examples/ptpclient/meson.build
examples/qos_meter/Makefile
examples/qos_meter/meson.build
examples/qos_sched/Makefile
examples/qos_sched/meson.build
examples/server_node_efd/node/Makefile
examples/server_node_efd/node/meson.build
examples/server_node_efd/server/Makefile
examples/server_node_efd/server/meson.build
examples/service_cores/Makefile
examples/service_cores/meson.build
examples/skeleton/Makefile
examples/skeleton/meson.build
examples/timer/Makefile
examples/timer/meson.build
examples/vm_power_manager/Makefile
examples/vm_power_manager/meson.build
examples/vmdq/Makefile
examples/vmdq/meson.build
examples/vmdq_dcb/Makefile
examples/vmdq_dcb/meson.build
lib/librte_ethdev/Makefile
lib/librte_ethdev/ethdev_trace_points.c [new file with mode: 0644]
lib/librte_ethdev/meson.build
lib/librte_ethdev/rte_ethdev.c
lib/librte_ethdev/rte_ethdev.h
lib/librte_ethdev/rte_ethdev_trace.h [new file with mode: 0644]
lib/librte_ethdev/rte_ethdev_trace_fp.h [new file with mode: 0644]
lib/librte_ethdev/rte_ethdev_version.map

index 0b6b545..9a33355 100644 (file)
@@ -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
 
index a8608c2..7de0f16 100644 (file)
@@ -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'
 )
index 4192d8a..63c14df 100644 (file)
@@ -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
index 26f108d..9fec7f8 100644 (file)
@@ -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'
index 3543bde..20ac0d3 100644 (file)
@@ -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
index a54c35a..1dfeba0 100644 (file)
@@ -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',
index 6c51c0b..e0d546d 100644 (file)
@@ -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
 
index 407795c..6f5d1b0 100644 (file)
@@ -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',
 )
index 16d82b0..0f5af08 100644 (file)
@@ -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
 
index c34e11e..2b0a250 100644 (file)
@@ -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'
 )
index ef63f5d..9b277eb 100644 (file)
@@ -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
index ed83289..f72cf70 100644 (file)
@@ -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']
index ede0c4f..8babbbf 100644 (file)
@@ -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
index 304203e..1230db4 100644 (file)
@@ -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'
index 3f2888b..11be2a7 100644 (file)
@@ -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
index 8ebd482..517bd4e 100644 (file)
@@ -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'
index 92d3db0..b9f0813 100644 (file)
@@ -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
index d9e4c7c..7dc13fb 100644 (file)
@@ -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'
index b0e53c3..ca1202b 100644 (file)
@@ -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
index 4e2777a..2bed18e 100644 (file)
@@ -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'
index 4cdae36..807f7f1 100644 (file)
@@ -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
index 4e9a069..4a546ea 100644 (file)
@@ -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',
index 73c91fa..6cd9dcd 100644 (file)
@@ -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
index 1ffd484..7227373 100644 (file)
@@ -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'
index 94d1e58..0db5e60 100644 (file)
@@ -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
index 755e474..8d5061b 100644 (file)
@@ -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
index 6f7b007..d678a8d 100644 (file)
@@ -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(
index d990958..9f31abe 100644 (file)
@@ -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
index 7096e00..6fa468b 100644 (file)
@@ -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'
index 59a110d..839439f 100644 (file)
@@ -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
index ebed3b5..7d72b1b 100644 (file)
@@ -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',
index 4f02a89..613bb11 100644 (file)
@@ -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
index c34e11e..2b0a250 100644 (file)
@@ -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'
 )
index 298e1b0..7c447fe 100644 (file)
@@ -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
index a6241b8..69c3d3b 100644 (file)
@@ -8,6 +8,7 @@
 
 includes += include_directories('../shared')
 
+allow_experimental_apis = true
 sources = files(
        'client.c'
 )
index 1b2f786..0ef6424 100644 (file)
@@ -8,6 +8,7 @@
 
 includes += include_directories('../shared')
 
+allow_experimental_apis = true
 sources = files(
        'args.c', 'init.c', 'main.c'
 )
index 3ff74d5..1fd7aa0 100644 (file)
@@ -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
index 076f4e3..f82f4d4 100644 (file)
@@ -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'
 )
index 4c07644..f88b499 100644 (file)
@@ -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
index b2261e0..cb02c65 100644 (file)
@@ -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'
 )
index bdc4156..b754448 100644 (file)
@@ -18,5 +18,6 @@ SRCS-y := main.c
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 include $(RTE_SDK)/mk/rte.extapp.mk
index 458f836..1416782 100644 (file)
@@ -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'
 )
index baeba11..f2920ed 100644 (file)
@@ -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)
 
index f5435fe..ab449d0 100644 (file)
@@ -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
index 261b7f0..f5b68c9 100644 (file)
@@ -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
index 6c2fccd..b381959 100644 (file)
@@ -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'
index b14b21e..c6cf05a 100644 (file)
@@ -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
index 185fa59..99de24b 100644 (file)
@@ -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')
index efd66fe..cdadf2c 100644 (file)
@@ -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
 
index 393fbd1..26ef786 100644 (file)
@@ -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')
index 82d72b3..7cd3663 100644 (file)
@@ -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
index fa0cbe9..d4171a2 100644 (file)
@@ -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'
 )
index 7c2bf88..90e3533 100644 (file)
@@ -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
index ef7779f..2f9ab13 100644 (file)
@@ -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'
index 525061c..92e3de7 100644 (file)
@@ -58,6 +58,7 @@ else
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 include $(RTE_SDK)/mk/rte.extapp.mk
 
index 289b81c..ba59d3c 100644 (file)
@@ -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',
index fffbe35..ecc551e 100644 (file)
@@ -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
index 30f2876..1c72096 100644 (file)
@@ -8,6 +8,7 @@
 
 name = 'efd_node'
 
+allow_experimental_apis = true
 deps += ['hash']
 sources += files('node.c')
 includes += include_directories('../shared')
index 4837bd3..acbd12a 100644 (file)
@@ -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
index 23e08d1..7abc333 100644 (file)
@@ -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')
index c470558..aac207b 100644 (file)
@@ -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
index c34e11e..2b0a250 100644 (file)
@@ -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'
 )
index 2c29004..2612688 100644 (file)
@@ -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
index 9bb9ec3..ef46b18 100644 (file)
@@ -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'
 )
index bf86339..e58e90a 100644 (file)
@@ -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
index c3d9016..87c21a8 100644 (file)
@@ -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'
index 2fdb991..65c2ad1 100644 (file)
@@ -28,6 +28,7 @@ endif
 
 CFLAGS += -O3 -I$(RTE_SDK)/lib/librte_power/
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 LDLIBS += -lvirt
 
index 20a4a05..54e2b58 100644 (file)
@@ -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'
 )
index 0767c71..98e644f 100644 (file)
@@ -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
 
index c34e11e..2b0a250 100644 (file)
@@ -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'
 )
index 2a9b041..3eb7c9f 100644 (file)
@@ -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
index c34e11e..2b0a250 100644 (file)
@@ -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'
 )
index 943fb8c..d50b7dd 100644 (file)
@@ -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 (file)
index 0000000..05de34f
--- /dev/null
@@ -0,0 +1,43 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(C) 2020 Marvell International Ltd.
+ */
+
+#define RTE_TRACE_POINT_REGISTER_SELECT
+
+#include <rte_ethdev_trace.h>
+
+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);
+}
index ab341d9..e5fd82e 100644 (file)
@@ -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',
index 0854ef8..72aed59 100644 (file)
@@ -39,6 +39,7 @@
 #include <rte_class.h>
 #include <rte_ether.h>
 
+#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));
 }
index e9e3a16..bd0bca6 100644 (file)
@@ -158,6 +158,7 @@ extern "C" {
 #include <rte_config.h>
 #include <rte_ether.h>
 
+#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 (file)
index 0000000..16f5bf2
--- /dev/null
@@ -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 <rte_trace_point.h>
+
+#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 (file)
index 0000000..40084d1
--- /dev/null
@@ -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.h>
+
+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_ */
index 3f32fde..95efe50 100644 (file)
@@ -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;
 };