<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi,<br>
    <br>
    thanks that's right, I did not run it. <br>
    But unfortunately it is still not running. Now the make in the
    switch shows some error in the p4c-bmv2, that I cannot resolve:<br>
    <font size="-1"><br>
      make  all-recursive<br>
      make[1]: Entering directory '/home/tanja/Desktop/switch'<br>
      Making all in p4-build<br>
      make[2]: Entering directory '/home/tanja/Desktop/switch/p4-build'<br>
      make  all-recursive<br>
      make[3]: Entering directory '/home/tanja/Desktop/switch/p4-build'<br>
      Making all in bmv2<br>
      make[4]: Entering directory
      '/home/tanja/Desktop/switch/p4-build/bmv2'<br>
      PYTHONPATH=$PYTHONPATH:/usr/local/lib/python2.7/dist-packages
      /usr/local/bin/p4c-bmv2 --pd ./switch/ --p4-prefix dc --plugin of
      --openflow-mapping-dir /home/tanja/Desktop/switch/openflow_mapping
      --openflow-mapping-mod l2 -DOPENFLOW_ENABLE --json ./switch.json
      /home/tanja/Desktop/switch/p4src/switch.p4<br>
      Traceback (most recent call last):<br>
        File "/usr/local/bin/p4c-bmv2", line 9, in <module><br>
          load_entry_point('p4c-bm===1.3.0-d9f088b8', 'console_scripts',
      'p4c-bmv2')()<br>
        File
      "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line
      542, in load_entry_point<br>
          return get_distribution(dist).load_entry_point(group, name)<br>
        File
      "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line
      2569, in load_entry_point<br>
          return ep.load()<br>
        File
      "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line
      2229, in load<br>
          return self.resolve()<br>
        File
      "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line
      2235, in resolve<br>
          module = __import__(self.module_name, fromlist=['__name__'],
      level=0)<br>
      ImportError: No module named __main__<br>
      Makefile:1273: recipe for target 'pd_files.ts' failed<br>
      make[4]: *** [pd_files.ts] Error 1<br>
      make[4]: Leaving directory
      '/home/tanja/Desktop/switch/p4-build/bmv2'<br>
      Makefile:426: recipe for target 'all-recursive' failed<br>
      make[3]: *** [all-recursive] Error 1<br>
      make[3]: Leaving directory '/home/tanja/Desktop/switch/p4-build'<br>
      Makefile:356: recipe for target 'all' failed<br>
      make[2]: *** [all] Error 2<br>
      make[2]: Leaving directory '/home/tanja/Desktop/switch/p4-build'<br>
      Makefile:469: recipe for target 'all-recursive' failed<br>
      make[1]: *** [all-recursive] Error 1<br>
      make[1]: Leaving directory '/home/tanja/Desktop/switch'<br>
      Makefile:393: recipe for target 'all' failed<br>
      make: *** [all] Error 2</font><br>
    <br>
    <font size="-1">Regards,<br>
      Tanja<br>
    </font><br>
    <br>
    <br>
    <br>
    <div class="moz-cite-prefix">Am 09.11.2016 um 19:52 schrieb Antonin
      Bas:<br>
    </div>
    <blockquote
