-
Notifications
You must be signed in to change notification settings - Fork 187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
P4 table entry insert from p4runtime docker container shell is broken in advanced branch #91
Comments
so did you solve this problem ? I have meet this one |
Yes, you need to set canonical bytestrings as false before passing any flow
configurations. you can do it with the following p4 runtime command.
global_options["canonical_bytestrings"] = False
Thanks
…On Sun, Apr 24, 2022 at 6:22 AM cxd ***@***.***> wrote:
so did you solve this problem ? I have meet this one
—
Reply to this email directly, view it on GitHub
<#91 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AQO2YXDB4SQ3F7SNR7YNHV3VGU4GTANCNFSM5ICWTOSA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
--
regards,
Sanjeeva Reddy.Y.
|
P4Runtime sh >>> global_options["canonical_bytestrings"] = False P4Runtime sh >>> te.insert()P4RuntimeWriteException Traceback (most recent call last) /p4runtime-sh/venv/lib/python3.10/site-packages/p4runtime_sh/shell.py in insert(self) /p4runtime-sh/venv/lib/python3.10/site-packages/p4runtime_sh/shell.py in write(self, type) /p4runtime-sh/venv/lib/python3.10/site-packages/p4runtime_sh/p4runtime.py in handle(*args, **kwargs) P4RuntimeWriteException: Error(s) during Write: P4Runtime sh >>> |
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.
The text was updated successfully, but these errors were encountered: