Try to use default action with parameter

This commit is contained in:
Nico Schottelius 2019-03-25 13:57:09 +01:00
parent f965942dd5
commit 1e95278eb7

View file

@ -228,10 +228,12 @@ control MyIngress(inout headers hdr,
controller_debug;
icmp6_neighbor_solicitation;
icmp6_echo_reply;
controller_debug_table_id;
NoAction;
}
size = ICMP6_TABLE_SIZE;
default_action = NoAction;
default_action = controller_debug_table_id(TABLE_ICMP6);
// default_action = NoAction;
}
/********************** debugging / general support ***********************************/
@ -306,10 +308,11 @@ control MyIngress(inout headers hdr,
set_egress_port;
controller_debug;
controller_reply;
controller_debug_table_id;
NoAction;
}
size = ROUTING_TABLE_SIZE;
default_action = NoAction;
default_action = controller_debug_table_id(TABLE_V6_NETWORKS);
}
table v4_networks {
@ -329,24 +332,27 @@ control MyIngress(inout headers hdr,
/********************** APPLYING TABLES ***********************************/
apply {
if(hdr.ipv6.isValid()) {
if(!icmp6.apply().hit) { /* icmp6 echo, icmp6 ndp */
controller_debug_table_id(TABLE_ICMP6);
}
icmp6.apply(); /* icmp6 echo, icmp6 ndp */
nat64.apply(); /* translating */
v6_networks.apply();
if(!nat64.apply().hit) { /* v6 -> v4 */
controller_debug_table_id(TABLE_NAT64);
}
if(!v6_networks.apply().hit) {
controller_debug_table_id(TABLE_V6_NETWORKS);
}
// if(!nat64.apply().hit) { /* v6 -> v4 */
// controller_debug_table_id(TABLE_NAT64);
// }
// if(!v6_networks.apply().hit) {
// controller_debug_table_id(TABLE_V6_NETWORKS);
// }
}
if(hdr.ipv4.isValid()) {
if(!nat46.apply().hit) { /* v4->v6 */
controller_debug_table_id(TABLE_NAT46);
}
if(!v4_networks.apply().hit) { /* routing, egress */
controller_debug_table_id(TABLE_V4_NETWORKS);
}
nat46.apply() /* v4->v6 */
v4_networks.apply(); /* routing, egress */
// if(!nat46.apply().hit) { /* v4->v6 */
// controller_debug_table_id(TABLE_NAT46);
// }
// if(!v4_networks.apply().hit) { /* routing, egress */
// controller_debug_table_id(TABLE_V4_NETWORKS);
// }
}
}
}