75d113136f
This commit implements the eventdev ABI changes required by the DLB/DLB2 PMDs. Several data structures and constants are modified or added in this patch, thereby requiring modifications to the dependent apps and examples. The DLB/DLB2 hardware does not conform exactly to the eventdev interface. 1) It has a limit on the number of queues that may be linked to a port. 2) Some ports a further restricted to a maximum of 1 linked queue. 3) DLB does not have the ability to carry the flow_id as part of the event (QE) payload. Note that the DLB2 hardware is capable of carrying the flow_id. Following is a detailed description of the changes that have been made. 1) Add new fields to the rte_event_dev_info struct. These fields allow the device to advertise its capabilities so that applications can take the appropriate actions based on those capabilities. struct rte_event_dev_info { uint32_t max_event_port_links; /**< Maximum number of queues that can be linked to a single event * port by this device. */ uint8_t max_single_link_event_port_queue_pairs; /**< Maximum number of event ports and queues that are optimized for * (and only capable of) single-link configurations supported by this * device. These ports and queues are not accounted for in * max_event_ports or max_event_queues. */ } 2) Add a new field to the rte_event_dev_config struct. This field allows the application to specify how many of its ports are limited to a single link, or will be used in single link mode. /** Event device configuration structure */ struct rte_event_dev_config { uint8_t nb_single_link_event_port_queues; /**< Number of event ports and queues that will be singly-linked to * each other. These are a subset of the overall event ports and * queues; this value cannot exceed *nb_event_ports* or * *nb_event_queues*. If the device has ports and queues that are * optimized for single-link usage, this field is a hint for how many * to allocate; otherwise, regular event ports and queues can be used. */ } 3) Replace the dedicated implicit_release_disabled field with a bit field of explicit port capabilities. The implicit_release_disable functionality is assigned to one bit, and a port-is-single-link-only attribute is assigned to other, with the remaining bits available for future assignment. * Event port configuration bitmap flags */ #define RTE_EVENT_PORT_CFG_DISABLE_IMPL_REL (1ULL << 0) /**< Configure the port not to release outstanding events in * rte_event_dev_dequeue_burst(). If set, all events received through * the port must be explicitly released with RTE_EVENT_OP_RELEASE or * RTE_EVENT_OP_FORWARD. Must be unset if the device is not * RTE_EVENT_DEV_CAP_IMPLICIT_RELEASE_DISABLE capable. */ #define RTE_EVENT_PORT_CFG_SINGLE_LINK (1ULL << 1) /**< This event port links only to a single event queue. * * @see rte_event_port_setup(), rte_event_port_link() */ #define RTE_EVENT_PORT_ATTR_IMPLICIT_RELEASE_DISABLE 3 /** * The implicit release disable attribute of the port */ struct rte_event_port_conf { uint32_t event_port_cfg; /**< Port cfg flags(EVENT_PORT_CFG_) */ } This patch also removes the depreciation notice and announce the new eventdev ABI changes in release note. Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com> Acked-by: Harry van Haaren <harry.van.haaren@intel.com> Acked-by: Pavan Nikhilesh <pbhagavatula@marvell.com> Acked-by: Jerin Jacob <jerinj@marvell.com>
309 lines
8.9 KiB
C
309 lines
8.9 KiB
C
/* SPDX-License-Identifier: BSD-3-Clause
|
|
* Copyright(C) 2020 Marvell International Ltd.
|
|
*/
|
|
|
|
#ifndef _RTE_EVENTDEV_TRACE_H_
|
|
#define _RTE_EVENTDEV_TRACE_H_
|
|
|
|
/**
|
|
* @file
|
|
*
|
|
* API for ethdev trace support
|
|
*/
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#include <rte_trace_point.h>
|
|
|
|
#include "rte_eventdev.h"
|
|
#include "rte_event_eth_rx_adapter.h"
|
|
#include "rte_event_timer_adapter.h"
|
|
|
|
RTE_TRACE_POINT(
|
|
rte_eventdev_trace_configure,
|
|
RTE_TRACE_POINT_ARGS(uint8_t dev_id,
|
|
const struct rte_event_dev_config *dev_conf, int rc),
|
|
rte_trace_point_emit_u8(dev_id);
|
|
rte_trace_point_emit_u32(dev_conf->dequeue_timeout_ns);
|
|
rte_trace_point_emit_i32(dev_conf->nb_events_limit);
|
|
rte_trace_point_emit_u8(dev_conf->nb_event_queues);
|
|
rte_trace_point_emit_u8(dev_conf->nb_event_ports);
|
|
rte_trace_point_emit_u32(dev_conf->nb_event_queue_flows);
|
|
rte_trace_point_emit_u32(dev_conf->nb_event_port_dequeue_depth);
|
|
rte_trace_point_emit_u32(dev_conf->nb_event_port_enqueue_depth);
|
|
rte_trace_point_emit_u32(dev_conf->event_dev_cfg);
|
|
rte_trace_point_emit_u8(dev_conf->nb_single_link_event_port_queues);
|
|
rte_trace_point_emit_int(rc);
|
|
)
|
|
|
|
RTE_TRACE_POINT(
|
|
rte_eventdev_trace_queue_setup,
|
|
RTE_TRACE_POINT_ARGS(uint8_t dev_id, uint8_t queue_id,
|
|
const struct rte_event_queue_conf *queue_conf),
|
|
rte_trace_point_emit_u8(dev_id);
|
|
rte_trace_point_emit_u8(queue_id);
|
|
rte_trace_point_emit_u32(queue_conf->nb_atomic_flows);
|
|
rte_trace_point_emit_u32(queue_conf->nb_atomic_order_sequences);
|
|
rte_trace_point_emit_u32(queue_conf->event_queue_cfg);
|
|
rte_trace_point_emit_u8(queue_conf->schedule_type);
|
|
rte_trace_point_emit_u8(queue_conf->priority);
|
|
)
|
|
|
|
RTE_TRACE_POINT(
|
|
rte_eventdev_trace_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_point_emit_u8(dev_id);
|
|
rte_trace_point_emit_u8(port_id);
|
|
rte_trace_point_emit_i32(port_conf->new_event_threshold);
|
|
rte_trace_point_emit_u16(port_conf->dequeue_depth);
|
|
rte_trace_point_emit_u16(port_conf->enqueue_depth);
|
|
rte_trace_point_emit_u32(port_conf->event_port_cfg);
|
|
rte_trace_point_emit_int(rc);
|
|
)
|
|
|
|
RTE_TRACE_POINT(
|
|
rte_eventdev_trace_port_link,
|
|
RTE_TRACE_POINT_ARGS(uint8_t dev_id, uint8_t port_id,
|
|
uint16_t nb_links, int rc),
|
|
rte_trace_point_emit_u8(dev_id);
|
|
rte_trace_point_emit_u8(port_id);
|
|
rte_trace_point_emit_u16(nb_links);
|
|
rte_trace_point_emit_int(rc);
|
|
)
|
|
|
|
RTE_TRACE_POINT(
|
|
rte_eventdev_trace_port_unlink,
|
|
RTE_TRACE_POINT_ARGS(uint8_t dev_id, uint8_t port_id,
|
|
uint16_t nb_unlinks, int rc),
|
|
rte_trace_point_emit_u8(dev_id);
|
|
rte_trace_point_emit_u8(port_id);
|
|
rte_trace_point_emit_u16(nb_unlinks);
|
|
rte_trace_point_emit_int(rc);
|
|
)
|
|
|
|
RTE_TRACE_POINT(
|
|
rte_eventdev_trace_start,
|
|
RTE_TRACE_POINT_ARGS(uint8_t dev_id, int rc),
|
|
rte_trace_point_emit_u8(dev_id);
|
|
rte_trace_point_emit_int(rc);
|
|
)
|
|
|
|
RTE_TRACE_POINT(
|
|
rte_eventdev_trace_stop,
|
|
RTE_TRACE_POINT_ARGS(uint8_t dev_id),
|
|
rte_trace_point_emit_u8(dev_id);
|
|
)
|
|
|
|
RTE_TRACE_POINT(
|
|
rte_eventdev_trace_close,
|
|
RTE_TRACE_POINT_ARGS(uint8_t dev_id),
|
|
rte_trace_point_emit_u8(dev_id);
|
|
)
|
|
|
|
RTE_TRACE_POINT(
|
|
rte_eventdev_trace_eth_rx_adapter_create,
|
|
RTE_TRACE_POINT_ARGS(uint8_t adptr_id, uint8_t dev_id, void *conf_cb,
|
|
void *conf_arg),
|
|
rte_trace_point_emit_u8(adptr_id);
|
|
rte_trace_point_emit_u8(dev_id);
|
|
rte_trace_point_emit_ptr(conf_cb);
|
|
rte_trace_point_emit_ptr(conf_arg);
|
|
)
|
|
|
|
RTE_TRACE_POINT(
|
|
rte_eventdev_trace_eth_rx_adapter_free,
|
|
RTE_TRACE_POINT_ARGS(uint8_t adptr_id),
|
|
rte_trace_point_emit_u8(adptr_id);
|
|
)
|
|
|
|
RTE_TRACE_POINT(
|
|
rte_eventdev_trace_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_point_emit_u8(adptr_id);
|
|
rte_trace_point_emit_u16(eth_dev_id);
|
|
rte_trace_point_emit_i32(rx_queue_id);
|
|
rte_trace_point_emit_u32(queue_conf->rx_queue_flags);
|
|
rte_trace_point_emit_u16(queue_conf->servicing_weight);
|
|
rte_trace_point_emit_u8(queue_conf->ev.queue_id);
|
|
rte_trace_point_emit_u8(queue_conf->ev.priority);
|
|
rte_trace_point_emit_int(rc);
|
|
)
|
|
|
|
RTE_TRACE_POINT(
|
|
rte_eventdev_trace_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_point_emit_u8(adptr_id);
|
|
rte_trace_point_emit_u16(eth_dev_id);
|
|
rte_trace_point_emit_i32(rx_queue_id);
|
|
rte_trace_point_emit_int(rc);
|
|
)
|
|
|
|
RTE_TRACE_POINT(
|
|
rte_eventdev_trace_eth_rx_adapter_start,
|
|
RTE_TRACE_POINT_ARGS(uint8_t adptr_id),
|
|
rte_trace_point_emit_u8(adptr_id);
|
|
)
|
|
|
|
RTE_TRACE_POINT(
|
|
rte_eventdev_trace_eth_rx_adapter_stop,
|
|
RTE_TRACE_POINT_ARGS(uint8_t adptr_id),
|
|
rte_trace_point_emit_u8(adptr_id);
|
|
)
|
|
|
|
RTE_TRACE_POINT(
|
|
rte_eventdev_trace_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_point_emit_u8(adptr_id);
|
|
rte_trace_point_emit_u8(dev_id);
|
|
rte_trace_point_emit_i32(port_conf->new_event_threshold);
|
|
rte_trace_point_emit_u16(port_conf->dequeue_depth);
|
|
rte_trace_point_emit_u16(port_conf->enqueue_depth);
|
|
rte_trace_point_emit_u32(port_conf->event_port_cfg);
|
|
rte_trace_point_emit_ptr(conf_cb);
|
|
rte_trace_point_emit_int(rc);
|
|
)
|
|
|
|
RTE_TRACE_POINT(
|
|
rte_eventdev_trace_eth_tx_adapter_free,
|
|
RTE_TRACE_POINT_ARGS(uint8_t adptr_id, int rc),
|
|
rte_trace_point_emit_u8(adptr_id);
|
|
rte_trace_point_emit_int(rc);
|
|
)
|
|
|
|
RTE_TRACE_POINT(
|
|
rte_eventdev_trace_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_point_emit_u8(adptr_id);
|
|
rte_trace_point_emit_u16(eth_dev_id);
|
|
rte_trace_point_emit_i32(queue);
|
|
rte_trace_point_emit_int(rc);
|
|
)
|
|
|
|
RTE_TRACE_POINT(
|
|
rte_eventdev_trace_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_point_emit_u8(adptr_id);
|
|
rte_trace_point_emit_u16(eth_dev_id);
|
|
rte_trace_point_emit_i32(queue);
|
|
rte_trace_point_emit_int(rc);
|
|
)
|
|
|
|
RTE_TRACE_POINT(
|
|
rte_eventdev_trace_eth_tx_adapter_start,
|
|
RTE_TRACE_POINT_ARGS(uint8_t adptr_id, int rc),
|
|
rte_trace_point_emit_u8(adptr_id);
|
|
rte_trace_point_emit_int(rc);
|
|
)
|
|
|
|
RTE_TRACE_POINT(
|
|
rte_eventdev_trace_eth_tx_adapter_stop,
|
|
RTE_TRACE_POINT_ARGS(uint8_t adptr_id, int rc),
|
|
rte_trace_point_emit_u8(adptr_id);
|
|
rte_trace_point_emit_int(rc);
|
|
)
|
|
|
|
RTE_TRACE_POINT(
|
|
rte_eventdev_trace_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_point_emit_u16(adapter_id);
|
|
rte_trace_point_emit_ptr(adapter);
|
|
rte_trace_point_emit_ptr(conf);
|
|
rte_trace_point_emit_u8(conf->event_dev_id);
|
|
rte_trace_point_emit_u16(conf->timer_adapter_id);
|
|
rte_trace_point_emit_u64(conf->timer_tick_ns);
|
|
rte_trace_point_emit_u64(conf->max_tmo_ns);
|
|
rte_trace_point_emit_u64(conf->nb_timers);
|
|
rte_trace_point_emit_u64(conf->flags);
|
|
rte_trace_point_emit_ptr(conf_cb);
|
|
)
|
|
|
|
RTE_TRACE_POINT(
|
|
rte_eventdev_trace_timer_adapter_start,
|
|
RTE_TRACE_POINT_ARGS(const void *adapter),
|
|
rte_trace_point_emit_ptr(adapter);
|
|
)
|
|
|
|
RTE_TRACE_POINT(
|
|
rte_eventdev_trace_timer_adapter_stop,
|
|
RTE_TRACE_POINT_ARGS(const void *adapter),
|
|
rte_trace_point_emit_ptr(adapter);
|
|
)
|
|
|
|
RTE_TRACE_POINT(
|
|
rte_eventdev_trace_timer_adapter_free,
|
|
RTE_TRACE_POINT_ARGS(void *adapter),
|
|
rte_trace_point_emit_ptr(adapter);
|
|
)
|
|
|
|
RTE_TRACE_POINT(
|
|
rte_eventdev_trace_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_point_emit_u8(adptr_id);
|
|
rte_trace_point_emit_u8(dev_id);
|
|
rte_trace_point_emit_ptr(adapter);
|
|
rte_trace_point_emit_u8(mode);
|
|
rte_trace_point_emit_i32(port_conf->new_event_threshold);
|
|
rte_trace_point_emit_u16(port_conf->dequeue_depth);
|
|
rte_trace_point_emit_u16(port_conf->enqueue_depth);
|
|
rte_trace_point_emit_u32(port_conf->event_port_cfg);
|
|
)
|
|
|
|
RTE_TRACE_POINT(
|
|
rte_eventdev_trace_crypto_adapter_free,
|
|
RTE_TRACE_POINT_ARGS(uint8_t adptr_id, void *adapter),
|
|
rte_trace_point_emit_u8(adptr_id);
|
|
rte_trace_point_emit_ptr(adapter);
|
|
)
|
|
|
|
RTE_TRACE_POINT(
|
|
rte_eventdev_trace_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_point_emit_u8(adptr_id);
|
|
rte_trace_point_emit_u8(cdev_id);
|
|
rte_trace_point_emit_i32(queue_pair_id);
|
|
rte_trace_point_emit_ptr(event);
|
|
)
|
|
|
|
RTE_TRACE_POINT(
|
|
rte_eventdev_trace_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_point_emit_u8(adptr_id);
|
|
rte_trace_point_emit_u8(cdev_id);
|
|
rte_trace_point_emit_i32(queue_pair_id);
|
|
rte_trace_point_emit_int(rc);
|
|
)
|
|
|
|
RTE_TRACE_POINT(
|
|
rte_eventdev_trace_crypto_adapter_start,
|
|
RTE_TRACE_POINT_ARGS(uint8_t adptr_id, void *adapter),
|
|
rte_trace_point_emit_u8(adptr_id);
|
|
rte_trace_point_emit_ptr(adapter);
|
|
)
|
|
|
|
RTE_TRACE_POINT(
|
|
rte_eventdev_trace_crypto_adapter_stop,
|
|
RTE_TRACE_POINT_ARGS(uint8_t adptr_id),
|
|
rte_trace_point_emit_u8(adptr_id);
|
|
)
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* _RTE_EVENTDEV_TRACE_H_ */
|