<p dir="ltr">Thanks David. Now I understood. </p>
<div class="gmail_quote">On 3 Feb 2016 11:40 pm, "David Hancock" <<a href="mailto:dhancock@cs.utah.edu">dhancock@cs.utah.edu</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    Ramana, I haven't looked at copy_to_cpu, but I'm pretty sure
    receive.py is simply using SCAPY to receive, and in your case, send,
    packets.  There is nothing special about the packets from the point
    of view of the switch.  So I'm a little surprised by your question. 
    It sounds like you are wondering whether packets ever skip certain
    components.<br>
    <br>
    Perhaps you are confused about data plane traffic vs. control plane
    traffic?  I'm not sure what the underlying confusion is but think
    things through and describe what *you* think should happen.<br>
    <br>
    --David<br>
    <br>
    <br>
    <div>On 02/03/2016 10:25 AM, Ramana Reddy
      wrote:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">
        <div>
          <div>
            <div>Thanks David. I will write some test code and try it
              out.<br>
              <br>
              In my second question, inject the packet means, assume
              that the packet is cloned and received by an application
              which is <br>
              listing on a particular port (ex: receive.py in
              copy_to_cpu), and if the receive.py modified the packet
              and inject the modified<br>
              packet back to switch, in that case, where exactly it
              injects into the pipeline ( ingress or buffering mechanism
              or egress). <br>
            </div>
            <br>
            <br>
          </div>
          Thanks & Regards,<br>
        </div>
        Ramana<br>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Wed, Feb 3, 2016 at 10:03 PM, David
          Hancock <span dir="ltr"><<a href="mailto:dhancock@cs.utah.edu" target="_blank">dhancock@cs.utah.edu</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div text="#000000" bgcolor="#FFFFFF"> Ramana, if you have
              reason to doubt the spec, why don't you write some test
              code and try it out?  Then, if the results are not what
              you expected, tell us about the difference between what
              you expected and what you observed.  I have done this
              numerous times.  In some cases, I uncovered a bug in the
              behavioral model.  In other cases, I learned that a
              feature was not implemented in the behavioral model, or
              that it was implemented a little bit differently than what
              the spec said.  In yet other cases, I learned that I did
              not understand the spec correctly.  I think you will best
              serve yourself and the entire P4 community by taking this
              approach.<br>
              <br>
              That is my answer to your first question.  I don't
              understand your second question - what do you mean,
              exactly, by "inject the packet"?  Since this is under the
              topic of cloning packets, I assume you are talking about
              cloning somehow.  I will tell you now that you cannot do a
              clone_*_pkt_to_ingress - it has not been implemented in
              bmv2, and per my discussion with Antonin, it may never be
              and is likely to be removed from the spec.  If you are
              talking about a resubmit, no clone is produced but the
              packet is sent back to the parser.  If you are talking
              about clone_*_pkt_to_egress, this sounds like your first
              question.<br>
              <br>
              One additional hint - neither the cloning primitives nor
              the resubmit primitive, nor the recirculate primitive take
              effect immediately - the packet continues until the end of
              the appropriate pipeline, at which point cloning /
              resubmission / recirculation happens.  That fact caused me
              a bit of confusion since I did not read the spec as
              carefully as I should have when I started working with
              these primitives, so I hope this helps you avoid the same
              confusion.<br>
              <br>
              --David
              <div>
                <div><br>
                  <br>
                  <div>On 02/03/2016 06:22 AM, Ramana Reddy wrote:<br>
                  </div>
                </div>
              </div>
              <blockquote type="cite">
                <div>
                  <div>
                    <div dir="ltr">
                      <div>
                        <div>Hi All,<br>
                          <br>
                        </div>
                        I have few doubts on cloned packets:<br>
                        <br>
                        1. When the packet is cloned using <span>clone_ingress_to_egress

                          primitive, </span><em></em><br>
                        is the match+actions which are mentioned in
                        ingress pipeline only <br>
                        applicable to original packet or to the cloned
                        packet as well?<br>
                        In the diagram given in the spec (section
                        14.1.2), the cloned<br>
                      </div>
                      <div>packet is directly going to the buffering
                        mechanism. <br>
                        <br>
                      </div>
                      <div>2. When we inject the packet through the
                        application which <br>
                      </div>
                      <div>is listing an a particular port, what is the
                        control flow of that<br>
                      </div>
                      <div>packet. Is it go again ingress pipeline
                        match+actions tables.<br>
                        <br>
                      </div>
                      <div>Thanks & Regards,<br>
                      </div>
                      <div>Ramana<br>
                      </div>
                      <br>
                    </div>
                    <br>
                    <fieldset></fieldset>
                    <br>
                  </div>
                </div>
                <pre>_______________________________________________
P4-dev mailing list
<a href="mailto:P4-dev@lists.p4.org" target="_blank">P4-dev@lists.p4.org</a>
<a href="http://lists.p4.org/mailman/listinfo/p4-dev_lists.p4.org" target="_blank">http://lists.p4.org/mailman/listinfo/p4-dev_lists.p4.org</a></pre>
              </blockquote>
              <br>
            </div>
            <br>
            _______________________________________________<br>
            P4-dev mailing list<br>
            <a href="mailto:P4-dev@lists.p4.org" target="_blank">P4-dev@lists.p4.org</a><br>
            <a href="http://lists.p4.org/mailman/listinfo/p4-dev_lists.p4.org" rel="noreferrer" target="_blank">http://lists.p4.org/mailman/listinfo/p4-dev_lists.p4.org</a><br>
          </blockquote>
        </div>
        <br>
      </div>
    </blockquote>
    <br>
  </div>

</blockquote></div>