[ovs-discuss] New Action getting executed when traffic is generated (Understanding revalidate in ofproto-dpif-upcall.c)

Rahul Sharma rahul.kenu at gmail.com
Sat Sep 2 19:16:13 UTC 2017


Hello,

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.

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.

Below are the stack traces of two executions of the action (one of which I
suppose is because of the action being restarted)

#0  handle_port_stats_request_from_ofproto_dpif (connmgr=0x85ed50, port=2,
dst=...) at ofproto/ofproto.c:379
#1  0x000000000042b744 in handle_port_stats_request_from_xlate
(ofproto=<optimized out>, port=<optimized out>, dst=...)
    at ofproto/ofproto-dpif.c:351
#2  0x000000000043e74e in do_xlate_actions (ofpacts=ofpacts at entry=0x85c458,
ofpacts_len=ofpacts_len at entry=8,
    ctx=ctx at entry=0x7ffff529f260) at ofproto/ofproto-dpif-xlate.c:4762
#3  0x0000000000443b3e in xlate_actions (xin=xin at entry=0x7ffff529fdf0,
xout=xout at entry=0x7ffff529f6c0)
    at ofproto/ofproto-dpif-xlate.c:5586
#4  0x0000000000436888 in revalidate_ukey (udpif=udpif at entry=0x85f2f0,
ukey=ukey at entry=0x7fffec00fa30,
    stats=stats at entry=0x7ffff52a1020,
odp_actions=odp_actions at entry=0x7ffff52a01b0,
reval_seq=reval_seq at entry=23934,
    recircs=recircs at entry=0x7ffff52a01a0) at
ofproto/ofproto-dpif-upcall.c:1919
#5  0x00000000004398b1 in revalidate (revalidator=0x852a20) at
ofproto/ofproto-dpif-upcall.c:2252
#6  0x0000000000439b00 in udpif_revalidator (arg=0x852a20) at
ofproto/ofproto-dpif-upcall.c:901
#7  0x00000000004ca7e4 in ovsthread_wrapper (aux_=<optimized out>) at
lib/ovs-thread.c:342
#8  0x00007ffff758b184 in start_thread (arg=0x7ffff52a4700) at
pthread_create.c:312
#9  0x00007ffff6da9ffd in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:111

#0  handle_port_stats_request_from_ofproto_dpif (connmgr=0x88c150, port=6,
dst=...) at ofproto/ofproto.c:379
#1  0x000000000042b744 in handle_port_stats_request_from_xlate
(ofproto=<optimized out>, port=<optimized out>, dst=...)
    at ofproto/ofproto-dpif.c:351
#2  0x000000000043e74e in do_xlate_actions (ofpacts=ofpacts at entry=0x92f1b8,
ofpacts_len=ofpacts_len at entry=56,
    ctx=ctx at entry=0x7ffff4a658a0) at ofproto/ofproto-dpif-xlate.c:4762
#3  0x0000000000443b3e in xlate_actions (xin=xin at entry=0x7ffff4a662c0,
xout=xout at entry=0x7ffff4a84a90)
    at ofproto/ofproto-dpif-xlate.c:5586
#4  0x00000000004383f0 in upcall_xlate (wc=0x7ffff4a84ae8,
odp_actions=0x7ffff4a84aa8, upcall=0x7ffff4a84a30, udpif=0x83dab0)
    at ofproto/ofproto-dpif-upcall.c:1109
#5  process_upcall (udpif=udpif at entry=0x83dab0,
upcall=upcall at entry=0x7ffff4a84a30,
odp_actions=odp_actions at entry=0x7ffff4a84aa8,
    wc=wc at entry=0x7ffff4a84ae8) at ofproto/ofproto-dpif-upcall.c:1246
#6  0x0000000000438ece in recv_upcalls (handler=0x9072d0, handler=0x9072d0)
at ofproto/ofproto-dpif-upcall.c:817
#7  0x000000000043933a in udpif_upcall_handler (arg=0x9072d0) at
ofproto/ofproto-dpif-upcall.c:739
#8  0x00000000004ca7e4 in ovsthread_wrapper (aux_=<optimized out>) at
lib/ovs-thread.c:342
#9  0x00007ffff758b184 in start_thread (arg=0x7ffff4aa3700) at
pthread_create.c:312
#10 0x00007ffff6da9ffd in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:111


-- 
Regards,
*Rahul Sharma*
5th YearMaster of Science (Hons), PhysicsBachelor of Engineering (Hons),
Computer Science
*▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄*

*Birla Institute of Technology & Science,* *Pilani*

Pilani Campus, Vidhya Vihar, Pilani, Rajasthan - 333 031, INDIA.
ᐧ
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-discuss/attachments/20170903/2f9dc3b1/attachment-0001.html>


More information about the discuss mailing list