From 80d2d34ccb60a9a3c0b4d717d49689a565dcc523 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 31 Mar 2019 16:04:05 +0200 Subject: [PATCH] ++doc ++clean table --- doc/plan.org | 18 +++++++++++++++--- p4app/controller.py | 1 + 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/doc/plan.org b/doc/plan.org index b1ac5c0..419548b 100644 --- a/doc/plan.org +++ b/doc/plan.org @@ -1546,7 +1546,7 @@ debug packets - analyse code - goto 1 [21:26] line:~% sudo apt install thrift-compiler libnanomsg-dev libjudy-dev *** Performance comparison -*** Challenges / Limitations in P4 +*** P4 Possible Improvements / Current Challenges / Limitations **** DONE cannot read key from table ***** log Key and mask for matching destination is in table. We need this @@ -1653,7 +1653,11 @@ bad json: #+END_SRC -**** Only one LPM key supported in tables (2019-03-23) +**** DONE Only one LPM key supported in tables (2019-03-23) +Priority support in ternary possible. Means rewriting for +developers. Could possibly be supported by switching to ternary mode +internally. + #+BEGIN_SRC ../p4src/static-mapping.p4(121): error: MyIngress.nat64, Multiple LPM keys in table table nat64 { @@ -1695,7 +1699,6 @@ I could work around this by using if(! .. .hit) { my_action(table_id) - switch/if in actions: with shadow tables - switch/if in apply block - ***** log Imho, compiler should be able to unroll these to some degree. @@ -1730,6 +1733,15 @@ I could work around this by using if(! .. .hit) { my_action(table_id) } #+END_SRC +**** TODO Modules, OS +Not addressed so far: how to create re-usable code fragments that can +be plugged in easily. There could be a hypothetical "P4OS" that +manages code fragments. This might include, but not limited to +downloading (signed?) source code, managing dependencies similar to +Linux package management, handling updates, etc. +**** TODO Code sharing (controller, switch) +Many constants double defined. Easy to make errors. + *** Implementation limitations **** No fragmentation support (yet) **** No session handling (yet) diff --git a/p4app/controller.py b/p4app/controller.py index f633200..d536315 100755 --- a/p4app/controller.py +++ b/p4app/controller.py @@ -249,6 +249,7 @@ class L2Controller(object): self.controller.table_add("v6_networks", "set_egress_port", [str(v6route['net'])], [str(v6route['port'])]) self.controller.table_clear("v4_networks") + self.controller.table_clear("v4_arp") for v4route in self.v4_routes[self.mode]: self.controller.table_add("v4_networks", "set_egress_port", [str(v4route['net'])], [str(v4route['port'])])