[P4-dev] Error on building soft switch with openflow agent

Antonin Bas antonin at barefootnetworks.com
Wed Nov 9 13:52:04 EST 2016


Hi Tanja,

My guess is you did not run "git submodule update --init" in the switch
repository after cloning it, which would lead to the p4-build component
being missing. If you run this git command and run autogen.sh + configure,
it should work.

Thanks,

Antonin

On Wed, Nov 9, 2016 at 2:22 AM, Tanja Ulmen <tanja.ulmen at rwth-aachen.de>
wrote:

> Hi Antonin,
>
> thank you for your reply. Everything works fine until I try to configure
> the switch.
>
> The "./configure --with-bmv2 --with-of" ends with this:
>
> === configuring in p4-build (/home/tanja/Desktop/switch/p4-build)
> configure: WARNING: no configuration information is in p4-build
>
> switch features recap ......................
> Coverage enabled .............. : no
> With switchlink ............... : no
> With switchsai ................ : no
> With switchapi ................ : yes
> With openflow ................. : yes
> Compile for p4factory ......... : no
> Compile for bmv2 .............. : yes
> PTF found ..................... : yes
>
> thus the "make" does not work:
>
> make  all-recursive
> make[1]: Entering directory '/home/tanja/Desktop/switch'
> Making all in p4-build
> make[2]: Entering directory '/home/tanja/Desktop/switch/p4-build'
> make[2]: *** No rule to make target 'all'.  Stop.
> make[2]: Leaving directory '/home/tanja/Desktop/switch/p4-build'
> Makefile:469: recipe for target 'all-recursive' failed
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory '/home/tanja/Desktop/switch'
> Makefile:393: recipe for target 'all' failed
> make: *** [all] Error 2
>
> Where is my mistake?
>
> Regards,
> Tanja
>
>
>
> Am 08.11.2016 um 18:31 schrieb Antonin Bas:
>
> Hi Tanja,
>
> Now that switch.p4 is leveraging the P4 "range" match type, it can no
> longer be compiled for bmv1 (p4c-behavioral), and we should be removing
> bmv1 from p4lang very soon.
> The "range" match type is supported by the new version of the
> behavioral-model, aka bmv2 (https://github.com/p4lang/behavioral-model).
> You should be able to compile switch.p4 with OF support for bmv2 (outside
> of p4factory). Unfortunately, I did not find step-by-step instructions, but
> is should basically be as follows:
> - install bmv2 (https://github.com/p4lang/behavioral-model). The
> configure script needs to be run with --with-pdfixed.
> - install the bmv2 compiler (https://github.com/p4lang/
> p4c-bm/tree/master/p4c_bm/)
> - install the OF agent (https://github.com/p4lang/p4ofagent). You need to
> export CPPFLAGS=-D_BMV2_ when doing this.
> - compile switch (https://github.com/p4lang/switch). You need to run
> configure with --with-bmv2 and --with-of. If you are missing any
> dependency, you should get an error at this point.
> If you run into an issue for one of these steps, please reach out to us.
>
> Thanks,
>
> Antonin
>
> On Tue, Nov 8, 2016 at 4:57 AM, Tanja Ulmen <tanja.ulmen at rwth-aachen.de>
> wrote:
>
>> Hello everyone,
>>
>> I get an error on building the Soft Switch from the p4factory with an
>> Openflow agent. When I run "make bm-p4ofagent PLUGIN_OPENFLOW=1" I get the
>> following error:
>>
>> ...
>> Header type security_metadata_t not byte-aligned, adding padding
>> Header type fabric_metadata_t not byte-aligned, adding padding
>> Header type int_metadata_i2e_t not byte-aligned, adding padding
>> Header type meter_metadata_t not byte-aligned, adding padding
>> Header type qos_metadata_t not byte-aligned, adding padding
>> Generating files in directory /home/tanja/Desktop/test/p4fac
>> tory/targets/switch/build/bm
>> total phv length (in bytes): 2020
>> P4_MATCH_RANGE match not yet supported
>> Traceback (most recent call last):
>>   File "/home/tanja/Desktop/test/p4factory/submodules/p4c-behavioral/p4c_bm/shell.py",
>> line 150, in <module>
>>     main()
>>   File "/home/tanja/Desktop/test/p4factory/submodules/p4c-behavioral/p4c_bm/shell.py",
>> line 138, in main
>>     dump_yaml = args.dump_yaml)
>>   File "/home/tanja/Desktop/test/p4factory/submodules/p4c-behavioral/p4c_bm/smart.py",
>> line 1164, in render_dict_create
>>     render_dict_populate_tables(render_dict, hlir)
>>   File "/home/tanja/Desktop/test/p4factory/submodules/p4c-behavioral/p4c_bm/smart.py",
>> line 661, in render_dict_populate_tables
>>     assert(False)
>> AssertionError
>> /home/tanja/Desktop/test/p4factory/submodules/p4c-behavioral/p4c-bm.mk:96:
>> recipe for target 'bm_tenjin_output_oldest' failed
>> make: *** [bm_tenjin_output_oldest] Error 1
>>
>> Does anyone know, how to solve it? I use the p4factory repository as it
>> is, without any changes.
>>
>> Regards,
>> Tanja
>>
>> _______________________________________________
>> P4-dev mailing list
>> P4-dev at lists.p4.org
>> http://lists.p4.org/mailman/listinfo/p4-dev_lists.p4.org
>>
>
>
>
> --
> Antonin
>
>
>
> _______________________________________________
> P4-dev mailing list
> P4-dev at lists.p4.org
> http://lists.p4.org/mailman/listinfo/p4-dev_lists.p4.org
>



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


More information about the P4-dev mailing list