DPDK  18.11.11
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 #ifdef __cplusplus
50 extern "C" {
51 #endif
52 
53 #include <stdint.h>
54 
55 #include <rte_compat.h>
56 #include <rte_table_hash.h>
57 
58 #include "rte_pipeline.h"
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 
165 struct rte_port_in_action_profile;
166 
175 struct rte_port_in_action_profile * __rte_experimental
176 rte_port_in_action_profile_create(uint32_t socket_id);
177 
186 int __rte_experimental
187 rte_port_in_action_profile_free(struct rte_port_in_action_profile *profile);
188 
204 int __rte_experimental
206  struct rte_port_in_action_profile *profile,
207  enum rte_port_in_action_type type,
208  void *action_config);
209 
226 int __rte_experimental
227 rte_port_in_action_profile_freeze(struct rte_port_in_action_profile *profile);
228 
232 struct rte_port_in_action;
233 
248 struct rte_port_in_action * __rte_experimental
249 rte_port_in_action_create(struct rte_port_in_action_profile *profile,
250  uint32_t socket_id);
251 
260 int __rte_experimental
261 rte_port_in_action_free(struct rte_port_in_action *action);
262 
273 int __rte_experimental
274 rte_port_in_action_params_get(struct rte_port_in_action *action,
275  struct rte_pipeline_port_in_params *params);
276 
292 int __rte_experimental
293 rte_port_in_action_apply(struct rte_port_in_action *action,
294  enum rte_port_in_action_type type,
295  void *action_params);
296 
297 #ifdef __cplusplus
298 }
299 #endif
300 
301 #endif /* __INCLUDE_RTE_PORT_IN_ACTION_H__ */
int __rte_experimental rte_port_in_action_apply(struct rte_port_in_action *action, enum rte_port_in_action_type type, void *action_params)
int __rte_experimental rte_port_in_action_profile_free(struct rte_port_in_action_profile *profile)
uint8_t key[RTE_PORT_IN_ACTION_FLTR_KEY_SIZE]
int __rte_experimental rte_port_in_action_free(struct rte_port_in_action *action)
uint8_t key_mask[RTE_PORT_IN_ACTION_FLTR_KEY_SIZE]
struct rte_port_in_action *__rte_experimental rte_port_in_action_create(struct rte_port_in_action_profile *profile, uint32_t socket_id)
#define RTE_PORT_IN_ACTION_LB_KEY_SIZE_MAX
int __rte_experimental rte_port_in_action_profile_freeze(struct rte_port_in_action_profile *profile)
rte_table_hash_op_hash f_hash
uint64_t(* rte_table_hash_op_hash)(void *key, void *key_mask, uint32_t key_size, uint64_t seed)
#define RTE_PORT_IN_ACTION_LB_TABLE_SIZE
uint8_t key_mask[RTE_PORT_IN_ACTION_LB_KEY_SIZE_MAX]
int __rte_experimental rte_port_in_action_profile_action_register(struct rte_port_in_action_profile *profile, enum rte_port_in_action_type type, void *action_config)
struct rte_port_in_action_profile *__rte_experimental rte_port_in_action_profile_create(uint32_t socket_id)
uint32_t port_id[RTE_PORT_IN_ACTION_LB_TABLE_SIZE]
int __rte_experimental rte_port_in_action_params_get(struct rte_port_in_action *action, struct rte_pipeline_port_in_params *params)
uint32_t port_id[RTE_PORT_IN_ACTION_LB_TABLE_SIZE]
rte_port_in_action_type
#define RTE_PORT_IN_ACTION_FLTR_KEY_SIZE