[ovs-discuss] Updating Flow Counters with every packet (Help with the source code)

Rahul Sharma rahul.kenu at gmail.com
Mon Sep 18 18:50:20 UTC 2017


Hello,

I have noticed that when there are a lot of packets in the network, OVS
doesn't update the flow counters with every packet, rather it updates the
counter in batches.

Changing the values of  UPCALL_MAX_BATCH and REVALIDATE_MAX_BATCH  in
ofproto/ofproto-dpif-upcall.c  seems to affect it a bit but I still get the
instances where it happens.

Can someone help me regarding how I could achieve this?

The following are the stack-traces when it happens:

#0  rule_dpif_credit_stats (rule=0x98a900, stats=0x7ffff5aa2970) at
ofproto/ofproto-dpif.c:4024
#1  0x000000000044bbe9 in xlate_push_stats_entry
(entry=entry at entry=0x7ffff00029f8,
stats=stats at entry=0x7ffff5aa2970) at ofproto/ofproto-dpif-xlate-cache.c:106
#2  0x000000000044be0f in xlate_push_stats (xcache=<optimized out>,
stats=stats at entry=0x7ffff5aa2970) at ofproto/ofproto-dpif-xlate-cache.c:187
#3  0x000000000043af90 in push_dp_ops (udpif=udpif at entry=0x873a20,
ops=ops at entry=0x7ffff5aa32f0, n_ops=n_ops at entry=1) at
ofproto/ofproto-dpif-upcall.c:2257
#4  0x000000000043b0c5 in push_ukey_ops (udpif=udpif at entry=0x873a20,
umap=umap at entry=0x84d600, ops=ops at entry=0x7ffff5aa32f0, n_ops=n_ops at entry=1)
at ofproto/ofproto-dpif-upcall.c:2290
#5  0x000000000043c616 in revalidator_sweep__
(revalidator=revalidator at entry=0x936690,
purge=true) at ofproto/ofproto-dpif-upcall.c:2545
#6  0x000000000043e4cb in revalidator_sweep (revalidator=0x936690) at
ofproto/ofproto-dpif-upcall.c:2556
#7  udpif_revalidator (arg=0x936690) at ofproto/ofproto-dpif-upcall.c:913
#8  0x00000000004e15e4 in ovsthread_wrapper (aux_=<optimized out>) at
lib/ovs-thread.c:348
#9  0x00007ffff758b184 in start_thread (arg=0x7ffff5aa5700) at
pthread_create.c:312
#10 0x00007ffff6da9ffd in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:111




#0  rule_dpif_credit_stats (rule=0x922f20, stats=0x7ffff5aa0f10) at
ofproto/ofproto-dpif.c:4024
#1  0x000000000044bbe9 in xlate_push_stats_entry
(entry=entry at entry=0x7ffff00025f8,
stats=stats at entry=0x7ffff5aa0f10) at ofproto/ofproto-dpif-xlate-cache.c:106
#2  0x000000000044be0f in xlate_push_stats (xcache=<optimized out>,
stats=stats at entry=0x7ffff5aa0f10) at ofproto/ofproto-dpif-xlate-cache.c:187
#3  0x000000000043b5c4 in revalidate_ukey (udpif=udpif at entry=0x873a20,
ukey=ukey at entry=0x7fffec00d350, stats=stats at entry=0x7ffff5aa1e38,
odp_actions=odp_actions at entry=0x7ffff5aa1020, reval_seq=reval_seq at entry=80317,
recircs=recircs at entry=0x7ffff5aa1010) at ofproto/ofproto-dpif-upcall.c:2149
#4  0x000000000043e3b3 in revalidate (revalidator=0x936690) at
ofproto/ofproto-dpif-upcall.c:2437
#5  0x000000000043e4bb in udpif_revalidator (arg=0x936690) at
ofproto/ofproto-dpif-upcall.c:909
#6  0x00000000004e15e4 in ovsthread_wrapper (aux_=<optimized out>) at
lib/ovs-thread.c:348
#7  0x00007ffff758b184 in start_thread (arg=0x7ffff5aa5700) at
pthread_create.c:312
#8  0x00007ffff6da9ffd in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:111



Thanks,



-- 
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/20170919/3cbc4d4f/attachment-0001.html>


More information about the discuss mailing list