[P4-dev] p4runtime (related to dev-day python code) error

Antonin Bas antonin at barefootnetworks.com
Wed Jan 31 15:25:48 EST 2018


Looking at the P4 Runtime server code, it seems that the only way to get
this error is if p4_device_config.device_data is empty (
https://github.com/p4lang/PI/blob/master/proto/frontend/src
/device_mgr.cpp#L223).
This doesn't seem to be possible as long as this method is called (and the
JSON file is not empty?): https://github.com/p4lang/tutorials/blob/master/
P4D2_2017_Fall/exercises/p4runtime/p4runtime_lib/bmv2.py#L19

Finally I tried the tutorial exercise on my laptop with recent versions of
bmv2 & P4 Runtime.
It was working fine ... once I applied the attached patch.

Installed P4 Program using SetForwardingPipelineConfig on s1
Installed P4 Program using SetForwardingPipelineConfig on s2
Installed ingress tunnel rule on s1
TODO Install transit tunnel rule
Installed egress tunnel rule on s2
Installed ingress tunnel rule on s2
TODO Install transit tunnel rule
Installed egress tunnel rule on s1

However, none of the issues I fixed with the attached patch can explain the
error you are observing.
I suggest that you check that buildDeviceConfig is called correctly (
https://github.com/p4lang/tutorials/blob/master/P4D2_2017_Fall/exercises/p4runtime/p4runtime_lib/bmv2.py#L19).
You may also want to print the SetForwardingPipelineConfigRequest messages
and make sure they are correct.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/attachments/20180131/37b0a357/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tuto_p4runtime.patch
Type: application/octet-stream
Size: 3980 bytes
Desc: not available
URL: <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/attachments/20180131/37b0a357/attachment.patch>


More information about the P4-dev mailing list