DPDK 25.03.0-rc0
rte_port_in_action.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2018 Intel Corporation
3 */
4
5#ifndef __INCLUDE_RTE_PORT_IN_ACTION_H__
6#define __INCLUDE_RTE_PORT_IN_ACTION_H__
7
49#include <stdint.h>
50
51#include <rte_compat.h>
52#include <rte_table_hash.h>
53
54#include "rte_pipeline.h"
55
56#ifdef __cplusplus
57extern "C" {
58#endif
59
64
67};
68
73#define RTE_PORT_IN_ACTION_FLTR_KEY_SIZE 16
74
80 uint32_t key_offset;
81
84
87
94
100 uint32_t port_id;
101};
102
106 uint32_t port_id;
107};
108
113#define RTE_PORT_IN_ACTION_LB_KEY_SIZE_MIN 8
114
116#define RTE_PORT_IN_ACTION_LB_KEY_SIZE_MAX 64
117
119#define RTE_PORT_IN_ACTION_LB_TABLE_SIZE 16
120
124 uint32_t key_size;
125
129 uint32_t key_offset;
130
133
136
138 uint64_t seed;
139
149};
150
160};
161
165struct rte_port_in_action_profile;
166
175__rte_experimental
176struct rte_port_in_action_profile *
178
188__rte_experimental
189int
190rte_port_in_action_profile_free(struct rte_port_in_action_profile *profile);
191
207__rte_experimental
208int
210 struct rte_port_in_action_profile *profile,
211 enum rte_port_in_action_type type,
212 void *action_config);
213
230__rte_experimental
231int
232rte_port_in_action_profile_freeze(struct rte_port_in_action_profile *profile);
233
237struct rte_port_in_action;
238
253__rte_experimental
254struct rte_port_in_action *
255rte_port_in_action_create(struct rte_port_in_action_profile *profile,
256 uint32_t socket_id);
257
267__rte_experimental
268int
269rte_port_in_action_free(struct rte_port_in_action *action);
270
281__rte_experimental
282int
283rte_port_in_action_params_get(struct rte_port_in_action *action,
284 struct rte_pipeline_port_in_params *params);
285
301__rte_experimental
302int
303rte_port_in_action_apply(struct rte_port_in_action *action,
304 enum rte_port_in_action_type type,
305 void *action_params);
306
307#ifdef __cplusplus
308}
309#endif
310
311#endif /* __INCLUDE_RTE_PORT_IN_ACTION_H__ */
__rte_experimental int rte_port_in_action_apply(struct rte_port_in_action *action, enum rte_port_in_action_type type, void *action_params)
__rte_experimental int rte_port_in_action_profile_freeze(struct rte_port_in_action_profile *profile)
__rte_experimental struct rte_port_in_action_profile * rte_port_in_action_profile_create(uint32_t socket_id)
#define RTE_PORT_IN_ACTION_LB_TABLE_SIZE
__rte_experimental struct rte_port_in_action * rte_port_in_action_create(struct rte_port_in_action_profile *profile, uint32_t socket_id)
__rte_experimental int rte_port_in_action_profile_free(struct rte_port_in_action_profile *profile)
#define RTE_PORT_IN_ACTION_FLTR_KEY_SIZE
__rte_experimental int rte_port_in_action_profile_action_register(struct rte_port_in_action_profile *profile, enum rte_port_in_action_type type, void *action_config)
__rte_experimental int rte_port_in_action_free(struct rte_port_in_action *action)
rte_port_in_action_type
@ RTE_PORT_IN_ACTION_LB
@ RTE_PORT_IN_ACTION_FLTR
__rte_experimental int rte_port_in_action_params_get(struct rte_port_in_action *action, struct rte_pipeline_port_in_params *params)
#define RTE_PORT_IN_ACTION_LB_KEY_SIZE_MAX
uint64_t(* rte_table_hash_op_hash)(void *key, void *key_mask, uint32_t key_size, uint64_t seed)
uint8_t key_mask[RTE_PORT_IN_ACTION_FLTR_KEY_SIZE]
uint8_t key[RTE_PORT_IN_ACTION_FLTR_KEY_SIZE]
rte_table_hash_op_hash f_hash
uint8_t key_mask[RTE_PORT_IN_ACTION_LB_KEY_SIZE_MAX]
uint32_t port_id[RTE_PORT_IN_ACTION_LB_TABLE_SIZE]
uint32_t port_id[RTE_PORT_IN_ACTION_LB_TABLE_SIZE]