<div dir="ltr">Hello,<div><br></div><div>I have been trying to add a new flow action which sends the port statistics of the switch when a matching packet is received. When no other traffic is generated this works fine, but when I generate traffic in the network, the same action gets executed again and again. The flow table entries still show the same stats which means that the packets are not actually matching the flow entry. I suspect it is due to the way the action is defined if restarts if another packet matches the corresponding flow entry. </div><div><br></div><div>I think I would be able to understand the cause of the issue better if I had some idea of the functionality of revalidate functions in ofproto/ofproto-dpif-upcall.c. It would be really helpful if someone could help me in understanding the cause of this issue and a good way to avoid it.</div><div><br></div><div>Below are the stack traces of two executions of the action (one of which I suppose is because of the action being restarted)</div><div><br></div><div><div>#0  handle_port_stats_request_from_ofproto_dpif (connmgr=0x85ed50, port=2, dst=...) at ofproto/ofproto.c:379</div><div>#1  0x000000000042b744 in handle_port_stats_request_from_xlate (ofproto=&lt;optimized out&gt;, port=&lt;optimized out&gt;, dst=...)</div><div>    at ofproto/ofproto-dpif.c:351</div><div>#2  0x000000000043e74e in do_xlate_actions (ofpacts=ofpacts@entry=0x85c458, ofpacts_len=ofpacts_len@entry=8, </div><div>    ctx=ctx@entry=0x7ffff529f260) at ofproto/ofproto-dpif-xlate.c:4762</div><div>#3  0x0000000000443b3e in xlate_actions (xin=xin@entry=0x7ffff529fdf0, xout=xout@entry=0x7ffff529f6c0)</div><div>    at ofproto/ofproto-dpif-xlate.c:5586</div><div>#4  0x0000000000436888 in revalidate_ukey (udpif=udpif@entry=0x85f2f0, ukey=ukey@entry=0x7fffec00fa30, </div><div>    stats=stats@entry=0x7ffff52a1020, odp_actions=odp_actions@entry=0x7ffff52a01b0, reval_seq=reval_seq@entry=23934, </div><div>    recircs=recircs@entry=0x7ffff52a01a0) at ofproto/ofproto-dpif-upcall.c:1919</div><div>#5  0x00000000004398b1 in revalidate (revalidator=0x852a20) at ofproto/ofproto-dpif-upcall.c:2252</div><div>#6  0x0000000000439b00 in udpif_revalidator (arg=0x852a20) at ofproto/ofproto-dpif-upcall.c:901</div><div>#7  0x00000000004ca7e4 in ovsthread_wrapper (aux_=&lt;optimized out&gt;) at lib/ovs-thread.c:342</div><div>#8  0x00007ffff758b184 in start_thread (arg=0x7ffff52a4700) at pthread_create.c:312</div><div>#9  0x00007ffff6da9ffd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111</div><div><br></div><div><div>#0  handle_port_stats_request_from_ofproto_dpif (connmgr=0x88c150, port=6, dst=...) at ofproto/ofproto.c:379</div><div>#1  0x000000000042b744 in handle_port_stats_request_from_xlate (ofproto=&lt;optimized out&gt;, port=&lt;optimized out&gt;, dst=...)</div><div>    at ofproto/ofproto-dpif.c:351</div><div>#2  0x000000000043e74e in do_xlate_actions (ofpacts=ofpacts@entry=0x92f1b8, ofpacts_len=ofpacts_len@entry=56, </div><div>    ctx=ctx@entry=0x7ffff4a658a0) at ofproto/ofproto-dpif-xlate.c:4762</div><div>#3  0x0000000000443b3e in xlate_actions (xin=xin@entry=0x7ffff4a662c0, xout=xout@entry=0x7ffff4a84a90)</div><div>    at ofproto/ofproto-dpif-xlate.c:5586</div><div>#4  0x00000000004383f0 in upcall_xlate (wc=0x7ffff4a84ae8, odp_actions=0x7ffff4a84aa8, upcall=0x7ffff4a84a30, udpif=0x83dab0)</div><div>    at ofproto/ofproto-dpif-upcall.c:1109</div><div>#5  process_upcall (udpif=udpif@entry=0x83dab0, upcall=upcall@entry=0x7ffff4a84a30, odp_actions=odp_actions@entry=0x7ffff4a84aa8, </div><div>    wc=wc@entry=0x7ffff4a84ae8) at ofproto/ofproto-dpif-upcall.c:1246</div><div>#6  0x0000000000438ece in recv_upcalls (handler=0x9072d0, handler=0x9072d0) at ofproto/ofproto-dpif-upcall.c:817</div><div>#7  0x000000000043933a in udpif_upcall_handler (arg=0x9072d0) at ofproto/ofproto-dpif-upcall.c:739</div><div>#8  0x00000000004ca7e4 in ovsthread_wrapper (aux_=&lt;optimized out&gt;) at lib/ovs-thread.c:342</div><div>#9  0x00007ffff758b184 in start_thread (arg=0x7ffff4aa3700) at pthread_create.c:312</div><div>#10 0x00007ffff6da9ffd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111</div></div><div><br></div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><div style="color:rgb(136,136,136)"><font style="outline:none"><font style="outline:none"><span style="outline:none"><font color="#000000"><span style="line-height:19.1875px"><font face="georgia, serif">Regards</font><font face="arial, helvetica, sans-serif">,</font></span></font></span></font></font></div><div style="color:rgb(136,136,136)"><font size="3" color="#444444" face="trebuchet ms, sans-serif"><span style="line-height:19.1875px"><b>Rahul Sharma</b></span></font></div><h3 style="margin:0px;padding-top:0px;padding-right:0px;padding-left:0px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap"><font face="times new roman, serif"><font style="color:rgb(136,136,136);font-size:13px;font-weight:normal;white-space:normal">5th Year</font></font></h3><h3 style="margin:0px;padding-top:0px;padding-right:0px;padding-left:0px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap"><font face="times new roman, serif"><font style="color:rgb(136,136,136);font-size:13px;font-weight:normal;white-space:normal">Master of Science (Hons), Physics</font></font></h3><h3 style="margin:0px;padding-top:0px;padding-right:0px;padding-left:0px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap"><span style="color:rgb(136,136,136);font-size:13px;font-weight:normal;white-space:normal;font-family:&quot;times new roman&quot;,serif">Bachelor of Engineering (Hons), Computer Science</span></h3><div><strong style="color:rgb(80,0,80);font-family:Calibri;font-size:12.8px"><font size="1"><span style="color:rgb(253,175,23);font-family:Arial,sans-serif">▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄</span><span style="color:rgb(117,195,233);font-family:Arial,sans-serif">▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄</span><span style="color:rgb(237,27,36);font-family:Arial,sans-serif">▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄</span></font></strong></div><div style="color:rgb(136,136,136)"><span style="line-height:1.2em;outline:none"><h3 style="font-size:12pt;padding-top:0px;padding-right:0px;padding-left:0px;line-height:normal;margin:0px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap"><span style="font-size:13px;outline:none"><span style="line-height:1.2em;outline:none"><span style="line-height:normal;outline:none"><div><div style="font-weight:normal;white-space:normal"><div style="font-family:arial"><div style="line-height:17px"><p style="line-height:20px;margin:0px;color:rgb(33,29,112)"><font face="arial, helvetica, sans-serif"><strong>Birla Institute of Technology &amp; Science,</strong> <b>Pilani</b></font></p></div></div></div></div><p style="font-weight:normal;white-space:normal;font-family:arial;margin:0px 0px 1.35em"><font face="arial, helvetica, sans-serif"><font color="#211d70"><span style="line-height:15px">Pilani Campus, Vidhya Vihar, Pilani, Rajasthan - 333 031, INDIA.</span></font></font></p></span></span></span></h3></span></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
</div></div><div hspace="streak-pt-mark" style="max-height:1px"><img alt="" style="width:0px;max-height:0px;overflow:hidden" src="https://mailfoogae.appspot.com/t?sender=acmFodWwua2VudUBnbWFpbC5jb20%3D&amp;type=zerocontent&amp;guid=5e35ffd1-00cf-4370-b8f0-e806b737420b"><font color="#ffffff" size="1">ᐧ</font></div>