When introducing the feature ovn-ofctrl-wait-before-clear, a new state
WAIT_BEFORE_CLEAR is added before CLEAR_FLOWS. In the WAIT_BEFORE_CLEAR
state the mff_ovn_geneve is already available. However, the function
ofctrl_get_mf_field_id() was not updated, and still returns 0 when the
state is WAIT_BEFORE_CLEAR, and will return the actual id when state
becomes CLEAR_FLOWS. This results in the I-P engine node
en_mff_ovn_geneve update, which triggers a recompute of the
physical_flow_output node, while this recompute could have happened
earlier in the WAIT_BEFORE_CLEAR state.
Although physical_flow_output recompute is not as heavy as
logical_flow_output recompute, it is still inefficient. This is a miss
from the ovn-ofctrl-wait-before-clear patch.
Fixes: 896adfd2d8b3 ("ofctrl: Support ovn-ofctrl-wait-before-clear to reduce
down time during upgrade.")
Signed-off-by: Han Zhou <[email protected]>
---
controller/ofctrl.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/controller/ofctrl.c b/controller/ofctrl.c
index 432fe2d37..54b75b3ac 100644
--- a/controller/ofctrl.c
+++ b/controller/ofctrl.c
@@ -756,7 +756,9 @@ ofctrl_get_mf_field_id(void)
if (!rconn_is_connected(swconn)) {
return 0;
}
- return (state == S_CLEAR_FLOWS || state == S_UPDATE_FLOWS
+ return (state == S_WAIT_BEFORE_CLEAR
+ || state == S_CLEAR_FLOWS
+ || state == S_UPDATE_FLOWS
? mff_ovn_geneve : 0);
}
--
2.30.2
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev