DPDK  24.07.0
rte_pmd_mlx5.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright 2020 Mellanox Technologies, Ltd
3  */
4 
5 #ifndef RTE_PMD_PRIVATE_MLX5_H_
6 #define RTE_PMD_PRIVATE_MLX5_H_
7 
8 #include <rte_compat.h>
9 
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21 
22 #define RTE_PMD_MLX5_FINE_GRANULARITY_INLINE "mlx5_fine_granularity_inline"
23 
38 __rte_experimental
39 int rte_pmd_mlx5_get_dyn_flag_names(char *names[], unsigned int n);
40 
41 #define RTE_PMD_MLX5_DOMAIN_BIT_NIC_RX (1 << 0)
42 #define RTE_PMD_MLX5_DOMAIN_BIT_NIC_TX (1 << 1)
43 #define RTE_PMD_MLX5_DOMAIN_BIT_FDB (1 << 2)
63 __rte_experimental
64 int rte_pmd_mlx5_sync_flow(uint16_t port_id, uint32_t domains);
65 
69 #define RTE_PMD_MLX5_EXTERNAL_RX_QUEUE_ID_MIN (UINT16_MAX - 1000 + 1)
70 
74 #define MLX5_EXTERNAL_TX_QUEUE_ID_MIN (UINT16_MAX - 1000 + 1)
75 
79 #define RTE_PMD_MLX5_LINEAR_HASH_TAG_INDEX 255
80 
100 __rte_experimental
101 int rte_pmd_mlx5_external_rx_queue_id_map(uint16_t port_id, uint16_t dpdk_idx,
102  uint32_t hw_idx);
103 
120 __rte_experimental
121 int rte_pmd_mlx5_external_rx_queue_id_unmap(uint16_t port_id,
122  uint16_t dpdk_idx);
123 
143 __rte_experimental
144 int rte_pmd_mlx5_external_tx_queue_id_map(uint16_t port_id, uint16_t dpdk_idx,
145  uint32_t hw_idx);
146 
163 __rte_experimental
164 int rte_pmd_mlx5_external_tx_queue_id_unmap(uint16_t port_id,
165  uint16_t dpdk_idx);
166 
174 #define RTE_PMD_MLX5_HOST_SHAPER_FLAG_AVAIL_THRESH_TRIGGERED 0
175 
194 __rte_experimental
195 int rte_pmd_mlx5_host_shaper_config(int port_id, uint8_t rate, uint32_t flags);
196 
211 __rte_experimental
212 int rte_pmd_mlx5_external_sq_enable(uint16_t port_id, uint32_t sq_num);
213 
214 /* MLX5 flow engine mode definition for live migration. */
215 enum rte_pmd_mlx5_flow_engine_mode {
216  RTE_PMD_MLX5_FLOW_ENGINE_MODE_ACTIVE, /* active means high priority, effective in HW. */
217  RTE_PMD_MLX5_FLOW_ENGINE_MODE_STANDBY, /* standby mode with lower priority flow rules. */
218 };
219 
224 #define RTE_PMD_MLX5_FLOW_ENGINE_FLAG_STANDBY_DUP_INGRESS RTE_BIT32(0)
225 
277 __rte_experimental
278 int rte_pmd_mlx5_flow_engine_set_mode(enum rte_pmd_mlx5_flow_engine_mode mode, uint32_t flags);
279 
293  uint8_t option_type;
298  uint8_t option_len;
311  uint8_t offset;
317  uint8_t sample_len;
323 };
324 
357 __rte_experimental
358 void *
360  const struct rte_pmd_mlx5_geneve_tlv tlv_list[],
361  uint8_t nb_options);
362 
378 __rte_experimental
379 int
381 
396 __rte_experimental
397 int
398 rte_pmd_mlx5_rxq_dump_contexts(uint16_t port_id, uint16_t queue_id, const char *filename);
399 
414 __rte_experimental
415 int
416 rte_pmd_mlx5_txq_dump_contexts(uint16_t port_id, uint16_t queue_id, const char *filename);
417 
418 #ifdef __cplusplus
419 }
420 #endif
421 
422 #endif /* RTE_PMD_PRIVATE_MLX5_H_ */
uint32_t rte_be32_t
__rte_experimental int rte_pmd_mlx5_host_shaper_config(int port_id, uint8_t rate, uint32_t flags)
__rte_experimental int rte_pmd_mlx5_external_rx_queue_id_unmap(uint16_t port_id, uint16_t dpdk_idx)
rte_be32_t * match_data_mask
Definition: rte_pmd_mlx5.h:322
__rte_experimental int rte_pmd_mlx5_external_sq_enable(uint16_t port_id, uint32_t sq_num)
__rte_experimental void * rte_pmd_mlx5_create_geneve_tlv_parser(uint16_t port_id, const struct rte_pmd_mlx5_geneve_tlv tlv_list[], uint8_t nb_options)
__rte_experimental int rte_pmd_mlx5_rxq_dump_contexts(uint16_t port_id, uint16_t queue_id, const char *filename)
__rte_experimental int rte_pmd_mlx5_external_tx_queue_id_unmap(uint16_t port_id, uint16_t dpdk_idx)
__rte_experimental int rte_pmd_mlx5_destroy_geneve_tlv_parser(void *handle)
__rte_experimental int rte_pmd_mlx5_sync_flow(uint16_t port_id, uint32_t domains)
__rte_experimental int rte_pmd_mlx5_get_dyn_flag_names(char *names[], unsigned int n)
__rte_experimental int rte_pmd_mlx5_txq_dump_contexts(uint16_t port_id, uint16_t queue_id, const char *filename)
__rte_experimental int rte_pmd_mlx5_flow_engine_set_mode(enum rte_pmd_mlx5_flow_engine_mode mode, uint32_t flags)
uint16_t rte_be16_t
__rte_experimental int rte_pmd_mlx5_external_rx_queue_id_map(uint16_t port_id, uint16_t dpdk_idx, uint32_t hw_idx)
__rte_experimental int rte_pmd_mlx5_external_tx_queue_id_map(uint16_t port_id, uint16_t dpdk_idx, uint32_t hw_idx)