cite="mid:CAFFMnX7O4JMBKSMvD7zJ3ie5Pd=AwKb9ZGC30x==upK_T1h7ug@mail.gmail.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <div dir="ltr">
        <div>
          <div>
            <div>Hi Tanja,<br>
              <br>
            </div>
            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.<br>
            <br>
          </div>
          Thanks,<br>
          <br>
        </div>
        Antonin<br>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Wed, Nov 9, 2016 at 2:22 AM, Tanja
          Ulmen <span dir="ltr"><<a moz-do-not-send="true"
              href="mailto:tanja.ulmen@rwth-aachen.de" target="_blank">tanja.ulmen@rwth-aachen.de</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div bgcolor="#FFFFFF" text="#000000"> Hi Antonin,<br>
              <br>
              thank you for your reply. Everything works fine until I
              try to configure the switch.<br>
              <br>
              The "./configure --with-bmv2 --with-of" ends with this:<br>
              <font size="-1"><br>
                === configuring in p4-build (/home/tanja/Desktop/switch/<wbr>p4-build)<br>
                configure: WARNING: no configuration information is in
                p4-build<br>
                <br>
              </font><font size="-1">switch features recap
                ......................<br>
                Coverage enabled .............. : no<br>
                With switchlink ............... : no<br>
                With switchsai ................ : no<br>
                With switchapi ................ : yes<br>
                With openflow ................. : yes<br>
                Compile for p4factory ......... : no<br>
                Compile for bmv2 .............. : yes<br>
                PTF found ..................... : yes<br>
                <br>
              </font>thus the "make" does not work:<br>
              <font size="-1"><br>
                make  all-recursive<br>
                make[1]: Entering directory '/home/tanja/Desktop/switch'<br>
                Making all in p4-build<br>
                make[2]: Entering directory '/home/tanja/Desktop/switch/<wbr>p4-build'<br>
                make[2]: *** No rule to make target 'all'.  Stop.<br>
                make[2]: Leaving directory '/home/tanja/Desktop/switch/<wbr>p4-build'<br>
                Makefile:469: recipe for target 'all-recursive' failed<br>
                make[1]: *** [all-recursive] Error 1<br>
                make[1]: Leaving directory '/home/tanja/Desktop/switch'<br>
                Makefile:393: recipe for target 'all' failed<br>
                make: *** [all] Error 2</font><br>
              <br>
              Where is my mistake?<br>
              <br>
              Regards,<br>
              Tanja
              <div>
                <div class="h5"><br>
                  <br>
                  <br>
                  <div class="m_-5867146277307337485moz-cite-prefix">Am
                    08.11.2016 um 18:31 schrieb Antonin Bas:<br>
                  </div>
                  <blockquote type="cite">
                    <div dir="ltr">
                      <div>
                        <div>
                          <div>
                            <div>
                              <div>
                                <div>
                                  <div>
                                    <div>
                                      <div>Hi Tanja,<br>
                                        <br>
                                      </div>
                                      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.<br>
                                    </div>
                                    The "range" match type is supported
                                    by the new version of the
                                    behavioral-model, aka bmv2 (<a
                                      moz-do-not-send="true"
                                      href="https://github.com/p4lang/behavioral-model"
                                      target="_blank">https://github.com/p4lang/<wbr>behavioral-model</a>).
                                    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:<br>
                                  </div>
                                  - install bmv2 (<a
                                    moz-do-not-send="true"
                                    href="https://github.com/p4lang/behavioral-model"
                                    target="_blank">https://github.com/p4lang/<wbr>behavioral-model</a>).
                                  The configure script needs to be run
                                  with --with-pdfixed.<br>
                                </div>
                                - install the bmv2 compiler (<a
                                  moz-do-not-send="true"
                                  href="https://github.com/p4lang/p4c-bm/tree/master/p4c_bm/"
                                  target="_blank">https://github.com/p4lang/<wbr>p4c-bm/tree/master/p4c_bm/</a>)<br>
                              </div>
                              - install the OF agent (<a
                                moz-do-not-send="true"
                                href="https://github.com/p4lang/p4ofagent"
                                target="_blank">https://github.com/p4lang/<wbr>p4ofagent</a>).
                              You need to export CPPFLAGS=-D_BMV2_ when
                              doing this.<br>
                            </div>
                            - compile switch (<a moz-do-not-send="true"
                              href="https://github.com/p4lang/switch"
                              target="_blank">https://github.com/p4lang/<wbr>switch</a>).
                            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.<br>
                          </div>
                          If you run into an issue for one of these
                          steps, please reach out to us.<br>
                          <br>
                        </div>
                        Thanks,<br>
                        <br>
                      </div>
                      Antonin<br>
                    </div>
                    <div class="gmail_extra"><br>
                      <div class="gmail_quote">On Tue, Nov 8, 2016 at
                        4:57 AM, Tanja Ulmen <span dir="ltr"><<a
                            moz-do-not-send="true"
                            href="mailto:tanja.ulmen@rwth-aachen.de"
                            target="_blank">tanja.ulmen@rwth-aachen.de</a>></span>
                        wrote:<br>
                        <blockquote class="gmail_quote" style="margin:0
                          0 0 .8ex;border-left:1px #ccc
                          solid;padding-left:1ex">
                          <div bgcolor="#FFFFFF" text="#000000"> Hello
                            everyone,<br>
                            <br>
                            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:<br>
                            <br>
                            <font size="-1">...<br>
                              Header type security_metadata_t not
                              byte-aligned, adding padding<br>
                              Header type fabric_metadata_t not
                              byte-aligned, adding padding<br>
                              Header type int_metadata_i2e_t not
                              byte-aligned, adding padding<br>
                              Header type meter_metadata_t not
                              byte-aligned, adding padding<br>
                              Header type qos_metadata_t not
                              byte-aligned, adding padding<br>
                              Generating files in directory
                              /home/tanja/Desktop/test/p4fac<wbr>tory/targets/switch/build/bm<br>
                              total phv length (in bytes): 2020<br>
                              P4_MATCH_RANGE match not yet supported<br>
                              Traceback (most recent call last):<br>
                                File "/home/tanja/Desktop/test/p4fa<wbr>ctory/submodules/p4c-behaviora<wbr>l/p4c_bm/shell.py",
                              line 150, in <module><br>
                                  main()<br>
                                File "/home/tanja/Desktop/test/p4fa<wbr>ctory/submodules/p4c-behaviora<wbr>l/p4c_bm/shell.py",
                              line 138, in main<br>
                                  dump_yaml = args.dump_yaml)<br>
                                File "/home/tanja/Desktop/test/p4fa<wbr>ctory/submodules/p4c-behaviora<wbr>l/p4c_bm/smart.py",
                              line 1164, in render_dict_create<br>
                                  render_dict_populate_tables(re<wbr>nder_dict,
                              hlir)<br>
                                File "/home/tanja/Desktop/test/p4fa<wbr>ctory/submodules/p4c-behaviora<wbr>l/p4c_bm/smart.py",
                              line 661, in render_dict_populate_tables<br>
                                  assert(False)<br>
                              AssertionError<br>
                              /home/tanja/Desktop/test/p4fac<wbr>tory/submodules/p4c-behavioral<wbr>/<a
                                moz-do-not-send="true"
                                href="http://p4c-bm.mk:96"
                                target="_blank">p4c-bm.mk:96</a>: recipe
                              for target 'bm_tenjin_output_oldest'
                              failed<br>
                              make: *** [bm_tenjin_output_oldest] Error
                              1</font><br>
                             <br>
                            Does anyone know, how to solve it? I use the
                            p4factory repository as it is, without any
                            changes.<br>
                            <br>
                            Regards,<br>
                            Tanja<br>
                          </div>
                          <br>
                          ______________________________<wbr>_________________<br>
                          P4-dev mailing list<br>
                          <a moz-do-not-send="true"
                            href="mailto:P4-dev@lists.p4.org"
                            target="_blank">P4-dev@lists.p4.org</a><br>
                          <a moz-do-not-send="true"
                            href="http://lists.p4.org/mailman/listinfo/p4-dev_lists.p4.org"
                            rel="noreferrer" target="_blank">http://lists.p4.org/mailman/li<wbr>stinfo/p4-dev_lists.p4.org</a><br>
                        </blockquote>
                      </div>
                      <br>
                      <br clear="all">
                      <br>
                      -- <br>
                      <div class="m_-5867146277307337485gmail_signature"
                        data-smartmail="gmail_signature">
                        <div dir="ltr">Antonin<br>
                        </div>
                      </div>
                    </div>
                  </blockquote>
                  <br>
                </div>
              </div>
            </div>
            <br>
            ______________________________<wbr>_________________<br>
            P4-dev mailing list<br>
            <a moz-do-not-send="true" href="mailto:P4-dev@lists.p4.org">P4-dev@lists.p4.org</a><br>
            <a moz-do-not-send="true"
              href="http://lists.p4.org/mailman/listinfo/p4-dev_lists.p4.org"
              rel="noreferrer" target="_blank">http://lists.p4.org/mailman/<wbr>listinfo/p4-dev_lists.p4.org</a><br>
          </blockquote>
        </div>
        <br>
        <br clear="all">
        <br>
        -- <br>
        <div class="gmail_signature" data-smartmail="gmail_signature">
          <div dir="ltr">Antonin<br>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
  </body>
</html>