DPDK  24.11.0-rc3
rte_pmd_dlb2.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2020 Intel Corporation
3  */
4 
11 #ifndef _RTE_PMD_DLB2_H_
12 #define _RTE_PMD_DLB2_H_
13 
14 #include <stdint.h>
15 
16 #include <rte_compat.h>
17 
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21 
26 #define RTE_PMD_DLB2_GET_QID_DEPTH(x) ((x)->rsvd & 0x3)
27 
32 #define RTE_PMD_DLB2_SET_QID_DEPTH(x, v) ((x)->rsvd = ((x)->rsvd & ~0x3) | (v & 0x3))
33 
38 #define RTE_PMD_DLB2_GET_QE_WEIGHT(x) (((x)->rsvd >> 2) & 0x3)
39 
44 #define RTE_PMD_DLB2_SET_QE_WEIGHT(x, v) ((x)->rsvd = ((x)->rsvd & 0x3) | ((v & 0x3) << 2))
45 
53  /* Pop the CQ tokens immediately after dequeuing. */
54  AUTO_POP,
55  /* Pop CQ tokens after (dequeue_depth - 1) events are released.
56  * Supported on load-balanced ports only.
57  */
58  DELAYED_POP,
59  /* Pop the CQ tokens during next dequeue operation. */
60  DEFERRED_POP,
61 
62  /* NUM_TOKEN_POP_MODES must be last */
63  NUM_TOKEN_POP_MODES
64 };
65 
88 __rte_experimental
89 int
90 rte_pmd_dlb2_set_token_pop_mode(uint8_t dev_id,
91  uint8_t port_id,
92  enum dlb2_token_pop_mode mode);
93 
94 #ifdef __cplusplus
95 }
96 #endif
97 
98 #endif /* _RTE_PMD_DLB2_H_ */
dlb2_token_pop_mode
Definition: rte_pmd_dlb2.h:52
__rte_experimental int rte_pmd_dlb2_set_token_pop_mode(uint8_t dev_id, uint8_t port_id, enum dlb2_token_pop_mode mode)