[ovs-discuss] Question regarding group reference count

Charles Chan charles at onlab.us
Thu Jul 6 21:37:49 UTC 2017

Hi everyone,

I just downloaded the latest OVS release (2.7.1) but unfortunately I am
still able to reproduce the issue.
It seems to be an OVS-specific issue since the reference count is reported
correctly on other OF-DPA based hardware switches.
Any thought?


On Mon, Jun 19, 2017 at 4:46 PM Charles Chan <charles at onlab.us> wrote:

> 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):
> group_id=201,type=indirect,bucket=actions=output:1
> group_id=202,type=indirect,bucket=actions=output:2
> group_id=101,type=select,
> *bucket=actions=group:201,bucket=actions=group:202*
> 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 actions=NORMAL
> 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):
>  group_id=201,duration=185.249s,*ref_count=0*
> ,packet_count=0,byte_count=0,bucket0:packet_count=0,byte_count=0
>  group_id=202,duration=159.981s,*ref_count=0*
> ,packet_count=0,byte_count=0,bucket0:packet_count=0,byte_count=0
>  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
> 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
> group_id=201,type=indirect,bucket=actions=output:1
> sudo ovs-ofctl -O OpenFlow13 add-group ovs-br
> group_id=202,type=indirect,bucket=actions=output:2
> sudo ovs-ofctl -O OpenFlow13 add-group ovs-br
> group_id=101,type=select,bucket=actions=group:201,bucket=actions=group:202
> 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
> Thanks,
> Charles
> --
> Charles Chan
> Member of Technical Staff, ON.Lab
> Member of Ambassador Steering Team, ONOS/CORD Community

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

More information about the discuss mailing list