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

Antonin Bas antonin at barefootnetworks.com
Wed Jan 31 18:12:43 EST 2018


Yes config = request.config is the correct fix, this is included in the
patch I provided.

On Wed, Jan 31, 2018 at 2:12 PM, Zeeshan Lakhani <zeeshan.lakhani at gmail.com>
wrote:

> After some finagling with container versions and the change, I can now
> install the program on switches! Thanks.
>
> I did however run into an error calling, `request.configs.add()`, as it
> has no associated attribute. But, replacing it with `config =
> request.config` seemed to do the trick. I'll create a PR for the tutorial,
> but I wanted to make sure the config change made sense.
>
> On Wed, Jan 31, 2018 at 3:25 PM, Antonin Bas <antonin at barefootnetworks.com
> > wrote:
>
>> 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/p4
>> lang/tutorials/blob/master/P4D2_2017_Fall/exercises/p4runtim
>> e/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.
>>
>
>


-- 
Antonin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/attachments/20180131/b88f87b7/attachment-0002.html>


More information about the P4-dev mailing list