diff options
author | 2018-06-01 09:09:08 +0200 | |
---|---|---|
committer | 2018-06-01 09:12:07 +0200 | |
commit | 1bd9b61222f3a81ffe770fc00b70ded6e760c42b (patch) | |
tree | 0bf7d996cf0664796687c1be6d22958fcf6a8096 /examples/ip_pipeline/action.h | |
parent | bb4e158029645f37809fcf81a3acddd6fa11f88a (diff) |
New upstream version 18.05
Change-Id: Icd4170ddc4f63aeae5d0559490e5195b5349f9c2
Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Diffstat (limited to 'examples/ip_pipeline/action.h')
-rw-r--r-- | examples/ip_pipeline/action.h | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/examples/ip_pipeline/action.h b/examples/ip_pipeline/action.h new file mode 100644 index 00000000..417200e8 --- /dev/null +++ b/examples/ip_pipeline/action.h @@ -0,0 +1,77 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2010-2018 Intel Corporation + */ + +#ifndef _INCLUDE_ACTION_H_ +#define _INCLUDE_ACTION_H_ + +#include <sys/queue.h> + +#include <rte_port_in_action.h> +#include <rte_table_action.h> + +#include "common.h" + +/** + * Input port action + */ +struct port_in_action_profile_params { + uint64_t action_mask; + struct rte_port_in_action_fltr_config fltr; + struct rte_port_in_action_lb_config lb; +}; + +struct port_in_action_profile { + TAILQ_ENTRY(port_in_action_profile) node; + char name[NAME_SIZE]; + struct port_in_action_profile_params params; + struct rte_port_in_action_profile *ap; +}; + +TAILQ_HEAD(port_in_action_profile_list, port_in_action_profile); + +int +port_in_action_profile_init(void); + +struct port_in_action_profile * +port_in_action_profile_find(const char *name); + +struct port_in_action_profile * +port_in_action_profile_create(const char *name, + struct port_in_action_profile_params *params); + +/** + * Table action + */ +struct table_action_profile_params { + uint64_t action_mask; + struct rte_table_action_common_config common; + struct rte_table_action_lb_config lb; + struct rte_table_action_mtr_config mtr; + struct rte_table_action_tm_config tm; + struct rte_table_action_encap_config encap; + struct rte_table_action_nat_config nat; + struct rte_table_action_ttl_config ttl; + struct rte_table_action_stats_config stats; +}; + +struct table_action_profile { + TAILQ_ENTRY(table_action_profile) node; + char name[NAME_SIZE]; + struct table_action_profile_params params; + struct rte_table_action_profile *ap; +}; + +TAILQ_HEAD(table_action_profile_list, table_action_profile); + +int +table_action_profile_init(void); + +struct table_action_profile * +table_action_profile_find(const char *name); + +struct table_action_profile * +table_action_profile_create(const char *name, + struct table_action_profile_params *params); + +#endif /* _INCLUDE_ACTION_H_ */ |