5 #ifndef __OF1X_FLOW_TABLEH__
6 #define __OF1X_FLOW_TABLEH__
13 #include "../../../common/bitmap.h"
14 #include "../../../threading.h"
19 #include "matching_algorithms/matching_algorithms.h"
45 #define OF1X_FIRST_FLOW_TABLE_INDEX 0 //As per 1.2 spec
46 #define OF1X_MAX_NUMBER_OF_TABLE_ENTRIES 0xFFFFFFFF
47 #define OF1X_MAX_TABLE_NAME_LEN 32
54 typedef void matching_auxiliary_t;
60 OF1X_TABLE_MISS_CONTROLLER = 0,
61 OF1X_TABLE_MISS_CONTINUE = 1 << 0,
62 OF1X_TABLE_MISS_DROP = 1 << 1,
63 OF1X_TABLE_MISS_MASK = 3
68 #define __OF1X_TABLE_MISS_MAX OF1X_TABLE_MISS_MASK+1
69 extern const char* __of1x_flow_table_miss_config_str[__OF1X_TABLE_MISS_MAX];
80 bitmap64_t metadata_match;
81 bitmap64_t metadata_write;
82 bitmap32_t instructions;
83 bitmap32_t table_miss_config;
96 char name[OF1X_MAX_TABLE_NAME_LEN];
104 unsigned int num_of_entries;
105 unsigned int max_entries;
108 #if OF1X_TIMER_STATIC_ALLOCATION_SLOTS
109 unsigned int current_timer_group;
126 #ifdef ROFL_PIPELINE_LOCKLESS
127 tid_presence_t tid_presence_mask;
131 platform_mutex_t* mutex;
132 platform_rwlock_t* rwlock;
140 enum of1x_matching_algorithm_available matching_algorithm;
161 rofl_result_t __of1x_init_table(
struct of1x_pipeline* pipeline,
of1x_flow_table_t* table,
const unsigned int table_index,
const enum of1x_matching_algorithm_available algorithm);
261 #endif //OF1X_FLOW_TABLE
rofl_result_t of1x_modify_flow_entry_table(struct of1x_pipeline *const pipeline, const unsigned int table_id, of1x_flow_entry_t **const entry, const enum of1x_flow_removal_strictness strict, bool reset_counts)
Modify flow_entry(s) in the table.
OpenFlow v1.0, 1.2 and 1.3.2 flow entry structure.
enum of1x_flow_remove_reason of1x_flow_remove_reason_t
Flow remove reasons (enum ofp_flow_removed_reason)
rofl_result_t of1x_remove_flow_entry_table(struct of1x_pipeline *const pipeline, const unsigned int table_id, of1x_flow_entry_t *entry, const enum of1x_flow_removal_strictness strict, uint32_t out_port, uint32_t out_group)
Removes a flow_entry from the table.
OpenFlow v1.0, 1.2 and 1.3.2 flow table abstraction.
of1x_flow_removal_strictness
Flow removal operations strictness.
rofl_of1x_fm_result_t of1x_add_flow_entry_table(struct of1x_pipeline *const pipeline, const unsigned int table_id, of1x_flow_entry_t **const entry, bool check_overlap, bool reset_counts)
Add a flow_entry to a table.
OpenFlow v1.0, 1.2 and 1.3.2 timers subsystem.
of1x_flow_table_miss_config_t
Table miss behaviour (ofp_table_config)
matching_auxiliary_t * matching_aux[2]
Place-holder to allow matching algorithms keep its own state.
enum rofl_of1x_fm_result rofl_of1x_fm_result_t
Extended flowmod return codes.
of1x_flow_entry_t * entries
This pointer may or may not be used depending on the matching algorithm.
OpenFlow v1.0, 1.2 and 1.3.2 flow entry abstraction.
OpenFlow v1.0, 1.2 and 1.3.2 pipeline abstraction data structure.
OpenFlow v1.0, 1.2 and 1.3.2 statistics subsystem.
struct of1x_flow_table of1x_flow_table_t
OpenFlow v1.0, 1.2 and 1.3.2 flow table abstraction.
of1x_flow_table_t __of1x_flow_table_snapshot_t
Table snapshot.