Update on this issue. I tried to dump messages from the kernel to figure out the problem.
So I dumped the both datapath flow keys, the masked flow (matching flow in the kernel datapath) key as well as the calculated index for the mask array. The results are as following: [83814.564092] index: 2 key src: 10.3.13.10 dst: 81.19.29.23 dp key src: 10.0.0.0 dp key dst: 81.0.0.0 [83814.564096] index: 2 key src: 10.3.13.10 dst: 81.19.29.23 dp key src: 10.0.0.0 dp key dst: 81.0.0.0 [83815.277632] index: 2 key src: 10.3.13.10 dst: 81.19.18.34 dp key src: 10.0.0.0 dp key dst: 81.0.0.0 [83815.277643] index: 2 key src: 10.3.13.10 dst: 81.19.18.34 dp key src: 10.0.0.0 dp key dst: 81.0.0.0 [83816.721153] index: 1 key src: 10.3.13.10 dst: 81.19.29.23 dp key src: 0.0.0.0 dp key dst: 64.0.0.0 [83816.721158] index: 1 key src: 10.3.13.10 dst: 81.19.29.23 dp key src: 0.0.0.0 dp key dst: 64.0.0.0 From these information, it seems that there is something wrong with either the hash calculation or the indexing mechanism. I will continue looking into this. But please keep me in the loop if you could help identify the problem. Thanks, An ________________________________ 发件人: awan...@masonlive.gmu.edu 发送时间: 2016年8月1日 19:51:36 收件人: Bodireddy, Bhanuprakash; discuss@openvswitch.org 主题: 答复: help - ovs 2.5 flow statistics issues Hi, Bhanu, Thank you for your response! I tried it with the master branch and it works! I guess it is a problem with the 2.5.0 version. But I noticed that the statistics are actually wrong in my case even though I could see the counts. Could you please help verify if you have obtained accurate results for your case? Thanks, An ________________________________ 发件人: Bodireddy, Bhanuprakash <bhanuprakash.bodire...@intel.com> 发送时间: 2016年8月1日 15:59:13 收件人: awan...@masonlive.gmu.edu; discuss@openvswitch.org 主题: RE: help - ovs 2.5 flow statistics issues >-----Original Message----- >From: discuss [mailto:discuss-boun...@openvswitch.org] On Behalf Of >awan...@masonlive.gmu.edu >Sent: Wednesday, July 27, 2016 3:14 PM >To: discuss@openvswitch.org >Subject: [ovs-discuss] help - ovs 2.5 flow statistics issues > >Hi, All, > >I am running openvswitch 2.5.0 on Ubuntu 14.04 LTS with kernel 3.13.0-92- >generic. >I installed the two following rules to the switch: > >NXST_FLOW reply (xid=0x4): > cookie=0x0, duration=2.183s, table=0, n_packets=0, n_bytes=0, idle_age=2, >priority=50000,ip,in_port=1,nw_src=10.0.0.0/8,nw_dst=81.0.0.0/8 >actions=output:2 > cookie=0x0, duration=10.829s, table=0, n_packets=0, n_bytes=0, >idle_age=10, in_port=1 actions=output:2 > >Another host machine connecting to the switch generates traffic (including >10.0.0.0/8 -> 81.0.0.0/8) that goes through the switch. >However, the statistics were not be updated correctly with n_packets for the >higher priority rule remaining 0 while all the traffic statistics being >credited to >the lower priority rule. >But if I modify the rules to be: > >NXST_FLOW reply (xid=0x4): > cookie=0x0, duration=2.183s, table=0, n_packets=0, n_bytes=0, idle_age=2, >priority=50000,ip,in_port=1,nw_src=10.0.0.0/8 actions=output:2 > cookie=0x0, duration=10.829s, table=0, n_packets=0, n_bytes=0, >idle_age=10, in_port=1 actions=output:2 > >Then it works fine. So it seems that statistics with both nw_src and nw_dst >matching do not work properly? I don't see an issue matching both nw_src & nw_dst and can see the 'n_packets', 'n_bytes' entry incremented for all matching packets. I quickly verified this on master branch. NXST_FLOW reply (xid=0x4): cookie=0x0, duration=430.063s, table=0, n_packets=2109130027, n_bytes=126547801620, idle_age=9, priority=50000,ip,in_port=1,nw_src=2.0.0.0/8,nw_dst=3.0.0.0/8 actions=output:2 cookie=0x0, duration=428.842s, table=0, n_packets=0, n_bytes=0, idle_age=428, in_port=1 actions=output:2 Regards, Bhanu Prakash. Or did I misconfigure something? >I'd really appreciate your help! > >Thanks, >An
_______________________________________________ discuss mailing list discuss@openvswitch.org http://openvswitch.org/mailman/listinfo/discuss