ethdev: add tracepoints

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>
This commit is contained in:
Sunil Kumar Kori 2020-04-23 00:33:45 +05:30 committed by David Marchand
parent 16a277a24c
commit 78d44153de
80 changed files with 284 additions and 0 deletions

View 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

View 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'
)

View 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

View 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'

View 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

View 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',

View 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

View 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',
)

View 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

View 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'
)

View 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

View 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']

View 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

View 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'

View 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

View 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'

View 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

View 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'

View 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

View 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'

View 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

View 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',

View 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

View 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'

View 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

View 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

View 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(

View 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

View 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'

View 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

View 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',

View 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

View 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'
)

View 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

View File

@ -8,6 +8,7 @@
includes += include_directories('../shared')
allow_experimental_apis = true
sources = files(
'client.c'
)

View File

@ -8,6 +8,7 @@
includes += include_directories('../shared')
allow_experimental_apis = true
sources = files(
'args.c', 'init.c', 'main.c'
)

View 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

View 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'
)

View 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

View 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'
)

View 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

View 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'
)

View 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)

View 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

View 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

View 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'

View 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

View 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')

View 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

View 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')

View 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

View 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'
)

View 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

View 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'

View File

@ -58,6 +58,7 @@ else
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
CFLAGS += -DALLOW_EXPERIMENTAL_API
include $(RTE_SDK)/mk/rte.extapp.mk

View 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',

View 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

View File

@ -8,6 +8,7 @@
name = 'efd_node'
allow_experimental_apis = true
deps += ['hash']
sources += files('node.c')
includes += include_directories('../shared')

View 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

View 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')

View 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

View 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'
)

View 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

View 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'
)

View 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

View 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'

View File

@ -28,6 +28,7 @@ endif
CFLAGS += -O3 -I$(RTE_SDK)/lib/librte_power/
CFLAGS += $(WERROR_FLAGS)
CFLAGS += -DALLOW_EXPERIMENTAL_API
LDLIBS += -lvirt

View 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'
)

View 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

View 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'
)

View 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

View 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'
)

View 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

View File

@ -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);
}

View 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',

View 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 @@ 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_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));
}

View 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);
}

View File

@ -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_ */

View File

@ -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_ */

View 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;
};