diff mbox series

[ovs-dev] pinctrl: fix ovn-controller abort when service start.

Message ID 20220715061108.609594-1-wangchuanlei@inspur.com
State Accepted
Headers show
Series [ovs-dev] pinctrl: fix ovn-controller abort when service start. | expand

Commit Message

wangchuanlei July 15, 2022, 6:11 a.m. UTC
Hi,
    when start service ovn-controller, the br-int may be not connected, in case, swconn->version = -1,
    on my enviroment, i have loadlalancer, in the process of  sending health check packet,  ofp_proto is 0, which will leads controller serivice to  abort in ofputil_encode_packet_out.
So this patch is to avoid this problem.

Signed-off-by: wangchuanlei <wangchuanlei@inspur.com>
---
 controller/pinctrl.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Numan Siddique July 19, 2022, 5:25 p.m. UTC | #1
On Fri, Jul 15, 2022 at 8:35 AM wangchuanlei <wangchuanlei@inspur.com> wrote:
>
> Hi,
>     when start service ovn-controller, the br-int may be not connected, in case, swconn->version = -1,
>     on my enviroment, i have loadlalancer, in the process of  sending health check packet,  ofp_proto is 0, which will leads controller serivice to  abort in ofputil_encode_packet_out.
> So this patch is to avoid this problem.
>
> Signed-off-by: wangchuanlei <wangchuanlei@inspur.com>

Thanks for the patch.

I applied this patch to the main branch and backported to
branch-22.06.  I will be backporting to branch-22.03 soon (running
tests).

Before applying I modified the commit message a bit and also added
your name to the AUTHORS.rst file.

Num
> ---
>  controller/pinctrl.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/controller/pinctrl.c b/controller/pinctrl.c
> index f954362b7..2fcf91bc9 100644
> --- a/controller/pinctrl.c
> +++ b/controller/pinctrl.c
> @@ -3454,11 +3454,11 @@ pinctrl_handler(void *arg_)
>
>                  ip_mcast_querier_run(swconn, &send_mcast_query_time);
>              }
> -        }
>
> -        ovs_mutex_lock(&pinctrl_mutex);
> -        svc_monitors_run(swconn, &svc_monitors_next_run_time);
> -        ovs_mutex_unlock(&pinctrl_mutex);
> +            ovs_mutex_lock(&pinctrl_mutex);
> +            svc_monitors_run(swconn, &svc_monitors_next_run_time);
> +            ovs_mutex_unlock(&pinctrl_mutex);
> +        }
>
>          rconn_run_wait(swconn);
>          rconn_recv_wait(swconn);
> --
> 2.27.0
>
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
diff mbox series

Patch

diff --git a/controller/pinctrl.c b/controller/pinctrl.c
index f954362b7..2fcf91bc9 100644
--- a/controller/pinctrl.c
+++ b/controller/pinctrl.c
@@ -3454,11 +3454,11 @@  pinctrl_handler(void *arg_)
 
                 ip_mcast_querier_run(swconn, &send_mcast_query_time);
             }
-        }
 
-        ovs_mutex_lock(&pinctrl_mutex);
-        svc_monitors_run(swconn, &svc_monitors_next_run_time);
-        ovs_mutex_unlock(&pinctrl_mutex);
+            ovs_mutex_lock(&pinctrl_mutex);
+            svc_monitors_run(swconn, &svc_monitors_next_run_time);
+            ovs_mutex_unlock(&pinctrl_mutex);
+        }
 
         rconn_run_wait(swconn);
         rconn_recv_wait(swconn);