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 <[email protected]>
  • Loading branch information
hongliangl committed Aug 29, 2022
1 parent 0aad945 commit 9ac0d44
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 9ac0d44

Please sign in to comment.