P4 Developer Day May 2019 (#252)

* Update user-bootstrap to use latest version (#251)

* p4c tests are failing in latest version. So, let's skip it during vagrant provisioning

* Update tutorial to use latest version of P4 tools

Modify switch.py to handle setting default_action
Use --p4runtime-files instead of deprecated --p4runtime-file and
--p4runtime-format flags
Provide standard_metadata for mark_to_drop

* Fix path for ECN exercise
This commit is contained in:
Nate Foster
2019-04-25 21:21:47 -04:00
committed by GitHub
parent 201fcf59a8
commit 01fc378076
50 changed files with 59 additions and 57 deletions

View File

@@ -15,8 +15,8 @@
import re
import google.protobuf.text_format
from p4 import p4runtime_pb2
from p4.config import p4info_pb2
from p4.v1 import p4runtime_pb2
from p4.config.v1 import p4info_pb2
from convert import encode
@@ -97,10 +97,7 @@ class P4InfoHelper(object):
p4runtime_match = p4runtime_pb2.FieldMatch()
p4runtime_match.field_id = p4info_match.id
match_type = p4info_match.match_type
if match_type == p4info_pb2.MatchField.VALID:
valid = p4runtime_match.valid
valid.value = bool(value)
elif match_type == p4info_pb2.MatchField.EXACT:
if match_type == p4info_pb2.MatchField.EXACT:
exact = p4runtime_match.exact
exact.value = encode(value, bitwidth)
elif match_type == p4info_pb2.MatchField.LPM: