1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2019-2020 Intel Corporation
8 * @brief DLB PMD-specific functions
12 #ifndef _RTE_PMD_DLB_H_
13 #define _RTE_PMD_DLB_H_
23 * @b EXPERIMENTAL: this API may change, or be removed, without prior notice
25 * Selects the token pop mode for an DLB port.
27 enum dlb_token_pop_mode {
28 /* Pop the CQ tokens immediately after dequeueing. */
30 /* Pop CQ tokens after (dequeue_depth - 1) events are released.
31 * Supported on load-balanced ports only.
34 /* Pop the CQ tokens during next dequeue operation. */
37 /* NUM_TOKEN_POP_MODES must be last */
43 * @b EXPERIMENTAL: this API may change, or be removed, without prior notice
45 * Configure the token pop mode for an DLB port. By default, all ports use
46 * AUTO_POP. This function must be called before calling rte_event_port_setup()
47 * for the port, but after calling rte_event_dev_configure().
50 * The defer_sched vdev arg, which configures all load-balanced ports with
51 * dequeue_depth == 1 for DEFERRED_POP mode, takes precedence over this
55 * The identifier of the event device.
57 * The identifier of the event port.
63 * - EINVAL: Invalid dev_id, port_id, or mode
64 * - EINVAL: The DLB is not configured, is already running, or the port is
70 rte_pmd_dlb_set_token_pop_mode(uint8_t dev_id,
72 enum dlb_token_pop_mode mode);
77 #endif /* _RTE_PMD_DLB_H_ */