Skip to content

Commit

Permalink
Avoid redundant Openflow messages when syncing an updated group to OVS
Browse files Browse the repository at this point in the history
Fix #4159

This PR fix the issue by appending buckets directly in `Done()` in
pkg/ovs/openflow/ofctrl_group.go instead of calling `AddBuckets` method
of `Group` defined in the ofnet which sends an Openflow message to install
the group.

Signed-off-by: Hongliang Liu <lhongliang@vmware.com>
  • Loading branch information
hongliangl committed Aug 29, 2022
1 parent 3d74de2 commit 26816f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/ovs/openflow/ofctrl_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,6 @@ func (b *bucketBuilder) Weight(val uint16) BucketBuilder {
}

func (b *bucketBuilder) Done() Group {
b.group.ofctrl.AddBuckets(b.bucket)
b.group.ofctrl.Buckets = append(b.group.ofctrl.Buckets, b.bucket)
return b.group
}

0 comments on commit 26816f6

Please sign in to comment.