From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 91CB4A0577; Mon, 13 Apr 2020 17:09:45 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2E3261C0B4; Mon, 13 Apr 2020 17:03:42 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 140E21C0DA for ; Mon, 13 Apr 2020 17:03:40 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 03DF1K3M023054; Mon, 13 Apr 2020 08:03:39 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0818; bh=jxIREiEIvaS+CD0xeqtg7bCKx9oVxU7SJkdh969htfo=; b=HXgYq90zPVFAAxhAbh/69MDh8uEYxOjPUhsqJSaS2aWJe3TASY2Ol24L8lb+0vtxABrr 2wStgaL7ht+Yffq90TIySL3KUhQ9AtAVJNj67DN/JB5HteSf+rkVz5oLmxm8Qc//aDy7 OJ5m7fx1GecXK0ZC0o4uu9vScVkYozIEOBpOgv9XOBcDR8Nsobl++u8JrUqH3Jd8OoXi +xWpC31ypz2HdJNBGDTs3AFqHhJFBLx3D0DXlnNCUYAU5TcxplH8bwZC6JgUwmf4kuSy hKL+VxbYJYe59rIWUY8CkRBgGKteSeHga7X5SMKkHqeZg78i8kS0goqn1SAWBs0ScRaG Mg== Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0b-0016f401.pphosted.com with ESMTP id 30bddkpfd8-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 13 Apr 2020 08:03:38 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 13 Apr 2020 08:03:37 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 13 Apr 2020 08:03:36 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 13 Apr 2020 08:03:36 -0700 Received: from jerin-lab.marvell.com (jerin-lab.marvell.com [10.28.34.14]) by maili.marvell.com (Postfix) with ESMTP id 8D0A33F703F; Mon, 13 Apr 2020 08:03:27 -0700 (PDT) From: To: Olivier Matz , David Hunt , Marko Kovacevic , Ori Kam , Bruce Richardson , Radu Nicolau , Akhil Goyal , Tomasz Kantecki , Sunil Kumar Kori , "Pavan Nikhilesh" , Harry van Haaren , Konstantin Ananyev , Anatoly Burakov , Xiaoyun Li , Jingjing Wu , Reshma Pattan , John McNamara , Kirill Rybalchenko , Cristian Dumitrescu , Jasvinder Singh , Byron Marohn , "Yipeng Wang" , Robert Sanford , "Erik Gabriel Carrillo" , Thomas Monjalon , Ferruh Yigit , "Andrew Rybchenko" CC: , , Date: Mon, 13 Apr 2020 20:31:12 +0530 Message-ID: <20200413150116.734047-30-jerinj@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200413150116.734047-1-jerinj@marvell.com> References: <20200403153709.3703448-1-jerinj@marvell.com> <20200413150116.734047-1-jerinj@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138, 18.0.676 definitions=2020-04-13_07:2020-04-13, 2020-04-13 signatures=0 Subject: [dpdk-dev] [PATCH v5 29/33] ethdev: add tracepoints X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Sunil Kumar Kori Add tracepoints at important and mandatory APIs for tracing support. Signed-off-by: Sunil Kumar Kori --- examples/cmdline/Makefile | 1 + examples/cmdline/meson.build | 1 + examples/distributor/Makefile | 1 + examples/distributor/meson.build | 1 + examples/ethtool/ethtool-app/Makefile | 1 + examples/eventdev_pipeline/meson.build | 1 + examples/flow_filtering/Makefile | 1 + examples/flow_filtering/meson.build | 1 + examples/helloworld/Makefile | 1 + examples/helloworld/meson.build | 1 + examples/ioat/Makefile | 1 + examples/ioat/meson.build | 1 + examples/ip_fragmentation/Makefile | 2 + examples/ip_fragmentation/meson.build | 1 + examples/ip_reassembly/Makefile | 1 + examples/ip_reassembly/meson.build | 1 + examples/ipv4_multicast/Makefile | 1 + examples/ipv4_multicast/meson.build | 1 + examples/l2fwd-cat/Makefile | 1 + examples/l2fwd-cat/meson.build | 1 + examples/l2fwd-event/Makefile | 1 + examples/l2fwd-event/meson.build | 1 + examples/l2fwd-jobstats/Makefile | 1 + examples/l2fwd-jobstats/meson.build | 1 + examples/l2fwd-keepalive/Makefile | 1 + examples/l2fwd-keepalive/ka-agent/Makefile | 1 + examples/l2fwd-keepalive/meson.build | 1 + examples/l3fwd-acl/Makefile | 1 + examples/l3fwd-acl/meson.build | 1 + examples/l3fwd/Makefile | 1 + examples/l3fwd/meson.build | 1 + examples/link_status_interrupt/Makefile | 1 + examples/link_status_interrupt/meson.build | 1 + .../client_server_mp/mp_client/Makefile | 1 + .../client_server_mp/mp_client/meson.build | 1 + .../client_server_mp/mp_server/meson.build | 1 + examples/multi_process/hotplug_mp/Makefile | 1 + examples/multi_process/hotplug_mp/meson.build | 1 + examples/multi_process/simple_mp/Makefile | 1 + examples/multi_process/simple_mp/meson.build | 1 + examples/multi_process/symmetric_mp/Makefile | 1 + .../multi_process/symmetric_mp/meson.build | 1 + examples/ntb/Makefile | 1 + examples/ntb/meson.build | 1 + examples/packet_ordering/Makefile | 1 + examples/packet_ordering/meson.build | 1 + .../performance-thread/l3fwd-thread/Makefile | 1 + .../l3fwd-thread/meson.build | 1 + .../performance-thread/pthread_shim/Makefile | 1 + .../pthread_shim/meson.build | 1 + examples/ptpclient/Makefile | 1 + examples/ptpclient/meson.build | 1 + examples/qos_meter/Makefile | 1 + examples/qos_meter/meson.build | 1 + examples/qos_sched/Makefile | 1 + examples/qos_sched/meson.build | 1 + examples/server_node_efd/node/Makefile | 1 + examples/server_node_efd/node/meson.build | 1 + examples/server_node_efd/server/Makefile | 1 + examples/server_node_efd/server/meson.build | 1 + examples/service_cores/Makefile | 1 + examples/service_cores/meson.build | 1 + examples/skeleton/Makefile | 1 + examples/skeleton/meson.build | 1 + examples/timer/Makefile | 1 + examples/timer/meson.build | 1 + examples/vm_power_manager/Makefile | 1 + examples/vm_power_manager/meson.build | 1 + examples/vmdq/Makefile | 1 + examples/vmdq/meson.build | 1 + examples/vmdq_dcb/Makefile | 1 + examples/vmdq_dcb/meson.build | 1 + lib/librte_ethdev/Makefile | 3 + lib/librte_ethdev/ethdev_trace_points.c | 43 +++++++++ lib/librte_ethdev/meson.build | 5 +- lib/librte_ethdev/rte_ethdev.c | 12 +++ lib/librte_ethdev/rte_ethdev.h | 5 ++ lib/librte_ethdev/rte_ethdev_version.map | 10 +++ lib/librte_ethdev/rte_trace_ethdev.h | 90 +++++++++++++++++++ lib/librte_ethdev/rte_trace_ethdev_fp.h | 40 +++++++++ 80 files changed, 280 insertions(+), 1 deletion(-) create mode 100644 lib/librte_ethdev/ethdev_trace_points.c create mode 100644 lib/librte_ethdev/rte_trace_ethdev.h create mode 100644 lib/librte_ethdev/rte_trace_ethdev_fp.h diff --git a/examples/cmdline/Makefile b/examples/cmdline/Makefile index 0b6b54540..9a33355d0 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 a8608c21a..7de0f1625 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 4192d8a4a..63c14dfca 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 26f108d65..9fec7f883 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 3543bdee0..20ac0d324 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 a54c35aa7..1dfeba0d3 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 6c51c0b7a..e0d546de9 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 407795c42..6f5d1b08a 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 16d82b02f..0f5af0806 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 c34e11e36..2b0a25036 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 ef63f5d68..9b277eb7b 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 ed8328963..f72cf70e7 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 ede0c4f02..8babbbf82 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 304203eed..1230db477 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 3f2888b33..11be2a74a 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 8ebd48291..517bd4e19 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 92d3db0f4..b9f0813ed 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 d9e4c7c21..7dc13fb8f 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 b0e53c37e..ca1202be1 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 4e2777a03..2bed18e74 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 4cdae36f1..807f7f1b8 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 4e9a069d6..4a546eaf8 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 73c91faa8..6cd9dcd9c 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 1ffd484e2..72273736b 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 94d1e58bb..0db5e6015 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 755e47438..8d5061b17 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 6f7b007e1..d678a8ddd 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 d9909584b..9f31abef8 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 7096e00c1..6fa468b3a 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 59a110d12..839439f0f 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 ebed3b518..7d72b1b36 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 4f02a8901..613bb1167 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 c34e11e36..2b0a25036 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 298e1b020..7c447feba 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 a6241b83a..69c3d3bfb 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 1b2f78638..0ef6424f4 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 3ff74d52a..1fd7aa085 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 076f4e3dc..f82f4d48a 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 4c0764451..f88b499bd 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 b2261e00e..cb02c65a6 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 bdc415621..b7544489b 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 458f83642..14167825b 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 baeba11e8..f2920ed54 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 f5435fe12..ab449d093 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 261b7f06a..f5b68c97e 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 6c2fccdcb..b38195914 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 b14b21e30..c6cf05a43 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 185fa59a4..99de24be7 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 efd66febf..cdadf2cb7 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 393fbd122..26ef78635 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 82d72b3e3..7cd36632a 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 fa0cbe93c..d4171a218 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 7c2bf88a9..90e3533d1 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 ef7779f2f..2f9ab13af 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 525061ca0..92e3de79b 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 289b81ce8..ba59d3c9e 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 fffbe3576..ecc551e1d 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 30f28761f..1c720968a 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 4837bd3ea..acbd12ae2 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 23e08d1ae..7abc333e1 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 c47055813..aac207bd9 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 c34e11e36..2b0a25036 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 2c29004d7..2612688c0 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 9bb9ec329..ef46b187e 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 bf86339ab..e58e90a28 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 c3d901637..87c21a867 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 2fdb991d7..65c2ad179 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 20a4a05b3..54e2b584f 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 0767c715a..98e644fa7 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 c34e11e36..2b0a25036 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 2a9b04143..3eb7c9f43 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 c34e11e36..2b0a25036 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 943fb8c87..dbc03f264 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 @@ -39,5 +40,7 @@ SYMLINK-y-include += rte_tm.h SYMLINK-y-include += rte_tm_driver.h SYMLINK-y-include += rte_mtr.h SYMLINK-y-include += rte_mtr_driver.h +SYMLINK-y-include += rte_trace_ethdev.h +SYMLINK-y-include += rte_trace_ethdev_fp.h include $(RTE_SDK)/mk/rte.lib.mk diff --git a/lib/librte_ethdev/ethdev_trace_points.c b/lib/librte_ethdev/ethdev_trace_points.c new file mode 100644 index 000000000..3cb79e6d6 --- /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 /* Select trace point register macros */ + +#include + +RTE_TRACE_POINT_DEFINE(rte_trace_lib_ethdev_configure); +RTE_TRACE_POINT_DEFINE(rte_trace_lib_ethdev_rxq_setup); +RTE_TRACE_POINT_DEFINE(rte_trace_lib_ethdev_txq_setup); +RTE_TRACE_POINT_DEFINE(rte_trace_lib_ethdev_start); +RTE_TRACE_POINT_DEFINE(rte_trace_lib_ethdev_stop); +RTE_TRACE_POINT_DEFINE(rte_trace_lib_ethdev_close); +RTE_TRACE_POINT_DEFINE(rte_trace_lib_ethdev_rx_burst); +RTE_TRACE_POINT_DEFINE(rte_trace_lib_ethdev_tx_burst); + +RTE_INIT(ethdev_trace_init) +{ + RTE_TRACE_POINT_REGISTER(rte_trace_lib_ethdev_configure, + lib.ethdev.configure); + + RTE_TRACE_POINT_REGISTER(rte_trace_lib_ethdev_rxq_setup, + lib.ethdev.rxq.setup); + + RTE_TRACE_POINT_REGISTER(rte_trace_lib_ethdev_txq_setup, + lib.ethdev.txq.setup); + + RTE_TRACE_POINT_REGISTER(rte_trace_lib_ethdev_start, + lib.ethdev.start); + + RTE_TRACE_POINT_REGISTER(rte_trace_lib_ethdev_stop, + lib.ethdev.stop); + + RTE_TRACE_POINT_REGISTER(rte_trace_lib_ethdev_close, + lib.ethdev.close); + + RTE_TRACE_POINT_REGISTER(rte_trace_lib_ethdev_rx_burst, + lib.ethdev.rx.burst); + + RTE_TRACE_POINT_REGISTER(rte_trace_lib_ethdev_tx_burst, + lib.ethdev.tx.burst); +} diff --git a/lib/librte_ethdev/meson.build b/lib/librte_ethdev/meson.build index ab341d9c0..f73b760fc 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', @@ -22,6 +23,8 @@ headers = files('rte_ethdev.h', 'rte_mtr.h', 'rte_mtr_driver.h', 'rte_tm.h', - 'rte_tm_driver.h') + 'rte_tm_driver.h', + 'rte_trace_ethdev.h', + 'rte_trace_ethdev_fp.h') deps += ['net', 'kvargs', 'meter'] diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c index 0854ef883..bf7d842cc 100644 --- a/lib/librte_ethdev/rte_ethdev.c +++ b/lib/librte_ethdev/rte_ethdev.c @@ -39,6 +39,7 @@ #include #include +#include "rte_trace_ethdev.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_trace_lib_ethdev_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,8 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q, rollback: memcpy(&dev->data->dev_conf, &orig_conf, sizeof(dev->data->dev_conf)); + rte_trace_lib_ethdev_configure(port_id, nb_rx_q, nb_tx_q, dev_conf, + ret); return ret; } @@ -1647,6 +1651,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_trace_lib_ethdev_start(port_id); return 0; } @@ -1669,6 +1675,7 @@ rte_eth_dev_stop(uint16_t port_id) dev->data->dev_started = 0; (*dev->dev_ops->dev_stop)(dev); + rte_trace_lib_ethdev_stop(port_id); } int @@ -1709,6 +1716,7 @@ rte_eth_dev_close(uint16_t port_id) dev->data->dev_started = 0; (*dev->dev_ops->dev_close)(dev); + rte_trace_lib_ethdev_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 +1926,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_trace_lib_ethdev_rxq_setup(port_id, rx_queue_id, nb_rx_desc, mp, + rx_conf, ret); return eth_err(port_id, ret); } @@ -2088,6 +2098,8 @@ rte_eth_tx_queue_setup(uint16_t port_id, uint16_t tx_queue_id, return -EINVAL; } + rte_trace_lib_ethdev_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 d1a593ad1..17cd1dda3 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_trace_ethdev_fp.h" #include "rte_dev_info.h" extern int rte_eth_dev_logtype; @@ -4400,6 +4401,8 @@ rte_eth_rx_burst(uint16_t port_id, uint16_t queue_id, } #endif + rte_trace_lib_ethdev_rx_burst(port_id, queue_id, (void **)rx_pkts, + nb_rx); return nb_rx; } @@ -4663,6 +4666,8 @@ rte_eth_tx_burst(uint16_t port_id, uint16_t queue_id, } #endif + rte_trace_lib_ethdev_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_version.map b/lib/librte_ethdev/rte_ethdev_version.map index 3f32fdecf..28c07117c 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_trace_lib_ethdev_configure; + __rte_trace_lib_ethdev_rxq_setup; + __rte_trace_lib_ethdev_txq_setup; + __rte_trace_lib_ethdev_start; + __rte_trace_lib_ethdev_stop; + __rte_trace_lib_ethdev_close; + __rte_trace_lib_ethdev_rx_burst; + __rte_trace_lib_ethdev_tx_burst; }; diff --git a/lib/librte_ethdev/rte_trace_ethdev.h b/lib/librte_ethdev/rte_trace_ethdev.h new file mode 100644 index 000000000..060779a1d --- /dev/null +++ b/lib/librte_ethdev/rte_trace_ethdev.h @@ -0,0 +1,90 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright(C) 2020 Marvell International Ltd. + */ + +#ifndef _RTE_TRACE_ETHDEV_H_ +#define _RTE_TRACE_ETHDEV_H_ + +/** + * @file + * + * API for ethdev trace support + */ + +#ifdef __cplusplus +extern "C" { +#endif + +#include "rte_ethdev.h" + +#include + +RTE_TRACE_POINT( + rte_trace_lib_ethdev_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_ctf_u16(port_id); rte_trace_ctf_u16(nb_rx_q); + rte_trace_ctf_u16(nb_tx_q); rte_trace_ctf_u32(dev_conf->link_speeds); + rte_trace_ctf_u32(dev_conf->rxmode.mq_mode); + rte_trace_ctf_u32(dev_conf->rxmode.max_rx_pkt_len); + rte_trace_ctf_u64(dev_conf->rxmode.offloads); + rte_trace_ctf_u32(dev_conf->txmode.mq_mode); + rte_trace_ctf_u64(dev_conf->txmode.offloads); + rte_trace_ctf_u32(dev_conf->lpbk_mode); rte_trace_ctf_int(rc); +) + +RTE_TRACE_POINT( + rte_trace_lib_ethdev_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_ctf_u16(port_id); rte_trace_ctf_u16(rx_queue_id); + rte_trace_ctf_u16(nb_rx_desc); rte_trace_ctf_ptr(mp); + rte_trace_ctf_u8(rx_conf->rx_thresh.pthresh); + rte_trace_ctf_u8(rx_conf->rx_thresh.hthresh); + rte_trace_ctf_u8(rx_conf->rx_thresh.wthresh); + rte_trace_ctf_u8(rx_conf->rx_drop_en); + rte_trace_ctf_u8(rx_conf->rx_deferred_start); + rte_trace_ctf_u64(rx_conf->offloads); rte_trace_ctf_int(rc); +) + +RTE_TRACE_POINT( + rte_trace_lib_ethdev_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_ctf_u16(port_id); rte_trace_ctf_u16(tx_queue_id); + rte_trace_ctf_u16(nb_tx_desc); + rte_trace_ctf_u8(tx_conf->tx_thresh.pthresh); + rte_trace_ctf_u8(tx_conf->tx_thresh.hthresh); + rte_trace_ctf_u8(tx_conf->tx_thresh.wthresh); + rte_trace_ctf_u8(tx_conf->tx_deferred_start); + rte_trace_ctf_u16(tx_conf->tx_free_thresh); + rte_trace_ctf_u64(tx_conf->offloads); +) + +RTE_TRACE_POINT( + rte_trace_lib_ethdev_start, + RTE_TRACE_POINT_ARGS(uint16_t port_id), + rte_trace_ctf_u16(port_id); +) + +RTE_TRACE_POINT( + rte_trace_lib_ethdev_stop, + RTE_TRACE_POINT_ARGS(uint16_t port_id), + rte_trace_ctf_u16(port_id); +) + +RTE_TRACE_POINT( + rte_trace_lib_ethdev_close, + RTE_TRACE_POINT_ARGS(uint16_t port_id), + rte_trace_ctf_u16(port_id); +) + +#ifdef __cplusplus +} +#endif + +#endif /* _RTE_TRACE_ETHDEV_H_ */ diff --git a/lib/librte_ethdev/rte_trace_ethdev_fp.h b/lib/librte_ethdev/rte_trace_ethdev_fp.h new file mode 100644 index 000000000..0f08f99df --- /dev/null +++ b/lib/librte_ethdev/rte_trace_ethdev_fp.h @@ -0,0 +1,40 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright(C) 2020 Marvell International Ltd. + */ + +#ifndef _RTE_TRACE_ETHDEV_FP_H_ +#define _RTE_TRACE_ETHDEV_FP_H_ + +/** + * @file + * + * API for ethdev trace support + */ + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +RTE_TRACE_POINT_FP( + rte_trace_lib_ethdev_rx_burst, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_id, + void **pkt_tbl, uint16_t nb_rx), + rte_trace_ctf_u16(port_id); rte_trace_ctf_u16(queue_id); + rte_trace_ctf_ptr(pkt_tbl); rte_trace_ctf_u16(nb_rx); +) + +RTE_TRACE_POINT_FP( + rte_trace_lib_ethdev_tx_burst, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t queue_id, + void **pkts_tbl, uint16_t nb_pkts), + rte_trace_ctf_u16(port_id); rte_trace_ctf_u16(queue_id); + rte_trace_ctf_ptr(pkts_tbl); rte_trace_ctf_u16(nb_pkts); +) + +#ifdef __cplusplus +} +#endif + +#endif /* _RTE_TRACE_ETHDEV_FP_H_ */ -- 2.25.1