From: Harry van Haaren Date: Thu, 14 Oct 2021 14:51:38 +0000 (+0000) Subject: eventdev: add usage hints to port configure API X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=976329581d784f843710cb9cd7720fdd25f1ad47;p=dpdk.git eventdev: add usage hints to port configure API This commit introduces 3 flags to the port configuration flags. These flags allow the application to indicate what type of work is expected to be performed by an eventdev port. The three new flags are - RTE_EVENT_PORT_CFG_HINT_PRODUCER (mostly RTE_EVENT_OP_NEW events) - RTE_EVENT_PORT_CFG_HINT_CONSUMER (mostly RTE_EVENT_OP_RELEASE events) - RTE_EVENT_PORT_CFG_HINT_WORKER (mostly RTE_EVENT_OP_FORWARD events) These flags are only hints, and the PMDs must operate under the assumption that any port can enqueue an event with any type of op. Signed-off-by: Harry van Haaren Acked-by: Jerin Jacob --- diff --git a/lib/eventdev/rte_eventdev.h b/lib/eventdev/rte_eventdev.h index 14d4d9ec81..0abed56bef 100644 --- a/lib/eventdev/rte_eventdev.h +++ b/lib/eventdev/rte_eventdev.h @@ -709,6 +709,38 @@ rte_event_queue_attr_get(uint8_t dev_id, uint8_t queue_id, uint32_t attr_id, * * @see rte_event_port_setup(), rte_event_port_link() */ +#define RTE_EVENT_PORT_CFG_HINT_PRODUCER (1ULL << 2) +/**< Hint that this event port will primarily enqueue events to the system. + * A PMD can optimize its internal workings by assuming that this port is + * primarily going to enqueue NEW events. + * + * Note that this flag is only a hint, so PMDs must operate under the + * assumption that any port can enqueue an event with any type of op. + * + * @see rte_event_port_setup() + */ +#define RTE_EVENT_PORT_CFG_HINT_CONSUMER (1ULL << 3) +/**< Hint that this event port will primarily dequeue events from the system. + * A PMD can optimize its internal workings by assuming that this port is + * primarily going to consume events, and not enqueue FORWARD or RELEASE + * events. + * + * Note that this flag is only a hint, so PMDs must operate under the + * assumption that any port can enqueue an event with any type of op. + * + * @see rte_event_port_setup() + */ +#define RTE_EVENT_PORT_CFG_HINT_WORKER (1ULL << 4) +/**< Hint that this event port will primarily pass existing events through. + * A PMD can optimize its internal workings by assuming that this port is + * primarily going to FORWARD events, and not enqueue NEW or RELEASE events + * often. + * + * Note that this flag is only a hint, so PMDs must operate under the + * assumption that any port can enqueue an event with any type of op. + * + * @see rte_event_port_setup() + */ /** Event port configuration structure */ struct rte_event_port_conf {