ROFL-pipeline  v0.6.0dev
available_ma_pp.h
1 
6 #ifndef MATCHING_ALGORITHMS_AVAILABLE_PP_H_
7 #define MATCHING_ALGORITHMS_AVAILABLE_PP_H_
8 
9 #include <assert.h>
10 #include "../../../../util/pp_guard.h" //Never forget to include the guard
11 #include "available_ma.h"
12 #include "../of1x_flow_table.h"
13 
14 #include <rofl/datapath/pipeline/openflow/openflow1x/pipeline/matching_algorithms/loop/of1x_loop_ma_pp.h>
15 #include <rofl/datapath/pipeline/openflow/openflow1x/pipeline/matching_algorithms/l2hash/of1x_l2hash_ma_pp.h>
16 
17 //Fwd declarations for non-inline
18 //Detected inline provider for of1x_find_best_match_loop_ma()
19 //Detected inline provider for of1x_find_best_match_l2hash_ma()
20 
21 //Main inline find_best_match demux routine
22 static inline struct of1x_flow_entry* __of1x_matching_algorithms_find_best_match(unsigned int tid, enum of1x_matching_algorithm_available ma, struct of1x_flow_table *const table, datapacket_t *const pkt){
23 switch(ma){
24 
25 case of1x_loop_matching_algorithm:
26 return of1x_find_best_match_loop_ma(table, pkt);
27 case of1x_l2hash_matching_algorithm:
28 return of1x_find_best_match_l2hash_ma(table, pkt);
29 default:
30 break;
31 }
32 
33 assert(0);
34 
35 return NULL;
36 }
37 
38 
39 
40 #endif /* MATCHING_ALGORITHMS_AVAILABLE_PP_H_ */
41 
OpenFlow v1.0, 1.2 and 1.3.2 flow entry structure.
OpenFlow v1.0, 1.2 and 1.3.2 flow table abstraction.
Data packet abstraction.
Definition: datapacket.h:49