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 7A50EA0562; Sun, 29 Mar 2020 16:50:39 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F019D1C0CB; Sun, 29 Mar 2020 16:45:49 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 0BE141C0C1 for ; Sun, 29 Mar 2020 16:45:47 +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 02TEfJ4U013739; Sun, 29 Mar 2020 07:45:47 -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=OaZxd193ck1Fs7NMywSjxQ3oS9juvr33Sh35cLL78os=; b=WgA6pyuO6PsHxNPokCxQLTFJfwzqcnLi1D7J/s8JsmUdY4NJPNuEoPvYTb7zd8Yni5Z3 2bskwo5yWTdxwU+XmUeNdPXJ1YyMwgxo+QZvH82pgPscOK+9HiXTg5syHtG9bgJNE7BE IlbiFXzD3JHtICbRFLha8Z3TxhDbgapygwW7bMKrY1bbBvYLA5pDrLYlmgzceVRTIUMB wMrUk7N9A5LBIwqODTflMv3hkMQjb+AA9ayBbSu5O5tUlKQrrMAB8tK96dlo6FSzVSF6 6NhE/9ydCFKdSxxmnWB1+Nn5qKDoffOZ5pm4pDaU2Q0wYfksDRsq/7RAf0wXR86F2uv2 GA== Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0b-0016f401.pphosted.com with ESMTP id 30263kb5nt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Sun, 29 Mar 2020 07:45:47 -0700 Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sun, 29 Mar 2020 07:45:44 -0700 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Sun, 29 Mar 2020 07:45:44 -0700 Received: from jerin-lab.marvell.com (jerin-lab.marvell.com [10.28.34.14]) by maili.marvell.com (Postfix) with ESMTP id BF3413F703F; Sun, 29 Mar 2020 07:45:41 -0700 (PDT) From: To: Thomas Monjalon , Jerin Jacob , Sunil Kumar Kori , Abhinandan Gujjar , Nikhil Rao , "Erik Gabriel Carrillo" CC: , , , Date: Sun, 29 Mar 2020 20:13:39 +0530 Message-ID: <20200329144342.1543749-31-jerinj@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200329144342.1543749-1-jerinj@marvell.com> References: <20200325211603.240288-1-jerinj@marvell.com> <20200329144342.1543749-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.645 definitions=2020-03-29_05:2020-03-27, 2020-03-29 signatures=0 Subject: [dpdk-dev] [PATCH v3 30/33] eventdev: 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 --- MAINTAINERS | 2 + drivers/event/skeleton/Makefile | 1 + drivers/event/skeleton/meson.build | 1 + lib/librte_eventdev/Makefile | 3 + lib/librte_eventdev/eventdev_trace_points.c | 173 +++++++++++ lib/librte_eventdev/meson.build | 3 + .../rte_event_crypto_adapter.c | 10 + .../rte_event_eth_rx_adapter.c | 11 + .../rte_event_eth_tx_adapter.c | 13 +- .../rte_event_eth_tx_adapter.h | 2 + lib/librte_eventdev/rte_event_timer_adapter.c | 8 +- lib/librte_eventdev/rte_event_timer_adapter.h | 8 + lib/librte_eventdev/rte_eventdev.c | 9 + lib/librte_eventdev/rte_eventdev.h | 5 +- lib/librte_eventdev/rte_eventdev_version.map | 42 +++ lib/librte_eventdev/rte_trace_eventdev.h | 278 ++++++++++++++++++ lib/librte_eventdev/rte_trace_eventdev_fp.h | 75 +++++ 17 files changed, 640 insertions(+), 4 deletions(-) create mode 100644 lib/librte_eventdev/eventdev_trace_points.c create mode 100644 lib/librte_eventdev/rte_trace_eventdev.h create mode 100644 lib/librte_eventdev/rte_trace_eventdev_fp.h diff --git a/MAINTAINERS b/MAINTAINERS index a69535e6a..d113bc62b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -204,6 +204,8 @@ F: lib/librte_eal/common/eal_common_trace*.c F: lib/librte_eal/common/eal_trace.h F: lib/librte_ethdev/ethdev_trace_points.c F: lib/librte_ethdev/rte_trace_ethdev*.h +F: lib/librte_eventdev/eventdev_trace_points.c +F: lib/librte_eventdev/rte_trace_eventdev*.h Memory Allocation M: Anatoly Burakov diff --git a/drivers/event/skeleton/Makefile b/drivers/event/skeleton/Makefile index dc85ad3c4..8c561fff0 100644 --- a/drivers/event/skeleton/Makefile +++ b/drivers/event/skeleton/Makefile @@ -10,6 +10,7 @@ include $(RTE_SDK)/mk/rte.vars.mk LIB = librte_pmd_skeleton_event.a CFLAGS += $(WERROR_FLAGS) +CFLAGS += -DALLOW_EXPERIMENTAL_API LDLIBS += -lrte_eal -lrte_eventdev LDLIBS += -lrte_pci -lrte_bus_pci LDLIBS += -lrte_bus_vdev diff --git a/drivers/event/skeleton/meson.build b/drivers/event/skeleton/meson.build index acfe15653..ebe3259f9 100644 --- a/drivers/event/skeleton/meson.build +++ b/drivers/event/skeleton/meson.build @@ -1,5 +1,6 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2017 Intel Corporation +allow_experimental_apis = true sources = files('skeleton_eventdev.c') deps += ['bus_pci', 'bus_vdev'] diff --git a/lib/librte_eventdev/Makefile b/lib/librte_eventdev/Makefile index 1052ccdbb..97193a1d5 100644 --- a/lib/librte_eventdev/Makefile +++ b/lib/librte_eventdev/Makefile @@ -22,6 +22,7 @@ LDLIBS += -lrte_mbuf -lrte_cryptodev -lpthread # library source files SRCS-y += rte_eventdev.c SRCS-y += rte_event_ring.c +SRCS-y += eventdev_trace_points.c SRCS-y += rte_event_eth_rx_adapter.c SRCS-y += rte_event_timer_adapter.c SRCS-y += rte_event_crypto_adapter.c @@ -30,6 +31,8 @@ SRCS-y += rte_event_eth_tx_adapter.c # export include files SYMLINK-y-include += rte_eventdev.h SYMLINK-y-include += rte_eventdev_pmd.h +SYMLINK-y-include += rte_trace_eventdev.h +SYMLINK-y-include += rte_trace_eventdev_fp.h SYMLINK-y-include += rte_eventdev_pmd_pci.h SYMLINK-y-include += rte_eventdev_pmd_vdev.h SYMLINK-y-include += rte_event_ring.h diff --git a/lib/librte_eventdev/eventdev_trace_points.c b/lib/librte_eventdev/eventdev_trace_points.c new file mode 100644 index 000000000..be9ce5ffe --- /dev/null +++ b/lib/librte_eventdev/eventdev_trace_points.c @@ -0,0 +1,173 @@ +/* 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_eventdev.h" + +/* Eventdev trace points */ +RTE_TRACE_POINT_DEFINE(rte_trace_lib_eventdev_configure); +RTE_TRACE_POINT_DEFINE(rte_trace_lib_event_queue_setup); +RTE_TRACE_POINT_DEFINE(rte_trace_lib_event_port_setup); +RTE_TRACE_POINT_DEFINE(rte_trace_lib_event_port_link); +RTE_TRACE_POINT_DEFINE(rte_trace_lib_event_port_unlink); +RTE_TRACE_POINT_DEFINE(rte_trace_lib_eventdev_start); +RTE_TRACE_POINT_DEFINE(rte_trace_lib_eventdev_stop); +RTE_TRACE_POINT_DEFINE(rte_trace_lib_eventdev_close); +RTE_TRACE_POINT_DEFINE(rte_trace_lib_event_enq_burst); +RTE_TRACE_POINT_DEFINE(rte_trace_lib_event_deq_burst); + +/* Eventdev Rx adapter trace points */ +RTE_TRACE_POINT_DEFINE(rte_trace_lib_event_eth_rx_adapter_create); +RTE_TRACE_POINT_DEFINE(rte_trace_lib_event_eth_rx_adapter_free); +RTE_TRACE_POINT_DEFINE(rte_trace_lib_event_eth_rx_adapter_queue_add); +RTE_TRACE_POINT_DEFINE(rte_trace_lib_event_eth_rx_adapter_queue_del); +RTE_TRACE_POINT_DEFINE(rte_trace_lib_event_eth_rx_adapter_start); +RTE_TRACE_POINT_DEFINE(rte_trace_lib_event_eth_rx_adapter_stop); + +/* Eventdev Tx adapter trace points */ +RTE_TRACE_POINT_DEFINE(rte_trace_lib_event_eth_tx_adapter_create); +RTE_TRACE_POINT_DEFINE(rte_trace_lib_event_eth_tx_adapter_free); +RTE_TRACE_POINT_DEFINE(rte_trace_lib_event_eth_tx_adapter_queue_add); +RTE_TRACE_POINT_DEFINE(rte_trace_lib_event_eth_tx_adapter_queue_del); +RTE_TRACE_POINT_DEFINE(rte_trace_lib_event_eth_tx_adapter_start); +RTE_TRACE_POINT_DEFINE(rte_trace_lib_event_eth_tx_adapter_stop); +RTE_TRACE_POINT_DEFINE(rte_trace_lib_event_eth_tx_adapter_enqueue); + +/* Eventdev Timer adapter trace points */ +RTE_TRACE_POINT_DEFINE(rte_trace_lib_event_timer_adapter_create); +RTE_TRACE_POINT_DEFINE(rte_trace_lib_event_timer_adapter_start); +RTE_TRACE_POINT_DEFINE(rte_trace_lib_event_timer_adapter_stop); +RTE_TRACE_POINT_DEFINE(rte_trace_lib_event_timer_adapter_free); +RTE_TRACE_POINT_DEFINE(rte_trace_lib_event_timer_arm_burst); +RTE_TRACE_POINT_DEFINE(rte_trace_lib_event_timer_arm_tmo_tick_burst); +RTE_TRACE_POINT_DEFINE(rte_trace_lib_event_timer_cancel_burst); + +/* Eventdev Crypto adapter trace points */ +RTE_TRACE_POINT_DEFINE(rte_trace_lib_event_crypto_adapter_create); +RTE_TRACE_POINT_DEFINE(rte_trace_lib_event_crypto_adapter_free); +RTE_TRACE_POINT_DEFINE(rte_trace_lib_event_crypto_adapter_queue_pair_add); +RTE_TRACE_POINT_DEFINE(rte_trace_lib_event_crypto_adapter_queue_pair_del); +RTE_TRACE_POINT_DEFINE(rte_trace_lib_event_crypto_adapter_start); +RTE_TRACE_POINT_DEFINE(rte_trace_lib_event_crypto_adapter_stop); + +RTE_INIT(eventdev_trace_init) +{ + /* Eventdev trace points */ + RTE_TRACE_POINT_REGISTER(rte_trace_lib_eventdev_configure, + lib.eventdev.configure, INFO); + + RTE_TRACE_POINT_REGISTER(rte_trace_lib_event_queue_setup, + lib.eventdev.queue.setup, INFO); + + RTE_TRACE_POINT_REGISTER(rte_trace_lib_event_port_setup, + lib.eventdev.port.setup, INFO); + + RTE_TRACE_POINT_REGISTER(rte_trace_lib_event_port_link, + lib.eventdev.port.link, INFO); + + RTE_TRACE_POINT_REGISTER(rte_trace_lib_event_port_unlink, + lib.eventdev.port.unlink, INFO); + + RTE_TRACE_POINT_REGISTER(rte_trace_lib_eventdev_start, + lib.eventdev.start, INFO); + + RTE_TRACE_POINT_REGISTER(rte_trace_lib_eventdev_stop, + lib.eventdev.stop, INFO); + + RTE_TRACE_POINT_REGISTER(rte_trace_lib_eventdev_close, + lib.eventdev.close, INFO); + + RTE_TRACE_POINT_REGISTER(rte_trace_lib_event_enq_burst, + lib.eventdev.enq.burst, INFO); + + RTE_TRACE_POINT_REGISTER(rte_trace_lib_event_deq_burst, + lib.eventdev.deq.burst, INFO); + + + /* Eventdev Rx adapter trace points */ + RTE_TRACE_POINT_REGISTER(rte_trace_lib_event_eth_rx_adapter_create, + lib.eventdev.rx.adapter.create, INFO); + + RTE_TRACE_POINT_REGISTER(rte_trace_lib_event_eth_rx_adapter_free, + lib.eventdev.rx.adapter.free, INFO); + + RTE_TRACE_POINT_REGISTER(rte_trace_lib_event_eth_rx_adapter_queue_add, + lib.eventdev.rx.adapter.queue.add, INFO); + + RTE_TRACE_POINT_REGISTER(rte_trace_lib_event_eth_rx_adapter_queue_del, + lib.eventdev.rx.adapter.queue.del, INFO); + + RTE_TRACE_POINT_REGISTER(rte_trace_lib_event_eth_rx_adapter_start, + lib.eventdev.rx.adapter.start, INFO); + + RTE_TRACE_POINT_REGISTER(rte_trace_lib_event_eth_rx_adapter_stop, + lib.eventdev.rx.adapter.stop, INFO); + + /* Eventdev Tx adapter trace points */ + RTE_TRACE_POINT_REGISTER(rte_trace_lib_event_eth_tx_adapter_create, + lib.eventdev.tx.adapter.create, INFO); + + RTE_TRACE_POINT_REGISTER(rte_trace_lib_event_eth_tx_adapter_free, + lib.eventdev.tx.adapter.free, INFO); + + RTE_TRACE_POINT_REGISTER(rte_trace_lib_event_eth_tx_adapter_queue_add, + lib.eventdev.tx.adapter.queue.add, INFO); + + RTE_TRACE_POINT_REGISTER(rte_trace_lib_event_eth_tx_adapter_queue_del, + lib.eventdev.tx.adapter.queue.del, INFO); + + RTE_TRACE_POINT_REGISTER(rte_trace_lib_event_eth_tx_adapter_start, + lib.eventdev.tx.adapter.start, INFO); + + RTE_TRACE_POINT_REGISTER(rte_trace_lib_event_eth_tx_adapter_stop, + lib.eventdev.tx.adapter.stop, INFO); + + RTE_TRACE_POINT_REGISTER(rte_trace_lib_event_eth_tx_adapter_enqueue, + lib.eventdev.tx.adapter.enq, INFO); + + + /* Eventdev Timer adapter trace points */ + RTE_TRACE_POINT_REGISTER(rte_trace_lib_event_timer_adapter_create, + lib.eventdev.timer.create, INFO); + + RTE_TRACE_POINT_REGISTER(rte_trace_lib_event_timer_adapter_start, + lib.eventdev.timer.start, INFO); + + RTE_TRACE_POINT_REGISTER(rte_trace_lib_event_timer_adapter_stop, + lib.eventdev.timer.stop, INFO); + + RTE_TRACE_POINT_REGISTER(rte_trace_lib_event_timer_adapter_free, + lib.eventdev.timer.free, INFO); + + RTE_TRACE_POINT_REGISTER(rte_trace_lib_event_timer_arm_burst, + lib.eventdev.timer.burst, INFO); + + RTE_TRACE_POINT_REGISTER(rte_trace_lib_event_timer_arm_tmo_tick_burst, + lib.eventdev.timer.tick.burst, INFO); + + RTE_TRACE_POINT_REGISTER(rte_trace_lib_event_timer_cancel_burst, + lib.eventdev.timer.cancel, INFO); + + /* Eventdev Crypto adapter trace points */ + RTE_TRACE_POINT_REGISTER(rte_trace_lib_event_crypto_adapter_create, + lib.eventdev.crypto.create, INFO); + + RTE_TRACE_POINT_REGISTER(rte_trace_lib_event_crypto_adapter_free, + lib.eventdev.crypto.free, INFO); + + RTE_TRACE_POINT_REGISTER( + rte_trace_lib_event_crypto_adapter_queue_pair_add, + lib.eventdev.crypto.queue.add, INFO); + + RTE_TRACE_POINT_REGISTER( + rte_trace_lib_event_crypto_adapter_queue_pair_del, + lib.eventdev.crypto.queue.del, INFO); + + RTE_TRACE_POINT_REGISTER(rte_trace_lib_event_crypto_adapter_start, + lib.eventdev.crypto.start, INFO); + + RTE_TRACE_POINT_REGISTER(rte_trace_lib_event_crypto_adapter_stop, + lib.eventdev.crypto.stop, INFO); +} diff --git a/lib/librte_eventdev/meson.build b/lib/librte_eventdev/meson.build index 02ac61ad2..7aeb0a097 100644 --- a/lib/librte_eventdev/meson.build +++ b/lib/librte_eventdev/meson.build @@ -11,12 +11,15 @@ endif sources = files('rte_eventdev.c', 'rte_event_ring.c', + 'eventdev_trace_points.c', 'rte_event_eth_rx_adapter.c', 'rte_event_timer_adapter.c', 'rte_event_crypto_adapter.c', 'rte_event_eth_tx_adapter.c') headers = files('rte_eventdev.h', 'rte_eventdev_pmd.h', + 'rte_trace_eventdev.h', + 'rte_trace_eventdev_fp.h', 'rte_eventdev_pmd_pci.h', 'rte_eventdev_pmd_vdev.h', 'rte_event_ring.h', diff --git a/lib/librte_eventdev/rte_event_crypto_adapter.c b/lib/librte_eventdev/rte_event_crypto_adapter.c index 22d910816..5fbc75093 100644 --- a/lib/librte_eventdev/rte_event_crypto_adapter.c +++ b/lib/librte_eventdev/rte_event_crypto_adapter.c @@ -16,6 +16,7 @@ #include "rte_eventdev.h" #include "rte_eventdev_pmd.h" +#include "rte_trace_eventdev.h" #include "rte_event_crypto_adapter.h" #define BATCH_SIZE 32 @@ -267,6 +268,8 @@ rte_event_crypto_adapter_create_ext(uint8_t id, uint8_t dev_id, event_crypto_adapter[id] = adapter; + rte_trace_lib_event_crypto_adapter_create(id, dev_id, adapter, conf_arg, + mode); return 0; } @@ -314,6 +317,7 @@ rte_event_crypto_adapter_free(uint8_t id) return -EBUSY; } + rte_trace_lib_event_crypto_adapter_free(id, adapter); if (adapter->default_cb_arg) rte_free(adapter->conf_arg); rte_free(adapter->cdevs); @@ -874,6 +878,8 @@ rte_event_crypto_adapter_queue_pair_add(uint8_t id, rte_service_component_runstate_set(adapter->service_id, 1); } + rte_trace_lib_event_crypto_adapter_queue_pair_add(id, cdev_id, event, + queue_pair_id); return 0; } @@ -959,6 +965,8 @@ rte_event_crypto_adapter_queue_pair_del(uint8_t id, uint8_t cdev_id, adapter->nb_qps); } + rte_trace_lib_event_crypto_adapter_queue_pair_del(id, cdev_id, + queue_pair_id, ret); return ret; } @@ -1014,12 +1022,14 @@ rte_event_crypto_adapter_start(uint8_t id) if (adapter == NULL) return -EINVAL; + rte_trace_lib_event_crypto_adapter_start(id, adapter); return eca_adapter_ctrl(id, 1); } int rte_event_crypto_adapter_stop(uint8_t id) { + rte_trace_lib_event_crypto_adapter_stop(id); return eca_adapter_ctrl(id, 0); } diff --git a/lib/librte_eventdev/rte_event_eth_rx_adapter.c b/lib/librte_eventdev/rte_event_eth_rx_adapter.c index 95dd47820..aca4f9d8a 100644 --- a/lib/librte_eventdev/rte_event_eth_rx_adapter.c +++ b/lib/librte_eventdev/rte_event_eth_rx_adapter.c @@ -20,6 +20,7 @@ #include "rte_eventdev.h" #include "rte_eventdev_pmd.h" +#include "rte_trace_eventdev.h" #include "rte_event_eth_rx_adapter.h" #define BATCH_SIZE 32 @@ -1998,6 +1999,8 @@ rte_event_eth_rx_adapter_create_ext(uint8_t id, uint8_t dev_id, event_eth_rx_adapter[id] = rx_adapter; if (conf_cb == rxa_default_conf_cb) rx_adapter->default_cb_arg = 1; + rte_trace_lib_event_eth_rx_adapter_create(id, dev_id, conf_cb, + conf_arg); return 0; } @@ -2047,6 +2050,7 @@ rte_event_eth_rx_adapter_free(uint8_t id) rte_free(rx_adapter); event_eth_rx_adapter[id] = NULL; + rte_trace_lib_event_eth_rx_adapter_free(id); return 0; } @@ -2142,6 +2146,9 @@ rte_event_eth_rx_adapter_queue_add(uint8_t id, rte_spinlock_unlock(&rx_adapter->rx_lock); } + rte_trace_lib_event_eth_rx_adapter_queue_add(id, eth_dev_id, + rx_queue_id, queue_conf, + ret); if (ret) return ret; @@ -2263,18 +2270,22 @@ rte_event_eth_rx_adapter_queue_del(uint8_t id, uint16_t eth_dev_id, rxa_sw_adapter_queue_count(rx_adapter)); } + rte_trace_lib_event_eth_rx_adapter_queue_del(id, eth_dev_id, + rx_queue_id, ret); return ret; } int rte_event_eth_rx_adapter_start(uint8_t id) { + rte_trace_lib_event_eth_rx_adapter_start(id); return rxa_ctrl(id, 1); } int rte_event_eth_rx_adapter_stop(uint8_t id) { + rte_trace_lib_event_eth_rx_adapter_stop(id); return rxa_ctrl(id, 0); } diff --git a/lib/librte_eventdev/rte_event_eth_tx_adapter.c b/lib/librte_eventdev/rte_event_eth_tx_adapter.c index d02ef57f4..a6dbc655e 100644 --- a/lib/librte_eventdev/rte_event_eth_tx_adapter.c +++ b/lib/librte_eventdev/rte_event_eth_tx_adapter.c @@ -6,6 +6,7 @@ #include #include "rte_eventdev_pmd.h" +#include "rte_trace_eventdev.h" #include "rte_event_eth_tx_adapter.h" #define TXA_BATCH_SIZE 32 @@ -942,7 +943,8 @@ rte_event_eth_tx_adapter_create(uint8_t id, uint8_t dev_id, txa_dev_id_array[id] = TXA_INVALID_DEV_ID; return ret; } - + rte_trace_lib_event_eth_tx_adapter_create(id, dev_id, NULL, port_conf, + ret); txa_dev_id_array[id] = dev_id; return 0; } @@ -984,6 +986,8 @@ rte_event_eth_tx_adapter_create_ext(uint8_t id, uint8_t dev_id, return ret; } + rte_trace_lib_event_eth_tx_adapter_create(id, dev_id, conf_cb, conf_arg, + ret); txa_dev_id_array[id] = dev_id; return 0; } @@ -1012,6 +1016,7 @@ rte_event_eth_tx_adapter_free(uint8_t id) ret = txa_service_adapter_free(id); txa_dev_id_array[id] = TXA_INVALID_DEV_ID; + rte_trace_lib_event_eth_tx_adapter_free(id, ret); return ret; } @@ -1043,6 +1048,8 @@ rte_event_eth_tx_adapter_queue_add(uint8_t id, else ret = txa_service_queue_add(id, txa_evdev(id), eth_dev, queue); + rte_trace_lib_event_eth_tx_adapter_queue_add(id, eth_dev_id, queue, + ret); return ret; } @@ -1073,6 +1080,8 @@ rte_event_eth_tx_adapter_queue_del(uint8_t id, else ret = txa_service_queue_del(id, eth_dev, queue); + rte_trace_lib_event_eth_tx_adapter_queue_del(id, eth_dev_id, queue, + ret); return ret; } @@ -1094,6 +1103,7 @@ rte_event_eth_tx_adapter_start(uint8_t id) ret = txa_dev_start(id) ? txa_dev_start(id)(id, txa_evdev(id)) : 0; if (ret == 0) ret = txa_service_start(id); + rte_trace_lib_event_eth_tx_adapter_start(id, ret); return ret; } @@ -1154,5 +1164,6 @@ rte_event_eth_tx_adapter_stop(uint8_t id) ret = txa_dev_stop(id) ? txa_dev_stop(id)(id, txa_evdev(id)) : 0; if (ret == 0) ret = txa_service_stop(id); + rte_trace_lib_event_eth_tx_adapter_stop(id, ret); return ret; } diff --git a/lib/librte_eventdev/rte_event_eth_tx_adapter.h b/lib/librte_eventdev/rte_event_eth_tx_adapter.h index 93b717af9..f2154c01a 100644 --- a/lib/librte_eventdev/rte_event_eth_tx_adapter.h +++ b/lib/librte_eventdev/rte_event_eth_tx_adapter.h @@ -369,6 +369,8 @@ rte_event_eth_tx_adapter_enqueue(uint8_t dev_id, return 0; } #endif + rte_trace_lib_event_eth_tx_adapter_enqueue(dev_id, port_id, ev, + nb_events, flags); if (flags) return dev->txa_enqueue_same_dest(dev->data->ports[port_id], ev, nb_events); diff --git a/lib/librte_eventdev/rte_event_timer_adapter.c b/lib/librte_eventdev/rte_event_timer_adapter.c index 161e21a68..700e10afd 100644 --- a/lib/librte_eventdev/rte_event_timer_adapter.c +++ b/lib/librte_eventdev/rte_event_timer_adapter.c @@ -22,6 +22,7 @@ #include "rte_eventdev.h" #include "rte_eventdev_pmd.h" +#include "rte_trace_eventdev.h" #include "rte_event_timer_adapter.h" #include "rte_event_timer_adapter_pmd.h" @@ -228,6 +229,8 @@ rte_event_timer_adapter_create_ext( adapter->allocated = 1; + rte_trace_lib_event_timer_adapter_create(adapter_id, adapter, conf, + conf_cb); return adapter; free_memzone: @@ -272,7 +275,7 @@ rte_event_timer_adapter_start(const struct rte_event_timer_adapter *adapter) return ret; adapter->data->started = 1; - + rte_trace_lib_event_timer_adapter_start(adapter); return 0; } @@ -295,7 +298,7 @@ rte_event_timer_adapter_stop(const struct rte_event_timer_adapter *adapter) return ret; adapter->data->started = 0; - + rte_trace_lib_event_timer_adapter_stop(adapter); return 0; } @@ -379,6 +382,7 @@ rte_event_timer_adapter_free(struct rte_event_timer_adapter *adapter) adapter->data = NULL; adapter->allocated = 0; + rte_trace_lib_event_timer_adapter_free(adapter); return 0; } diff --git a/lib/librte_eventdev/rte_event_timer_adapter.h b/lib/librte_eventdev/rte_event_timer_adapter.h index 7f6dc5c29..d338b7738 100644 --- a/lib/librte_eventdev/rte_event_timer_adapter.h +++ b/lib/librte_eventdev/rte_event_timer_adapter.h @@ -115,6 +115,7 @@ extern "C" { #include #include "rte_eventdev.h" +#include "rte_trace_eventdev_fp.h" /** * Timer adapter clock source @@ -579,6 +580,8 @@ rte_event_timer_arm_burst(const struct rte_event_timer_adapter *adapter, ADAPTER_VALID_OR_ERR_RET(adapter, -EINVAL); FUNC_PTR_OR_ERR_RET(adapter->arm_burst, -EINVAL); #endif + rte_trace_lib_event_timer_arm_burst(adapter, (void **)evtims, + nb_evtims); return adapter->arm_burst(adapter, evtims, nb_evtims); } @@ -622,6 +625,9 @@ rte_event_timer_arm_tmo_tick_burst( ADAPTER_VALID_OR_ERR_RET(adapter, -EINVAL); FUNC_PTR_OR_ERR_RET(adapter->arm_tmo_tick_burst, -EINVAL); #endif + rte_trace_lib_event_timer_arm_tmo_tick_burst(adapter, timeout_ticks, + (void **)evtims, + nb_evtims); return adapter->arm_tmo_tick_burst(adapter, evtims, timeout_ticks, nb_evtims); } @@ -655,6 +661,8 @@ rte_event_timer_cancel_burst(const struct rte_event_timer_adapter *adapter, ADAPTER_VALID_OR_ERR_RET(adapter, -EINVAL); FUNC_PTR_OR_ERR_RET(adapter->cancel_burst, -EINVAL); #endif + rte_trace_lib_event_timer_cancel_burst(adapter, (void **)evtims, + nb_evtims); return adapter->cancel_burst(adapter, evtims, nb_evtims); } diff --git a/lib/librte_eventdev/rte_eventdev.c b/lib/librte_eventdev/rte_eventdev.c index b987e0745..d0a3bdd7f 100644 --- a/lib/librte_eventdev/rte_eventdev.c +++ b/lib/librte_eventdev/rte_eventdev.c @@ -35,6 +35,7 @@ #include "rte_eventdev.h" #include "rte_eventdev_pmd.h" +#include "rte_trace_eventdev.h" static struct rte_eventdev rte_event_devices[RTE_EVENT_MAX_DEVS]; @@ -524,6 +525,7 @@ rte_event_dev_configure(uint8_t dev_id, } dev->data->event_dev_cap = info.event_dev_cap; + rte_trace_lib_eventdev_configure(dev_id, dev_conf, diag); return diag; } @@ -650,6 +652,7 @@ rte_event_queue_setup(uint8_t dev_id, uint8_t queue_id, } dev->data->queues_cfg[queue_id] = *queue_conf; + rte_trace_lib_event_queue_setup(dev_id, queue_id, queue_conf); return (*dev->dev_ops->queue_setup)(dev, queue_id, queue_conf); } @@ -766,6 +769,7 @@ rte_event_port_setup(uint8_t dev_id, uint8_t port_id, if (!diag) diag = rte_event_port_unlink(dev_id, port_id, NULL, 0); + rte_trace_lib_event_port_setup(dev_id, port_id, port_conf, diag); if (diag < 0) return diag; @@ -936,6 +940,7 @@ rte_event_port_link(uint8_t dev_id, uint8_t port_id, for (i = 0; i < diag; i++) links_map[queues[i]] = (uint8_t)priorities[i]; + rte_trace_lib_event_port_link(dev_id, port_id, nb_links, diag); return diag; } @@ -1001,6 +1006,7 @@ rte_event_port_unlink(uint8_t dev_id, uint8_t port_id, for (i = 0; i < diag; i++) links_map[queues[i]] = EVENT_QUEUE_SERVICE_PRIORITY_INVALID; + rte_trace_lib_event_port_unlink(dev_id, port_id, nb_unlinks, diag); return diag; } @@ -1213,6 +1219,7 @@ rte_event_dev_start(uint8_t dev_id) } diag = (*dev->dev_ops->dev_start)(dev); + rte_trace_lib_eventdev_start(dev_id, diag); if (diag == 0) dev->data->dev_started = 1; else @@ -1257,6 +1264,7 @@ rte_event_dev_stop(uint8_t dev_id) dev->data->dev_started = 0; (*dev->dev_ops->dev_stop)(dev); + rte_trace_lib_eventdev_stop(dev_id); } int @@ -1275,6 +1283,7 @@ rte_event_dev_close(uint8_t dev_id) return -EBUSY; } + rte_trace_lib_eventdev_close(dev_id); return (*dev->dev_ops->dev_close)(dev); } diff --git a/lib/librte_eventdev/rte_eventdev.h b/lib/librte_eventdev/rte_eventdev.h index 226f352ad..71d4fa6f1 100644 --- a/lib/librte_eventdev/rte_eventdev.h +++ b/lib/librte_eventdev/rte_eventdev.h @@ -215,6 +215,8 @@ extern "C" { #include #include +#include "rte_trace_eventdev_fp.h" + struct rte_mbuf; /* we just use mbuf pointers; no need to include rte_mbuf.h */ struct rte_event; @@ -1343,6 +1345,7 @@ __rte_event_enqueue_burst(uint8_t dev_id, uint8_t port_id, return 0; } #endif + rte_trace_lib_event_enq_burst(dev_id, port_id, ev, nb_events, fn); /* * Allow zero cost non burst mode routine invocation if application * requests nb_events as const one @@ -1620,7 +1623,7 @@ rte_event_dequeue_burst(uint8_t dev_id, uint8_t port_id, struct rte_event ev[], return 0; } #endif - + rte_trace_lib_event_deq_burst(dev_id, port_id, ev, nb_events); /* * Allow zero cost non burst mode routine invocation if application * requests nb_events as const one diff --git a/lib/librte_eventdev/rte_eventdev_version.map b/lib/librte_eventdev/rte_eventdev_version.map index edfc15282..25023d9c2 100644 --- a/lib/librte_eventdev/rte_eventdev_version.map +++ b/lib/librte_eventdev/rte_eventdev_version.map @@ -93,3 +93,45 @@ DPDK_20.0 { local: *; }; + +EXPERIMENTAL { + global: + + # added in 20.05 + __rte_trace_lib_eventdev_configure; + __rte_trace_lib_event_queue_setup; + __rte_trace_lib_event_port_setup; + __rte_trace_lib_event_port_link; + __rte_trace_lib_event_port_unlink; + __rte_trace_lib_eventdev_start; + __rte_trace_lib_eventdev_stop; + __rte_trace_lib_eventdev_close; + __rte_trace_lib_event_deq_burst; + __rte_trace_lib_event_enq_burst; + __rte_trace_lib_event_eth_rx_adapter_create; + __rte_trace_lib_event_eth_rx_adapter_free; + __rte_trace_lib_event_eth_rx_adapter_queue_add; + __rte_trace_lib_event_eth_rx_adapter_queue_del; + __rte_trace_lib_event_eth_rx_adapter_start; + __rte_trace_lib_event_eth_rx_adapter_stop; + __rte_trace_lib_event_eth_tx_adapter_create; + __rte_trace_lib_event_eth_tx_adapter_free; + __rte_trace_lib_event_eth_tx_adapter_queue_add; + __rte_trace_lib_event_eth_tx_adapter_queue_del; + __rte_trace_lib_event_eth_tx_adapter_start; + __rte_trace_lib_event_eth_tx_adapter_stop; + __rte_trace_lib_event_eth_tx_adapter_enqueue; + __rte_trace_lib_event_timer_adapter_create; + __rte_trace_lib_event_timer_adapter_start; + __rte_trace_lib_event_timer_adapter_stop; + __rte_trace_lib_event_timer_adapter_free; + __rte_trace_lib_event_timer_arm_burst; + __rte_trace_lib_event_timer_arm_tmo_tick_burst; + __rte_trace_lib_event_timer_cancel_burst; + __rte_trace_lib_event_crypto_adapter_create; + __rte_trace_lib_event_crypto_adapter_free; + __rte_trace_lib_event_crypto_adapter_queue_pair_add; + __rte_trace_lib_event_crypto_adapter_queue_pair_del; + __rte_trace_lib_event_crypto_adapter_start; + __rte_trace_lib_event_crypto_adapter_stop; +}; diff --git a/lib/librte_eventdev/rte_trace_eventdev.h b/lib/librte_eventdev/rte_trace_eventdev.h new file mode 100644 index 000000000..f5b0fb158 --- /dev/null +++ b/lib/librte_eventdev/rte_trace_eventdev.h @@ -0,0 +1,278 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright(C) 2020 Marvell International Ltd. + */ + +#ifndef _RTE_TRACE_EVENTDEV_H_ +#define _RTE_TRACE_EVENTDEV_H_ + +/** + * @file + * + * API for ethdev trace support + */ + +#ifdef __cplusplus +extern "C" { +#endif + +#include "rte_eventdev.h" +#include "rte_event_eth_rx_adapter.h" +#include "rte_event_timer_adapter.h" + +#include + +RTE_TRACE_POINT( + rte_trace_lib_eventdev_configure, + RTE_TRACE_POINT_ARGS(uint8_t dev_id, + const struct rte_event_dev_config *dev_conf, + int rc), + rte_trace_ctf_u8(dev_id); + rte_trace_ctf_u32(dev_conf->dequeue_timeout_ns); + rte_trace_ctf_i32(dev_conf->nb_events_limit); + rte_trace_ctf_u8(dev_conf->nb_event_queues); + rte_trace_ctf_u8(dev_conf->nb_event_ports); + rte_trace_ctf_u32(dev_conf->nb_event_queue_flows); + rte_trace_ctf_u32(dev_conf->nb_event_port_dequeue_depth); + rte_trace_ctf_u32(dev_conf->nb_event_port_enqueue_depth); + rte_trace_ctf_u32(dev_conf->event_dev_cfg); + rte_trace_ctf_int(rc); +) + +RTE_TRACE_POINT( + rte_trace_lib_event_queue_setup, + RTE_TRACE_POINT_ARGS(uint8_t dev_id, uint8_t queue_id, + const struct rte_event_queue_conf *queue_conf), + rte_trace_ctf_u8(dev_id); rte_trace_ctf_u8(queue_id); + rte_trace_ctf_u32(queue_conf->nb_atomic_flows); + rte_trace_ctf_u32(queue_conf->nb_atomic_order_sequences); + rte_trace_ctf_u32(queue_conf->event_queue_cfg); + rte_trace_ctf_u8(queue_conf->schedule_type); + rte_trace_ctf_u8(queue_conf->priority); +) + +RTE_TRACE_POINT( + rte_trace_lib_event_port_setup, + RTE_TRACE_POINT_ARGS(uint8_t dev_id, uint8_t port_id, + const struct rte_event_port_conf *port_conf, + int rc), + rte_trace_ctf_u8(dev_id); rte_trace_ctf_u8(port_id); + rte_trace_ctf_i32(port_conf->new_event_threshold); + rte_trace_ctf_u16(port_conf->dequeue_depth); + rte_trace_ctf_u16(port_conf->enqueue_depth); + rte_trace_ctf_u8(port_conf->disable_implicit_release); + rte_trace_ctf_int(rc); +) + +RTE_TRACE_POINT( + rte_trace_lib_event_port_link, + RTE_TRACE_POINT_ARGS(uint8_t dev_id, uint8_t port_id, + uint16_t nb_links, int rc), + rte_trace_ctf_u8(dev_id); rte_trace_ctf_u8(port_id); + rte_trace_ctf_u16(nb_links); rte_trace_ctf_int(rc); +) + +RTE_TRACE_POINT( + rte_trace_lib_event_port_unlink, + RTE_TRACE_POINT_ARGS(uint8_t dev_id, uint8_t port_id, + uint16_t nb_unlinks, int rc), + rte_trace_ctf_u8(dev_id); rte_trace_ctf_u8(port_id); + rte_trace_ctf_u16(nb_unlinks); rte_trace_ctf_int(rc); +) + +RTE_TRACE_POINT( + rte_trace_lib_eventdev_start, + RTE_TRACE_POINT_ARGS(uint8_t dev_id, int rc), + rte_trace_ctf_u8(dev_id); rte_trace_ctf_int(rc); +) + +RTE_TRACE_POINT( + rte_trace_lib_eventdev_stop, + RTE_TRACE_POINT_ARGS(uint8_t dev_id), + rte_trace_ctf_u8(dev_id); +) + +RTE_TRACE_POINT( + rte_trace_lib_eventdev_close, + RTE_TRACE_POINT_ARGS(uint8_t dev_id), + rte_trace_ctf_u8(dev_id); +) + +RTE_TRACE_POINT( + rte_trace_lib_event_eth_rx_adapter_create, + RTE_TRACE_POINT_ARGS(uint8_t adptr_id, uint8_t dev_id, + void *conf_cb, void *conf_arg), + rte_trace_ctf_u8(adptr_id); rte_trace_ctf_u8(dev_id); + rte_trace_ctf_ptr(conf_cb); rte_trace_ctf_ptr(conf_arg); +) + +RTE_TRACE_POINT( + rte_trace_lib_event_eth_rx_adapter_free, + RTE_TRACE_POINT_ARGS(uint8_t adptr_id), + rte_trace_ctf_u8(adptr_id); +) + +RTE_TRACE_POINT( + rte_trace_lib_event_eth_rx_adapter_queue_add, + RTE_TRACE_POINT_ARGS(uint8_t adptr_id, uint16_t eth_dev_id, + int32_t rx_queue_id, + const struct rte_event_eth_rx_adapter_queue_conf + *queue_conf, int rc), + rte_trace_ctf_u8(adptr_id); rte_trace_ctf_u16(eth_dev_id); + rte_trace_ctf_i32(rx_queue_id); + rte_trace_ctf_u32(queue_conf->rx_queue_flags); + rte_trace_ctf_u16(queue_conf->servicing_weight); + rte_trace_ctf_u8(queue_conf->ev.queue_id); + rte_trace_ctf_u8(queue_conf->ev.priority); + rte_trace_ctf_int(rc); +) + +RTE_TRACE_POINT( + rte_trace_lib_event_eth_rx_adapter_queue_del, + RTE_TRACE_POINT_ARGS(uint8_t adptr_id, uint16_t eth_dev_id, + int32_t rx_queue_id, int rc), + rte_trace_ctf_u8(adptr_id); rte_trace_ctf_u16(eth_dev_id); + rte_trace_ctf_i32(rx_queue_id); rte_trace_ctf_int(rc); +) + +RTE_TRACE_POINT( + rte_trace_lib_event_eth_rx_adapter_start, + RTE_TRACE_POINT_ARGS(uint8_t adptr_id), + rte_trace_ctf_u8(adptr_id); +) + +RTE_TRACE_POINT( + rte_trace_lib_event_eth_rx_adapter_stop, + RTE_TRACE_POINT_ARGS(uint8_t adptr_id), + rte_trace_ctf_u8(adptr_id); +) + +RTE_TRACE_POINT( + rte_trace_lib_event_eth_tx_adapter_create, + RTE_TRACE_POINT_ARGS(uint8_t adptr_id, uint8_t dev_id, void *conf_cb, + struct rte_event_port_conf *port_conf, + int rc), + rte_trace_ctf_u8(adptr_id); rte_trace_ctf_u8(dev_id); + rte_trace_ctf_i32(port_conf->new_event_threshold); + rte_trace_ctf_u16(port_conf->dequeue_depth); + rte_trace_ctf_u16(port_conf->enqueue_depth); + rte_trace_ctf_u8(port_conf->disable_implicit_release); + rte_trace_ctf_ptr(conf_cb); rte_trace_ctf_int(rc); +) + +RTE_TRACE_POINT( + rte_trace_lib_event_eth_tx_adapter_free, + RTE_TRACE_POINT_ARGS(uint8_t adptr_id, int rc), + rte_trace_ctf_u8(adptr_id); rte_trace_ctf_int(rc); +) + +RTE_TRACE_POINT( + rte_trace_lib_event_eth_tx_adapter_queue_add, + RTE_TRACE_POINT_ARGS(uint8_t adptr_id, uint16_t eth_dev_id, + int32_t queue, int rc), + rte_trace_ctf_u8(adptr_id); rte_trace_ctf_u16(eth_dev_id); + rte_trace_ctf_i32(queue); rte_trace_ctf_int(rc); +) + +RTE_TRACE_POINT( + rte_trace_lib_event_eth_tx_adapter_queue_del, + RTE_TRACE_POINT_ARGS(uint8_t adptr_id, uint16_t eth_dev_id, + int32_t queue, int rc), + rte_trace_ctf_u8(adptr_id); rte_trace_ctf_u16(eth_dev_id); + rte_trace_ctf_i32(queue); rte_trace_ctf_int(rc); +) + +RTE_TRACE_POINT( + rte_trace_lib_event_eth_tx_adapter_start, + RTE_TRACE_POINT_ARGS(uint8_t adptr_id, int rc), + rte_trace_ctf_u8(adptr_id); rte_trace_ctf_int(rc); +) + +RTE_TRACE_POINT( + rte_trace_lib_event_eth_tx_adapter_stop, + RTE_TRACE_POINT_ARGS(uint8_t adptr_id, int rc), + rte_trace_ctf_u8(adptr_id); rte_trace_ctf_int(rc); +) + +RTE_TRACE_POINT( + rte_trace_lib_event_timer_adapter_create, + RTE_TRACE_POINT_ARGS(uint16_t adapter_id, void *adapter, + const struct rte_event_timer_adapter_conf *conf, + void *conf_cb), + rte_trace_ctf_u16(adapter_id); rte_trace_ctf_ptr(adapter); + rte_trace_ctf_ptr(conf); rte_trace_ctf_u8(conf->event_dev_id); + rte_trace_ctf_u16(conf->timer_adapter_id); + rte_trace_ctf_u64(conf->timer_tick_ns); + rte_trace_ctf_u64(conf->max_tmo_ns); rte_trace_ctf_u64(conf->nb_timers); + rte_trace_ctf_u64(conf->flags); rte_trace_ctf_ptr(conf_cb); +) + +RTE_TRACE_POINT( + rte_trace_lib_event_timer_adapter_start, + RTE_TRACE_POINT_ARGS(const void *adapter), + rte_trace_ctf_ptr(adapter); +) + +RTE_TRACE_POINT( + rte_trace_lib_event_timer_adapter_stop, + RTE_TRACE_POINT_ARGS(const void *adapter), + rte_trace_ctf_ptr(adapter); +) + +RTE_TRACE_POINT( + rte_trace_lib_event_timer_adapter_free, + RTE_TRACE_POINT_ARGS(void *adapter), + rte_trace_ctf_ptr(adapter); +) + +RTE_TRACE_POINT( + rte_trace_lib_event_crypto_adapter_create, + RTE_TRACE_POINT_ARGS(uint8_t adptr_id, uint8_t dev_id, void *adapter, + struct rte_event_port_conf *port_conf, + uint8_t mode), + rte_trace_ctf_u8(adptr_id); rte_trace_ctf_u8(dev_id); + rte_trace_ctf_ptr(adapter); rte_trace_ctf_u8(mode); + rte_trace_ctf_i32(port_conf->new_event_threshold); + rte_trace_ctf_u16(port_conf->dequeue_depth); + rte_trace_ctf_u16(port_conf->enqueue_depth); + rte_trace_ctf_u8(port_conf->disable_implicit_release); +) + +RTE_TRACE_POINT( + rte_trace_lib_event_crypto_adapter_free, + RTE_TRACE_POINT_ARGS(uint8_t adptr_id, void *adapter), + rte_trace_ctf_u8(adptr_id); rte_trace_ctf_ptr(adapter); +) + +RTE_TRACE_POINT( + rte_trace_lib_event_crypto_adapter_queue_pair_add, + RTE_TRACE_POINT_ARGS(uint8_t adptr_id, uint8_t cdev_id, + const void *event, int32_t queue_pair_id), + rte_trace_ctf_u8(adptr_id); rte_trace_ctf_u8(cdev_id); + rte_trace_ctf_i32(queue_pair_id); rte_trace_ctf_ptr(event); +) + +RTE_TRACE_POINT( + rte_trace_lib_event_crypto_adapter_queue_pair_del, + RTE_TRACE_POINT_ARGS(uint8_t adptr_id, uint8_t cdev_id, + int32_t queue_pair_id, int rc), + rte_trace_ctf_u8(adptr_id); rte_trace_ctf_u8(cdev_id); + rte_trace_ctf_i32(queue_pair_id); rte_trace_ctf_int(rc); +) + +RTE_TRACE_POINT( + rte_trace_lib_event_crypto_adapter_start, + RTE_TRACE_POINT_ARGS(uint8_t adptr_id, void *adapter), + rte_trace_ctf_u8(adptr_id); rte_trace_ctf_ptr(adapter); +) + +RTE_TRACE_POINT( + rte_trace_lib_event_crypto_adapter_stop, + RTE_TRACE_POINT_ARGS(uint8_t adptr_id), + rte_trace_ctf_u8(adptr_id); +) + +#ifdef __cplusplus +} +#endif + +#endif /* _RTE_TRACE_EVENTDEV_H_ */ diff --git a/lib/librte_eventdev/rte_trace_eventdev_fp.h b/lib/librte_eventdev/rte_trace_eventdev_fp.h new file mode 100644 index 000000000..71da9f6ba --- /dev/null +++ b/lib/librte_eventdev/rte_trace_eventdev_fp.h @@ -0,0 +1,75 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright(C) 2020 Marvell International Ltd. + */ + +#ifndef _RTE_TRACE_EVENTDEV_FP_H_ +#define _RTE_TRACE_EVENTDEV_FP_H_ + +/** + * @file + * + * API for ethdev trace support + */ + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +RTE_TRACE_POINT_DP( + rte_trace_lib_event_deq_burst, + RTE_TRACE_POINT_ARGS(uint8_t dev_id, uint8_t port_id, void *ev_table, + uint16_t nb_events), + rte_trace_ctf_u8(dev_id); rte_trace_ctf_u8(port_id); + rte_trace_ctf_ptr(ev_table); rte_trace_ctf_u16(nb_events); +) + +RTE_TRACE_POINT_DP( + rte_trace_lib_event_enq_burst, + RTE_TRACE_POINT_ARGS(uint8_t dev_id, uint8_t port_id, + const void *ev_table, uint16_t nb_events, + void *enq_mode_cb), + rte_trace_ctf_u8(dev_id); rte_trace_ctf_u8(port_id); + rte_trace_ctf_ptr(ev_table); rte_trace_ctf_u16(nb_events); + rte_trace_ctf_ptr(enq_mode_cb); +) + +RTE_TRACE_POINT_DP( + rte_trace_lib_event_eth_tx_adapter_enqueue, + RTE_TRACE_POINT_ARGS(uint8_t dev_id, uint8_t port_id, void *ev_table, + uint16_t nb_events, const uint8_t flags), + rte_trace_ctf_u8(dev_id); rte_trace_ctf_u8(port_id); + rte_trace_ctf_ptr(ev_table); rte_trace_ctf_u16(nb_events); + rte_trace_ctf_u8(flags); +) + +RTE_TRACE_POINT_DP( + rte_trace_lib_event_timer_arm_burst, + RTE_TRACE_POINT_ARGS(const void *adapter, void **evtims_table, + uint16_t nb_evtims), + rte_trace_ctf_ptr(adapter); rte_trace_ctf_ptr(evtims_table); + rte_trace_ctf_u16(nb_evtims); +) + +RTE_TRACE_POINT_DP( + rte_trace_lib_event_timer_arm_tmo_tick_burst, + RTE_TRACE_POINT_ARGS(const void *adapter, const uint64_t timeout_ticks, + void **evtims_table, const uint16_t nb_evtims), + rte_trace_ctf_ptr(adapter); rte_trace_ctf_u64(timeout_ticks); + rte_trace_ctf_ptr(evtims_table); rte_trace_ctf_u16(nb_evtims); +) + +RTE_TRACE_POINT_DP( + rte_trace_lib_event_timer_cancel_burst, + RTE_TRACE_POINT_ARGS(const void *adapter, void **evtims_table, + uint16_t nb_evtims), + rte_trace_ctf_ptr(adapter); rte_trace_ctf_ptr(evtims_table); + rte_trace_ctf_u16(nb_evtims); +) + +#ifdef __cplusplus +} +#endif + +#endif /* _RTE_TRACE_EVENTDEV_FP_H_ */ -- 2.25.1