[P4-dev] update routing table

Roshan Se roshan.sedar at student.uclouvain.be
Thu Jul 13 10:58:22 EDT 2017


Hi,

I am trying to update the primary path by the new path during a failure.

which way is the most efficient and simple? Could it be done using p4 
registers?

Any help would be great. The following template I have in my mind.

Eg:

register primary_path {}
register new_path {}

action route(first_port) { }
action update(second_port) {}

table route {
         reads {
         standard_metadata.ingress_port: exact;
     }
     actions {
          route;
     }
     size: 1;
}

table path_update {
     actions {
         update;
     }
}

control ingress {
     apply(route_pkt);
     if (port_status == DOWN)
        apply(path_update);
}

Thanks!

Regards,
Roshan.




More information about the P4-dev mailing list