-
Notifications
You must be signed in to change notification settings - Fork 189
Description
Hi,
I see the following error when i call insert() on a table_enrty object created on p4runtime shell in advanced branch. Any help in this regard is much appreciated.
Please look at the following logs
P4Runtime sh >>> te = table_entry["IngressPipeImpl.l2_exact_table"](action = "IngressPipeImpl.set_egress_port")
P4Runtime sh >>> te.match["hdr.ethernet.dst_addr"] = ("00:00:00:00:00:1B")
field_id: 1
exact {
value: "\033"
}
P4Runtime sh >>> te.action["port_num"] = ("4")
param_id: 1
value: "\004"
P4Runtime sh >>> te
Out[4]:
table_id: 33605373 ("IngressPipeImpl.l2_exact_table")
match {
field_id: 1 ("hdr.ethernet.dst_addr")
exact {
value: "\x1b"
}
}
action {
action {
action_id: 16812802 ("IngressPipeImpl.set_egress_port")
params {
param_id: 1 ("port_num")
value: "\x04"
}
}
}
P4Runtime sh >>> te.insert() --verbose
DEBUG:root:Inserting entry
P4RuntimeWriteException Traceback (most recent call last)
in
----> 1 te.insert() --verbose
/p4runtime-sh/venv/lib/python3.8/site-packages/p4runtime_shell-0.0.2-py3.8.egg/p4runtime_sh/shell.py in insert(self)
680 raise NotImplementedError("Insert not supported for {}".format(self._entity_type.name))
681 logging.debug("Inserting entry")
--> 682 self._write(p4runtime_pb2.Update.INSERT)
683
684 def delete(self):
/p4runtime-sh/venv/lib/python3.8/site-packages/p4runtime_shell-0.0.2-py3.8.egg/p4runtime_sh/shell.py in write(self, type)
674 update.type = type_
675 getattr(update.entity, self._entity_type.name).CopyFrom(self._entry)
--> 676 client.write_update(update)
677
678 def insert(self):
/p4runtime-sh/venv/lib/python3.8/site-packages/p4runtime_shell-0.0.2-py3.8.egg/p4runtime_sh/p4runtime.py in handle(*args, **kwargs)
121 if e.code() != grpc.StatusCode.UNKNOWN:
122 raise e
--> 123 raise P4RuntimeWriteException(e) from None
124 return handle
125
P4RuntimeWriteException: Error(s) during Write:
* At index 0: INVALID_ARGUMENT, 'Invalid bytestring format'
P4Runtime sh >>>
Thank you for your help in advance.