From 0329dcbeedab6a9bbd81d7ea49f141839f296827 Mon Sep 17 00:00:00 2001 From: Hongliang Liu <75655411+hongliangl@users.noreply.github.com> Date: Tue, 30 Aug 2022 23:10:08 +0800 Subject: [PATCH] Avoid redundant Openflow messages when syncing an updated group to OVS (#4164) 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 --- pkg/ovs/openflow/ofctrl_group.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/ovs/openflow/ofctrl_group.go b/pkg/ovs/openflow/ofctrl_group.go index 5b78a639d81..cd0aca21709 100644 --- a/pkg/ovs/openflow/ofctrl_group.go +++ b/pkg/ovs/openflow/ofctrl_group.go @@ -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 }