<div dir="ltr">Hi everyone,<br><br>I just downloaded the latest OVS release (2.7.1) but unfortunately I am still able to reproduce the issue.<br>It seems to be an OVS-specific issue since the reference count is reported correctly on other OF-DPA based hardware switches.<br>Any thought?<br><br>Thanks,<br>Charles<br><br><div class="gmail_quote"><div dir="ltr">On Mon, Jun 19, 2017 at 4:46 PM Charles Chan &lt;<a href="mailto:charles@onlab.us">charles@onlab.us</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi everyone,</div><div><br></div><div>I noticed a strange behavior of group reference count in ovs 2.7.0 and therefore I am writing to confirm if this is expected.</div><div><br></div><div>I created 2 indirect groups and 1 select group. There are 2 buckets in the select group, each of them points to one of the indirect group.</div><div><font face="monospace">sudo ovs-ofctl -O OpenFlow13 dump-groups ovs-br</font></div><div><font face="monospace">OFPST_GROUP_DESC reply (OF1.3) (xid=0x2):</font></div><div><font face="monospace">group_id=201,type=indirect,bucket=actions=output:1</font></div><div><font face="monospace">group_id=202,type=indirect,bucket=actions=output:2</font></div><div><font face="monospace">group_id=101,type=select,<b>bucket=actions=group:201,bucket=actions=group:202</b></font></div><div><br></div><div>I also created a flow that points to the select group.</div><div><font face="monospace">sudo ovs-ofctl -O OpenFlow13 dump-flows ovs-br</font></div><div><font face="monospace">OFPST_FLOW reply (OF1.3) (xid=0x2):</font></div><div><font face="monospace"> cookie=0x0, duration=31.409s, table=0, n_packets=0, n_bytes=0, vlan_tci=0x000a/0x1fff actions=group:101</font></div><div><font face="monospace"> cookie=0x0, duration=275.500s, table=0, n_packets=0, n_bytes=0, priority=0 actions=NORMAL</font></div><div><br></div><div>However, the reference count of these 2 indirect groups are both zero.</div><div><font face="monospace">sudo ovs-ofctl -O OpenFlow13 dump-group-stats ovs-br</font></div><div><font face="monospace">OFPST_GROUP reply (OF1.3) (xid=0x2):</font></div><div><font face="monospace"> group_id=201,duration=185.249s,<b>ref_count=0</b>,packet_count=0,byte_count=0,bucket0:packet_count=0,byte_count=0</font></div><div><font face="monospace"> group_id=202,duration=159.981s,<b>ref_count=0</b>,packet_count=0,byte_count=0,bucket0:packet_count=0,byte_count=0</font></div><div><font face="monospace"> group_id=101,duration=111.349s,ref_count=1,packet_count=0,byte_count=0,bucket0:packet_count=0,byte_count=0,bucket1:packet_count=0,byte_count=0</font></div><div><br></div><div>I further looked up OF 1.3 spec and discovered this description in the section of OFPMP_GROUP.</div><div><font face="monospace">uint32_t ref_count; /* Number of <b>flows or groups that directly forward to this group</b>. */</font></div><div>According to my interpretation of the spec, the reference count of these indirect groups should both be 1 instead of 0 since they are referenced by the select group.</div><div><br></div><div>This can be easily reproduced by following steps.</div><div><font face="monospace">sudo ovs-vsctl add-br ovs-br</font></div><div><font face="monospace">sudo ovs-ofctl -O OpenFlow13 add-group ovs-br group_id=201,type=indirect,bucket=actions=output:1</font></div><div><font face="monospace">sudo ovs-ofctl -O OpenFlow13 add-group ovs-br group_id=202,type=indirect,bucket=actions=output:2</font></div><div><font face="monospace">sudo ovs-ofctl -O OpenFlow13 add-group ovs-br group_id=101,type=select,bucket=actions=group:201,bucket=actions=group:202</font></div><div><font face="monospace">sudo ovs-ofctl -O OpenFlow13 add-flow ovs-br vlan_vid=10,actions=group:101</font></div><div><br></div><div>I installed OVS from the 2.7.0 tarball. This is the version I am using.</div><div><font face="monospace">sudo ovs-vsctl --version</font></div><div><font face="monospace">ovs-vsctl (Open vSwitch) 2.7.0</font></div><div><font face="monospace">DB Schema 7.14.0</font></div><div><br></div><div>Thanks,</div><div>Charles</div></div><div dir="ltr">-- <br></div><div data-smartmail="gmail_signature"><div dir="ltr">





<p class="m_2966793928758286225inbox-inbox-inbox-inbox-inbox-inbox-inbox-inbox-inbox-inbox-inbox-inbox-p1"><span class="m_2966793928758286225inbox-inbox-inbox-inbox-inbox-inbox-inbox-inbox-inbox-inbox-inbox-inbox-s1">Charles Chan<br></span>Member of Technical Staff, ON.Lab<br>Member of Ambassador Steering Team, ONOS/CORD Community</p></div></div></blockquote></div></div><div dir="ltr">-- <br></div><div data-smartmail="gmail_signature"><div dir="ltr">





<p class="inbox-inbox-inbox-inbox-inbox-inbox-inbox-inbox-inbox-inbox-inbox-inbox-inbox-inbox-inbox-inbox-p1"><span class="inbox-inbox-inbox-inbox-inbox-inbox-inbox-inbox-inbox-inbox-inbox-inbox-inbox-inbox-inbox-inbox-inbox-inbox-s1">Charles Chan<br></span>Member of Technical Staff, ONF<br>Member of Ambassador Steering Team, ONOS/CORD Community<br></p></div></div>