diff mbox series

[ovs-dev,branch-22.03,1/5] ofctrl: Wakeup when entering S_UPDATE_FLOWS.

Message ID 20220808182845.2746916-1-mmichels@redhat.com
State Accepted
Headers show
Series [ovs-dev,branch-22.03,1/5] ofctrl: Wakeup when entering S_UPDATE_FLOWS. | expand

Checks

Context Check Description
ovsrobot/apply-robot success apply and check: success
ovsrobot/github-robot-_Build_and_Test success github build: passed
ovsrobot/github-robot-_ovn-kubernetes fail github build: failed

Commit Message

Mark Michelson Aug. 8, 2022, 6:28 p.m. UTC
From: Han Zhou <hzhou@ovn.org>

In theory it is possible that ovn-controller tried to install flows by
calling ofctrl_put() while ofctrl is at a state other than
S_UPDATE_FLOWS thus not able to install. So, when entering S_UPDATE_FLOWS,
we should immediately wakeup the main loop so that any pending flows
can be installed without being delayed.

Signed-off-by: Han Zhou <hzhou@ovn.org>
Acked-by: Mark Michelson <mmichels@redhat.com>
(cherry picked from commit fbb8e19313b59b7b05a7a7bd97900bd4c9ace694)
---
 controller/ofctrl.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Numan Siddique Aug. 9, 2022, 2:32 a.m. UTC | #1
On Tue, Aug 9, 2022 at 4:29 AM Mark Michelson <mmichels@redhat.com> wrote:
>
> From: Han Zhou <hzhou@ovn.org>
>
> In theory it is possible that ovn-controller tried to install flows by
> calling ofctrl_put() while ofctrl is at a state other than
> S_UPDATE_FLOWS thus not able to install. So, when entering S_UPDATE_FLOWS,
> we should immediately wakeup the main loop so that any pending flows
> can be installed without being delayed.
>
> Signed-off-by: Han Zhou <hzhou@ovn.org>
> Acked-by: Mark Michelson <mmichels@redhat.com>
> (cherry picked from commit fbb8e19313b59b7b05a7a7bd97900bd4c9ace694)


I applied all the patches in this series to branch-22.03.

Numan

> ---
>  controller/ofctrl.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/controller/ofctrl.c b/controller/ofctrl.c
> index 3b9d71733..4f4c71cc8 100644
> --- a/controller/ofctrl.c
> +++ b/controller/ofctrl.c
> @@ -669,6 +669,10 @@ run_S_CLEAR_FLOWS(void)
>      }
>
>      state = S_UPDATE_FLOWS;
> +
> +    /* Give a chance for the main loop to call ofctrl_put() in case there were
> +     * pending flows waiting ofctrl state change to S_UPDATE_FLOWS. */
> +    poll_immediate_wake();
>  }
>
>  static void
> --
> 2.37.1
>
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
diff mbox series

Patch

diff --git a/controller/ofctrl.c b/controller/ofctrl.c
index 3b9d71733..4f4c71cc8 100644
--- a/controller/ofctrl.c
+++ b/controller/ofctrl.c
@@ -669,6 +669,10 @@  run_S_CLEAR_FLOWS(void)
     }
 
     state = S_UPDATE_FLOWS;
+
+    /* Give a chance for the main loop to call ofctrl_put() in case there were
+     * pending flows waiting ofctrl state change to S_UPDATE_FLOWS. */
+    poll_immediate_wake();
 }
 
 static void