<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Thanks both.  Packets now flow/don't flow as expected:</p>
    <p>- I disabled Linux forwarding</p>
    <p>- I ran simple_switch as root (previously, I did not run as root)</p>
    <p>- I matched the port numbers between 1) the ports identified by
      '-i' option when starting simple_switch and 2) ports used in bmv2
      runtime table commands (in my mininet setup, these had always been
      off by one).</p>
    <p>I suspect the mininet issue may be unique to my own anomalous
      setup, but perhaps disabling forwarding and running as root
      warrant a mention on the behavioral-model README.  In any case,
      I'm good for now, and appreciate your help.<br>
    </p>
    <p>--David<br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 09/15/2018 11:47 AM, Antonin Bas
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAFFMnX4eYH=R2BFUK3YuKi0mT0CAvfe3vvcT2uuYJLx6dZJaWA@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=utf-8">
      <div dir="ltr">
        <div dir="ltr">Also make sure that Linux forwarding is disabled
          (net.ipv4.ip_forward), otherwise traffic will be forwarded by
          Linux anyway.</div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Sat, Sep 15, 2018 at 7:43 AM,
          Vladimir Gurevich via P4-dev <span dir="ltr"><<a
              href="mailto:p4-dev@lists.p4.org" target="_blank"
              moz-do-not-send="true">p4-dev@lists.p4.org</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div dir="ltr">Hello David,
              <div><br>
              </div>
              <div>BMv2 implements P4 spec "to the t", meaning that it
                initializes all metadata to 0 and that includes
                standard_metadata.egress_spec. Therefore, a program that
                does "nothing" in reality will unconditionally send all
                the packets to port 0.</div>
              <div><br>
              </div>
              <div>Happy hacking,</div>
              <div>Vladimir</div>
              <div><br clear="all">
                <div>
                  <div dir="ltr"
                    class="m_-6361650418002448519gmail_signature"
                    data-smartmail="gmail_signature">
                    <div dir="ltr">
                      <div>
                        <div dir="ltr">
                          <div><font size="4"><b>Vladimir Gurevich</b></font></div>
                          <div><font size="4"><b><br>
                              </b></font></div>
                          <div><font size="4"><b>Barefoot Networks</b></font></div>
                          <div><b><font size="2">Technical Lead,
                                Customer Engineering</font></b></div>
                          <div><font size="2">Email: <a
                                href="mailto:vag@barefootnetworks.com"
                                target="_blank" moz-do-not-send="true">vag@barefootnetworks.com</a></font></div>
                          <div><font size="2">Phone: (408) 833-4505</font></div>
                          <div><br>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
                <br>
              </div>
            </div>
            <br>
            <div class="gmail_quote">
              <div>
                <div class="h5">
                  <div dir="ltr">On Fri, Sep 14, 2018 at 6:04 PM David
                    Hancock <<a href="mailto:dhancock@cs.utah.edu"
                      target="_blank" moz-do-not-send="true">dhancock@cs.utah.edu</a>>
                    wrote:<br>
                  </div>
                </div>
              </div>
              <blockquote class="gmail_quote" style="margin:0 0 0
                .8ex;border-left:1px #ccc solid;padding-left:1ex">
                <div>
                  <div class="h5">
                    <div bgcolor="#FFFFFF" text="#000000">
                      <p>Hello,</p>
                      <p>I'm trying to use bmv2 in a physical cluster
                        (previously I've always used mininet).  I'm
                        trying to bind the interfaces of a node to bmv2
                        and run a do-nothing P4 program on bmv2.  I
                        expect that packets should not flow through this
                        node once I have done this.  But packets still
                        flow, suggesting that bmv2 is not handling the
                        packets.  I have confirmed with traceroute that
                        the packets are traversing the interfaces that
                        should be bound to bmv2.<br>
                      </p>
                      <p>I start simple_switch as follows:</p>
                      <blockquote>
                        <p>./simple_switch -i 0@<iface 1> -i
                          1@<iface 2> -i 2@<iface 3>
                          <path to .json></p>
                      </blockquote>
                      <p>The result:</p>
                      <blockquote>
                        <p>Thrift port was not specified, will use 9090<br>
                          Calling target program-options parser<br>
                          Adding interface <iface 1> as port 0<br>
                          Adding interface <iface 2> as port 1<br>
                          Adding interface <iface 3> as port 2<br>
                          Thrift server was started</p>
                      </blockquote>
                      <p>I can connect to the CLI.</p>
                      <p>Am I missing something obvious?</p>
                      <p>Thanks,</p>
                      <p>David<br>
                      </p>
                    </div>
                  </div>
                </div>
                ______________________________<wbr>_________________<br>
                P4-dev mailing list<br>
                <a href="mailto:P4-dev@lists.p4.org" target="_blank"
                  moz-do-not-send="true">P4-dev@lists.p4.org</a><br>
                <a
                  href="http://lists.p4.org/mailman/listinfo/p4-dev_lists.p4.org"
                  rel="noreferrer" target="_blank"
                  moz-do-not-send="true">http://lists.p4.org/mailman/<wbr>listinfo/p4-dev_lists.p4.org</a><br>
              </blockquote>
            </div>
            <br>
            ______________________________<wbr>_________________<br>
            P4-dev mailing list<br>
            <a href="mailto:P4-dev@lists.p4.org" moz-do-not-send="true">P4-dev@lists.p4.org</a><br>
            <a
              href="http://lists.p4.org/mailman/listinfo/p4-dev_lists.p4.org"
              rel="noreferrer" target="_blank" moz-do-not-send="true">http://lists.p4.org/mailman/<wbr>listinfo/p4-dev_lists.p4.org</a><br>
            <br>
          </blockquote>
        </div>
        <br>
        <br clear="all">
        <div><br>
        </div>
        -- <br>
        <div class="gmail_signature" data-smartmail="gmail_signature">
          <div dir="ltr">Antonin<br>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
  </body>
</html>