[ovs-discuss] Question regarding group reference count

Charles Chan charles at onlab.us
Mon Jun 19 23:46:57 UTC 2017

Hi everyone,

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.

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.
sudo ovs-ofctl -O OpenFlow13 dump-groups ovs-br
OFPST_GROUP_DESC reply (OF1.3) (xid=0x2):

I also created a flow that points to the select group.
sudo ovs-ofctl -O OpenFlow13 dump-flows ovs-br
OFPST_FLOW reply (OF1.3) (xid=0x2):
 cookie=0x0, duration=31.409s, table=0, n_packets=0, n_bytes=0,
vlan_tci=0x000a/0x1fff actions=group:101
 cookie=0x0, duration=275.500s, table=0, n_packets=0, n_bytes=0, priority=0

However, the reference count of these 2 indirect groups are both zero.
sudo ovs-ofctl -O OpenFlow13 dump-group-stats ovs-br
OFPST_GROUP reply (OF1.3) (xid=0x2):

I further looked up OF 1.3 spec and discovered this description in the
section of OFPMP_GROUP.
uint32_t ref_count; /* Number of *flows or groups that directly forward to
this group*. */
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.

This can be easily reproduced by following steps.
sudo ovs-vsctl add-br ovs-br
sudo ovs-ofctl -O OpenFlow13 add-group ovs-br
sudo ovs-ofctl -O OpenFlow13 add-group ovs-br
sudo ovs-ofctl -O OpenFlow13 add-group ovs-br
sudo ovs-ofctl -O OpenFlow13 add-flow ovs-br vlan_vid=10,actions=group:101

I installed OVS from the 2.7.0 tarball. This is the version I am using.
sudo ovs-vsctl --version
ovs-vsctl (Open vSwitch) 2.7.0
DB Schema 7.14.0


Charles Chan
Member of Technical Staff, ON.Lab
Member of Ambassador Steering Team, ONOS/CORD Community
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-discuss/attachments/20170619/aa514138/attachment.html>

More information about the discuss mailing list