3 #include "../../../platform/likely.h"
4 #include "../../../platform/lock.h"
5 #include "../../../util/logging.h"
11 #include "../of1x_switch.h"
15 const char* __of1x_flow_table_miss_config_str[__OF1X_TABLE_MISS_MAX]={
"CONTROLLER",
"CONTINUE",
"DROP",
"INVALID"};
35 table->default_action = OF1X_TABLE_MISS_CONTROLLER;
38 table->config.table_miss_config = 0x0;
61 bitmap128_set(&table->config.match, OF1X_MATCH_GRE_PROT_TYPE);
70 bitmap128_set(&table->config.wildcards, OF1X_MATCH_MPLS_LABEL);
76 bitmap128_set(&table->config.apply_actions, OF1X_AT_COPY_TTL_IN);
77 bitmap128_set(&table->config.apply_actions, OF1X_AT_POP_VLAN);
78 bitmap128_set(&table->config.apply_actions, OF1X_AT_POP_PPPOE);
79 bitmap128_set(&table->config.apply_actions, OF1X_AT_PUSH_PPPOE);
80 bitmap128_set(&table->config.apply_actions, OF1X_AT_PUSH_VLAN);
81 bitmap128_set(&table->config.apply_actions, OF1X_AT_DEC_NW_TTL);
82 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_NW_TTL);
83 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_QUEUE);
84 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_ETH_DST);
85 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_ETH_SRC);
86 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_ETH_TYPE);
87 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_VLAN_VID);
88 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_VLAN_PCP);
89 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_NW_PROTO);
90 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_NW_SRC);
91 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_NW_DST);
92 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_IP_DSCP);
93 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_IP_ECN);
94 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_IP_PROTO);
95 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_IPV4_SRC);
96 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_IPV4_DST);
97 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_TP_SRC);
98 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_TP_DST);
99 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_PPPOE_CODE);
100 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_PPPOE_TYPE);
101 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_PPPOE_SID);
102 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_PPP_PROT);
103 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_GTP_MSG_TYPE);
104 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_GTP_TEID);
105 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_GRE_VERSION);
106 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_GRE_PROT_TYPE);
107 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_GRE_KEY);
114 table->config.metadata_match = 0x0;
115 table->config.metadata_write = 0x0;
118 table->config.instructions = 0x0;
125 table->default_action = OF1X_TABLE_MISS_CONTROLLER;
128 table->config.table_miss_config = (1 << OF1X_TABLE_MISS_CONTROLLER) | (1 << OF1X_TABLE_MISS_CONTINUE) | (1 << OF1X_TABLE_MISS_DROP);
161 bitmap128_set(&table->config.match, OF1X_MATCH_IPV6_ND_TARGET);
173 bitmap128_set(&table->config.match, OF1X_MATCH_GTP_MSG_TYPE);
176 bitmap128_set(&table->config.match, OF1X_MATCH_GRE_PROT_TYPE);
181 bitmap128_set(&table->config.wildcards, OF1X_MATCH_METADATA);
184 bitmap128_set(&table->config.wildcards, OF1X_MATCH_VLAN_VID);
189 bitmap128_set(&table->config.wildcards, OF1X_MATCH_IPV4_SRC);
190 bitmap128_set(&table->config.wildcards, OF1X_MATCH_IPV4_DST);
191 bitmap128_set(&table->config.wildcards, OF1X_MATCH_IPV6_SRC);
192 bitmap128_set(&table->config.wildcards, OF1X_MATCH_IPV6_DST);
193 bitmap128_set(&table->config.wildcards, OF1X_MATCH_IPV6_FLABEL);
194 bitmap128_set(&table->config.wildcards, OF1X_MATCH_GTP_TEID);
199 bitmap128_set(&table->config.apply_actions, OF1X_AT_COPY_TTL_IN);
200 bitmap128_set(&table->config.apply_actions, OF1X_AT_POP_VLAN);
201 bitmap128_set(&table->config.apply_actions, OF1X_AT_POP_MPLS);
202 bitmap128_set(&table->config.apply_actions, OF1X_AT_POP_GRE);
203 bitmap128_set(&table->config.apply_actions, OF1X_AT_POP_GTP);
204 bitmap128_set(&table->config.apply_actions, OF1X_AT_POP_PPPOE);
205 bitmap128_set(&table->config.apply_actions, OF1X_AT_PUSH_PPPOE);
206 bitmap128_set(&table->config.apply_actions, OF1X_AT_PUSH_GTP);
207 bitmap128_set(&table->config.apply_actions, OF1X_AT_PUSH_GRE);
208 bitmap128_set(&table->config.apply_actions, OF1X_AT_PUSH_MPLS);
209 bitmap128_set(&table->config.apply_actions, OF1X_AT_PUSH_VLAN);
210 bitmap128_set(&table->config.apply_actions, OF1X_AT_COPY_TTL_OUT);
211 bitmap128_set(&table->config.apply_actions, OF1X_AT_DEC_NW_TTL);
212 bitmap128_set(&table->config.apply_actions, OF1X_AT_DEC_MPLS_TTL);
213 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_MPLS_TTL);
214 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_NW_TTL);
215 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_QUEUE);
216 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_ETH_DST);
217 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_ETH_SRC);
218 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_ETH_TYPE);
219 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_MPLS_LABEL);
220 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_MPLS_TC);
221 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_VLAN_VID);
222 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_VLAN_PCP);
223 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_ARP_OPCODE);
224 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_ARP_SHA);
225 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_ARP_SPA);
226 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_ARP_THA);
227 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_ARP_TPA);
228 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_NW_PROTO);
229 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_NW_SRC);
230 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_NW_DST);
231 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_IP_DSCP);
232 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_IP_ECN);
233 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_IP_PROTO);
234 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_IPV4_SRC);
235 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_IPV4_DST);
236 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_IPV6_SRC);
237 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_IPV6_DST);
238 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_IPV6_FLABEL);
239 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_IPV6_ND_TARGET);
240 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_IPV6_ND_SLL);
241 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_IPV6_ND_TLL);
242 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_TCP_SRC);
243 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_TCP_DST);
244 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_UDP_SRC);
245 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_UDP_DST);
246 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_SCTP_SRC);
247 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_SCTP_DST);
248 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_TP_SRC);
249 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_TP_DST);
250 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_ICMPV4_TYPE);
251 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_ICMPV4_CODE);
252 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_ICMPV6_TYPE);
253 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_ICMPV6_CODE);
254 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_PPPOE_CODE);
255 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_PPPOE_TYPE);
256 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_PPPOE_SID);
257 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_PPP_PROT);
258 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_GTP_MSG_TYPE);
259 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_GTP_TEID);
260 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_GRE_VERSION);
261 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_GRE_PROT_TYPE);
262 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_GRE_KEY);
264 bitmap128_set(&table->config.apply_actions, OF1X_AT_EXPERIMENTER);
268 table->config.write_actions = table->config.apply_actions;
271 table->config.metadata_match = 0xFFFFFFFFFFFFFFFFULL;
272 table->config.metadata_write = 0xFFFFFFFFFFFFFFFFULL;
275 table->config.instructions = (1 << OF1X_IT_APPLY_ACTIONS) |
276 (1 << OF1X_IT_CLEAR_ACTIONS) |
277 (1 << OF1X_IT_WRITE_ACTIONS) |
278 (1 << OF1X_IT_WRITE_METADATA) |
279 (1 << OF1X_IT_GOTO_TABLE);
285 __of12_set_table_defaults(table);
288 table->default_action = OF1X_TABLE_MISS_DROP;
294 bitmap128_set(&table->config.wildcards, OF1X_MATCH_IPV6_EXTHDR);
297 bitmap128_set(&table->config.wildcards, OF1X_MATCH_PBB_ISID);
300 bitmap128_set(&table->config.wildcards, OF1X_MATCH_TUNNEL_ID);
304 bitmap128_set(&table->config.apply_actions, OF1X_AT_POP_PBB);
305 bitmap128_set(&table->config.apply_actions, OF1X_AT_PUSH_PBB);
306 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_MPLS_BOS);
307 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_PBB_ISID);
308 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_IPV6_EXTHDR);
309 bitmap128_set(&table->config.apply_actions, OF1X_AT_SET_FIELD_TUNNEL_ID);
312 table->config.write_actions = table->config.apply_actions;
318 table->config.instructions |= (1 << OF1X_IT_METER);
320 table->config.table_miss_config = 0x0;
325 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){
328 if( unlikely(pipeline==NULL) || unlikely(table==NULL) )
333 if( unlikely(NULL==table->mutex) )
336 if( unlikely(NULL==table->rwlock) )
339 #ifdef ROFL_PIPELINE_LOCKLESS
340 tid_init_presence_mask(&table->tid_presence_mask);
343 table->pipeline = pipeline;
344 table->number = table_index;
346 table->num_of_entries = 0;
347 table->max_entries = OF1X_MAX_NUMBER_OF_TABLE_ENTRIES;
350 snprintf(table->name, OF1X_MAX_TABLE_NAME_LEN,
"table%u", table_index);
353 if(! (algorithm < of1x_matching_algorithm_count)){
360 table->matching_algorithm = algorithm;
367 #if OF1X_TIMER_STATIC_ALLOCATION_SLOTS
374 table->timers = NULL;
377 switch(pipeline->sw->of_ver){
379 __of10_set_table_defaults(table);
382 __of12_set_table_defaults(table);
385 __of13_set_table_defaults(table);
397 if(of1x_matching_algorithms[table->matching_algorithm].init_hook){
398 rofl_result_t result;
400 result = of1x_matching_algorithms[table->matching_algorithm].
init_hook(table);
402 if(result != ROFL_SUCCESS){
419 if(of1x_matching_algorithms[table->matching_algorithm].destroy_hook)
420 of1x_matching_algorithms[table->matching_algorithm].
destroy_hook(table);
426 #if OF1X_TIMER_STATIC_ALLOCATION_SLOTS
449 ROFL_PIPELINE_INFO(
"[flowmod-add(%p)] Starting operation at switch %s(%p), table %u, with flags: %s %s\n", *entry, pipeline->sw->name, pipeline->sw, table_id, check_overlap ?
"CHK_OVERLAP ":
"", (reset_counts)?
"RESET_COUNTERS":
"" );
450 ROFL_PIPELINE_INFO(
"");
454 if(unlikely(table_id >= pipeline->num_of_tables)){
455 ROFL_PIPELINE_ERR(
"[flowmod-add(%p)] ERROR: invalid table id %u > switch max table id: %u\n", *entry, table_id, pipeline->num_of_tables-1);
457 return ROFL_OF1X_FM_FAILURE;
460 table = &pipeline->tables[table_id];
469 ROFL_PIPELINE_INFO(
"[flowmod-add(%p)] FAILED validation. Ignoring...\n", *entry);
470 return ROFL_OF1X_FM_FAILURE;
475 result = of1x_matching_algorithms[table->matching_algorithm].
add_flow_entry_hook(table, *entry, check_overlap, reset_counts || ( pipeline->sw->of_ver == OF_VERSION_10 ));
477 if(result != ROFL_OF1X_FM_SUCCESS){
480 ROFL_PIPELINE_INFO(
"[flowmod-add(%p)] FAILED, reason: %u\n", *entry, result);
485 __of1x_add_timer(table, *entry);
487 ROFL_PIPELINE_INFO(
"[flowmod-add(%p)] Succesful.\n", *entry);
502 rofl_result_t result;
507 ROFL_PIPELINE_INFO(
"[flowmod-modify(%p)] Starting operation at switch %s(%p), table %u, with flags: %s %s\n", *entry, pipeline->sw->name, pipeline->sw, table_id, (strict) ?
"STRICT ":
"NOT STRICT", (reset_counts)?
"RESET_COUNTERS":
"" );
508 ROFL_PIPELINE_INFO(
"");
513 if(table_id >= pipeline->num_of_tables){
514 ROFL_PIPELINE_ERR(
"[flowmod-modify(%p)] ERROR: invalid table id %u > switch max table id: %u\n", *entry, table_id, pipeline->num_of_tables-1);
519 table = &pipeline->tables[table_id];
528 ROFL_PIPELINE_INFO(
"[flowmod-modify(%p)] FAILED validation. Ignoring...\n", *entry);
533 result = of1x_matching_algorithms[table->matching_algorithm].
modify_flow_entry_hook(table, *entry, strict, reset_counts);
535 if(result != ROFL_SUCCESS){
538 ROFL_PIPELINE_INFO(
"[flowmod-modify(%p)] FAILED\n", *entry);
542 ROFL_PIPELINE_INFO(
"[flowmod-modify(%p)] Succesful.\n", *entry);
559 rofl_result_t result;
563 ROFL_PIPELINE_INFO(
"[flowmod-remove(%p)] Starting operation at switch %s(%p), table %u, %s, ", entry, pipeline->sw->name, pipeline->sw, table_id, (strict) ?
"STRICT ":
"NOT STRICT");
565 if(out_port == OF1X_PORT_ANY){
566 ROFL_PIPELINE_INFO_NO_PREFIX(
"out_port: %s, ",
"ANY");
568 ROFL_PIPELINE_INFO_NO_PREFIX(
"out_port: %u, ", out_port);
570 if(out_group == OF1X_GROUP_ANY){
571 ROFL_PIPELINE_INFO_NO_PREFIX(
"out_group: %s",
"ANY");
573 ROFL_PIPELINE_INFO_NO_PREFIX(
"out_group: %u", out_group);
575 ROFL_PIPELINE_INFO_NO_PREFIX(
"\n");
576 ROFL_PIPELINE_INFO(
"");
581 if(table_id >= pipeline->num_of_tables){
582 ROFL_PIPELINE_ERR(
"[flowmod-remove(%p)] ERROR: invalid table id %u > switch max table id: %u\n", entry, table_id, pipeline->num_of_tables-1);
589 ROFL_PIPELINE_INFO(
"[flowmod-remove(%p)] FAILED validation. Ignoring...\n", entry);
594 table = &pipeline->tables[table_id];
596 result = of1x_matching_algorithms[table->matching_algorithm].
remove_flow_entry_hook(table, entry, NULL, strict, out_port, out_group, OF1X_FLOW_REMOVE_DELETE, MUTEX_NOT_ACQUIRED);
599 if(result != ROFL_SUCCESS)
600 ROFL_PIPELINE_INFO(
"[flowmod-remove(%p)] FAILED\n", entry);
602 ROFL_PIPELINE_INFO(
"[flowmod-remove(%p)] Succesful.\n", entry);
613 if(table_id >= pipeline->num_of_tables)
617 table = &pipeline->tables[table_id];
619 return of1x_matching_algorithms[table->matching_algorithm].
remove_flow_entry_hook(table, NULL, specific_entry, STRICT, OF1X_PORT_ANY, OF1X_GROUP_ANY, reason, mutex_acquired);
630 __of1x_stats_table_consolidate(&table->stats, &c);
632 ROFL_PIPELINE_INFO(
"\n");
633 ROFL_PIPELINE_INFO(
"Dumping table # %u (%p). Default action: %s, num. of entries: %d, ma: %u statistics {looked up: %u, matched: %u}\n", table->number, table, __of1x_flow_table_miss_config_str[table->default_action],table->num_of_entries, table->matching_algorithm, c.lookup_count, c.matched_count);
636 ROFL_PIPELINE_INFO(
"\t[*] No entries\n");
639 for(entry=table->
entries, i=0;entry!=NULL;entry=entry->next,i++){
640 ROFL_PIPELINE_INFO(
"\t[%d] ",i);
644 ROFL_PIPELINE_INFO(
"\t[*] No more entries...\n");
646 if(of1x_matching_algorithms[table->matching_algorithm].dump_hook){
647 ROFL_PIPELINE_INFO(
"\tMatching algorithm %u specific state\n", table->matching_algorithm);
648 of1x_matching_algorithms[table->matching_algorithm].
dump_hook(table, raw_nbo);
650 ROFL_PIPELINE_INFO(
"\n");
rofl_result_t of1x_modify_flow_entry_table(of1x_pipeline_t *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 pipeline abstraction.
void __of1x_timer_group_static_destroy(struct of1x_flow_table *table)
of1x_timer_group_static_destroy Destroys the timers table initializes the values for the entry lists ...
OpenFlow v1.0, 1.2 and 1.3.2 flow table abstraction.
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(of1x_pipeline_t *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.
static void bitmap128_clean(bitmap128_t *bitmap)
Set bitmap to 0.
rofl_of1x_fm_result_t(* add_flow_entry_hook)(struct of1x_flow_table *const table, of1x_flow_entry_t *const entry, bool check_overlap, bool reset_counts)
Adds a flow entry to the table.
void of1x_dump_flow_entry(of1x_flow_entry_t *entry, bool raw_nbo)
Dumps the flow entry for debugging purposes.
OpenFlow v1.0, 1.2 and 1.3.2 flow table abstraction.
of1x_flow_removal_strictness
Flow removal operations strictness.
rofl_result_t(* remove_flow_entry_hook)(struct of1x_flow_table *const table, of1x_flow_entry_t *const entry, of1x_flow_entry_t *const specific_entry, const enum of1x_flow_removal_strictness strict, uint32_t out_port, uint32_t out_group, of1x_flow_remove_reason_t reason, of1x_mutex_acquisition_required_t mutex_acquired)
Removes one or more flow entries in the table.
OpenFlow v1.0, 1.2 and 1.3.2 actions.
rofl_result_t(* modify_flow_entry_hook)(struct of1x_flow_table *const table, of1x_flow_entry_t *const entry, const enum of1x_flow_removal_strictness strict, bool reset_counts)
Modifies a set of flow entries in the table.
rofl_of1x_fm_result_t of1x_add_flow_entry_table(of1x_pipeline_t *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.
void __of1x_stats_table_destroy(struct of1x_flow_table *table)
Destroys table statistics state.
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.
void __of1x_stats_table_init(struct of1x_flow_table *table)
Initializes table statistics state.
OpenFlow v1.0, 1.2 and 1.3.2 matches.
rofl_result_t(* destroy_hook)(struct of1x_flow_table *const table)
Allows to destroy matching algorithm table state.
rofl_result_t(* init_hook)(struct of1x_flow_table *const table)
Allows to initialize matching algorithm table state.
OpenFlow v1.0, 1.2 and 1.3.2 pipeline abstraction data structure.
void(* dump_hook)(struct of1x_flow_table *const table, bool raw_nbo)
Dump hook.
rofl_result_t __of1x_timer_group_static_init(struct of1x_flow_table *table)
of1x_timer_group_static_init initializes the timeout values initializes the values for the entry list...
OpenFlow v1.0, 1.2 and 1.3.2 group table subsystem.
rofl_result_t __of1x_validate_flow_entry(of1x_flow_entry_t *entry, struct of1x_pipeline *pipeline, unsigned int table_id)
Check if the entry(matches, actions and instructions is valid for insertion)
static void bitmap128_set(bitmap128_t *bitmap, unsigned int pos)
Set a bit in the 128bit bitmap.