From patchwork Thu Jun 8 14:15:55 2023
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Vladislav Odintsov
X-Patchwork-Id: 1792334
Return-Path:
X-Original-To: incoming@patchwork.ozlabs.org
Delivered-To: patchwork-incoming@legolas.ozlabs.org
Authentication-Results: legolas.ozlabs.org;
spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org
(client-ip=140.211.166.137; helo=smtp4.osuosl.org;
envelope-from=ovs-dev-bounces@openvswitch.org; receiver=)
Authentication-Results: legolas.ozlabs.org;
dkim=fail reason="signature verification failed" (2048-bit key;
unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256
header.s=20221208 header.b=ACmBHGqK;
dkim-atps=neutral
Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384)
(No client certificate requested)
by legolas.ozlabs.org (Postfix) with ESMTPS id 4QcR8S08jhz20WP
for ; Fri, 9 Jun 2023 00:16:08 +1000 (AEST)
Received: from localhost (localhost [127.0.0.1])
by smtp4.osuosl.org (Postfix) with ESMTP id E99F142075;
Thu, 8 Jun 2023 14:16:05 +0000 (UTC)
DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org E99F142075
Authentication-Results: smtp4.osuosl.org;
dkim=fail reason="signature verification failed" (2048-bit key)
header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20221208
header.b=ACmBHGqK
X-Virus-Scanned: amavisd-new at osuosl.org
Received: from smtp4.osuosl.org ([127.0.0.1])
by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id 7CPC85jSp1pS; Thu, 8 Jun 2023 14:16:04 +0000 (UTC)
Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56])
by smtp4.osuosl.org (Postfix) with ESMTPS id 953ED41FC6;
Thu, 8 Jun 2023 14:16:03 +0000 (UTC)
DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 953ED41FC6
Received: from lf-lists.osuosl.org (localhost [127.0.0.1])
by lists.linuxfoundation.org (Postfix) with ESMTP id 6FCF8C0037;
Thu, 8 Jun 2023 14:16:03 +0000 (UTC)
X-Original-To: dev@openvswitch.org
Delivered-To: ovs-dev@lists.linuxfoundation.org
Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136])
by lists.linuxfoundation.org (Postfix) with ESMTP id 37BC5C0029
for ; Thu, 8 Jun 2023 14:16:02 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
by smtp3.osuosl.org (Postfix) with ESMTP id 127DC60F72
for ; Thu, 8 Jun 2023 14:16:02 +0000 (UTC)
DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 127DC60F72
Authentication-Results: smtp3.osuosl.org;
dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com
header.a=rsa-sha256 header.s=20221208 header.b=ACmBHGqK
X-Virus-Scanned: amavisd-new at osuosl.org
Received: from smtp3.osuosl.org ([127.0.0.1])
by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id KwH34FDPsRlK for ;
Thu, 8 Jun 2023 14:16:01 +0000 (UTC)
X-Greylist: whitelisted by SQLgrey-1.8.0
DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org C114560B13
Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com
[IPv6:2a00:1450:4864:20::134])
by smtp3.osuosl.org (Postfix) with ESMTPS id C114560B13
for ; Thu, 8 Jun 2023 14:16:00 +0000 (UTC)
Received: by mail-lf1-x134.google.com with SMTP id
2adb3069b0e04-4f642a24568so807223e87.2
for ; Thu, 08 Jun 2023 07:16:00 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20221208; t=1686233758; x=1688825758;
h=content-transfer-encoding:mime-version:message-id:date:subject:cc
:to:from:from:to:cc:subject:date:message-id:reply-to;
bh=roSWwUEtatLnXFigWGRK2I9owxWZ4MTrL0DZqm1h4Wk=;
b=ACmBHGqKOScR7LEhUoUTxPCEoGxFcgQqHEBtbnLsPJY6VnGJcrK8F7FnEco1aJyWj4
gRfYl35esi4adQ8Np8vWHcouThCZjP/9BOcsZE+zJZ+ZjwIsEr08gL2YdRuCy0GWcqGj
vU3pYQ71aNNGTTiROUA1O8pxinJonVxpz8aCGCA1gucnjZ+xGtpdgEXgShVWvZAP2MP2
Yz6LE1cmWp/1NadxjEHvfZo417AItUklB4IzHJYlc1bPkpnaNys6tQ8qCksae+z3z/Oo
WRW3TlyzzfbWA/h2J3hubVJpcT9+J9roykk3A/nLPbNpZai5wQtcb5GQFgKeJb2pakC+
ePtw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20221208; t=1686233758; x=1688825758;
h=content-transfer-encoding:mime-version:message-id:date:subject:cc
:to:from:x-gm-message-state:from:to:cc:subject:date:message-id
:reply-to;
bh=roSWwUEtatLnXFigWGRK2I9owxWZ4MTrL0DZqm1h4Wk=;
b=Hr+ZLqAq4hb892x/HYODe/oZfJf7/BVJsH6bIZcg2biI8h+hDmdmxX1el2PTTz8DYl
e/EyubYFAkbd1FdH7HkV5KbmSZEW+5G+eLkC6IrywJsNuT9DzjPdffzOFd1n8txRWJcL
zrD7Ekefgk8m9PEePYeDDxOXYS4cNYgyscfgYSXeUX4oRqzS7OdEJDz8oJ2FrMlOGyPG
VN7OaUHQTMxPt6RP9M2gtnOUX9xhrYENNFwKHQODaLBwLorBBZ8/FA9sJOJBPGHKD/cu
AWT24/QJCSCQAa9yq1MLFl4RIEduOfXa37ouzsRF0i+C/fk5AGQelovyDxJa2tzCu+i5
a7bg==
X-Gm-Message-State: AC+VfDzAZ/zYNKRqywyVyh9xOA4WB+0I7TVQXIcWTiyeFabvIjy8sK8I
Bsbqka8HVBmksz2iTUZkrdvHQ4QdSpU=
X-Google-Smtp-Source:
ACHHUZ6E4SH8Ya0cc3jvuaLR2pNfxSZHTWEIShl5YWmx2v8QnxgCEmGgEgMuVeiT437KoAY3yrPIDg==
X-Received: by 2002:ac2:546d:0:b0:4f6:7f9:112e with SMTP id
e13-20020ac2546d000000b004f607f9112emr3211002lfn.11.1686233757811;
Thu, 08 Jun 2023 07:15:57 -0700 (PDT)
Received: from ip-10-70-112-12.vpc-1e810be1.internal
(c2-178-216-98-9.elastic.cloud.croc.ru. [178.216.98.9])
by smtp.gmail.com with ESMTPSA id
r13-20020ac25a4d000000b004f3a79c9e0fsm200566lfn.57.2023.06.08.07.15.57
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Thu, 08 Jun 2023 07:15:57 -0700 (PDT)
From: Vladislav Odintsov
To: dev@openvswitch.org
Date: Thu, 8 Jun 2023 17:15:55 +0300
Message-Id: <20230608141555.1339905-1-odivlad@gmail.com>
X-Mailer: git-send-email 2.36.1
MIME-Version: 1.0
Cc: Vladislav Odintsov
Subject: [ovs-dev] [PATCH ovn] controller: disable OpenFlow inactivity
probing
X-BeenThere: ovs-dev@openvswitch.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: ovs-dev-bounces@openvswitch.org
Sender: "dev"
OpenFlow connection is established over unix socket, which is a reliable
connection and doesn't require additional probing.
With this patch openflow probing in ovn-controller -> ovs-vswitchd
direction is disabled for all three connections:
- OF flows management connection,
- OF features negotiation connection,
- pinctrl connection.
ovn-controller external_ids:ovn-openflow-probe-interval is removed as
non-needed anymore.
Disablement for ovs-vswitchd -> ovn-controller OF inacivity probing will
be done in the next patch.
Reported-at: https://mail.openvswitch.org/pipermail/ovs-dev/2023-May/404625.html
Signed-off-by: Vladislav Odintsov
Acked-by: Dumitru Ceara
Acked-by: Han Zhou
---
NEWS | 5 +++++
controller/ofctrl.c | 14 ++------------
controller/ofctrl.h | 4 +---
controller/ovn-controller.8.xml | 14 --------------
controller/ovn-controller.c | 21 +--------------------
controller/pinctrl.c | 2 +-
lib/features.c | 7 ++-----
7 files changed, 12 insertions(+), 55 deletions(-)
diff --git a/NEWS b/NEWS
index 645acea1f..bd63b187b 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,10 @@
Post v23.06.0
-------------
+ - Disable OpenFlow inactivity probing between ovn-controller and OVS.
+ OF connection is established over unix socket, which is a reliable
+ connection method and doesn't require additional probing.
+ external_ids:ovn-openflow-probe-interval configuration option for
+ ovn-controller is no longer matter.
OVN v23.06.0 - 01 Jun 2023
--------------------------
diff --git a/controller/ofctrl.c b/controller/ofctrl.c
index 64a444ff6..788634494 100644
--- a/controller/ofctrl.c
+++ b/controller/ofctrl.c
@@ -415,11 +415,9 @@ static void ofctrl_recv(const struct ofp_header *, enum ofptype);
void
ofctrl_init(struct ovn_extend_table *group_table,
- struct ovn_extend_table *meter_table,
- int inactivity_probe_interval)
+ struct ovn_extend_table *meter_table)
{
- swconn = rconn_create(inactivity_probe_interval, 0,
- DSCP_DEFAULT, 1 << OFP15_VERSION);
+ swconn = rconn_create(0, 0, DSCP_DEFAULT, 1 << OFP15_VERSION);
tx_counter = rconn_packet_counter_create();
hmap_init(&installed_lflows);
hmap_init(&installed_pflows);
@@ -2986,14 +2984,6 @@ ofctrl_is_connected(void)
return rconn_is_connected(swconn);
}
-void
-ofctrl_set_probe_interval(int probe_interval)
-{
- if (swconn) {
- rconn_set_probe_interval(swconn, probe_interval);
- }
-}
-
void
ofctrl_get_memory_usage(struct simap *usage)
{
diff --git a/controller/ofctrl.h b/controller/ofctrl.h
index 105f9370b..46bfccd85 100644
--- a/controller/ofctrl.h
+++ b/controller/ofctrl.h
@@ -49,8 +49,7 @@ struct ovn_desired_flow_table {
/* Interface for OVN main loop. */
void ofctrl_init(struct ovn_extend_table *group_table,
- struct ovn_extend_table *meter_table,
- int inactivity_probe_interval);
+ struct ovn_extend_table *meter_table);
bool ofctrl_run(const struct ovsrec_bridge *br_int,
const struct ovsrec_open_vswitch_table *,
struct shash *pending_ct_zones);
@@ -142,7 +141,6 @@ void ofctrl_check_and_add_flow_metered(struct ovn_desired_flow_table *,
bool ofctrl_is_connected(void);
-void ofctrl_set_probe_interval(int probe_interval);
void ofctrl_get_memory_usage(struct simap *usage);
#endif /* controller/ofctrl.h */
diff --git a/controller/ovn-controller.8.xml b/controller/ovn-controller.8.xml
index f61f43008..52eb137d3 100644
--- a/controller/ovn-controller.8.xml
+++ b/controller/ovn-controller.8.xml
@@ -147,20 +147,6 @@
- external_ids:ovn-openflow-probe-interval
-
-
- The inactivity probe interval of the OpenFlow connection to the
- OpenvSwitch integration bridge, in seconds.
- If the value is zero, it disables the connection keepalive feature.
-
-
-
- If the value is nonzero, then it will be forced to a value of
- at least 5s.
-
-
-
external_ids:ovn-encap-type
diff --git a/controller/ovn-controller.c b/controller/ovn-controller.c
index 3a81a13fb..732e7a690 100644
--- a/controller/ovn-controller.c
+++ b/controller/ovn-controller.c
@@ -105,7 +105,6 @@ static unixctl_cb_func debug_ignore_startup_delay;
#define DEFAULT_BRIDGE_NAME "br-int"
#define DEFAULT_DATAPATH "system"
-#define OFCTRL_DEFAULT_PROBE_INTERVAL_SEC 0
#define CONTROLLER_LOOP_STOPWATCH_NAME "flow-generation"
#define OFCTRL_PUT_STOPWATCH_NAME "flow-installation"
@@ -556,22 +555,6 @@ update_ssl_config(const struct ovsrec_ssl_table *ssl_table)
}
}
-static int
-get_ofctrl_probe_interval(struct ovsdb_idl *ovs_idl)
-{
- const struct ovsrec_open_vswitch *cfg = ovsrec_open_vswitch_first(ovs_idl);
- if (!cfg) {
- return OFCTRL_DEFAULT_PROBE_INTERVAL_SEC;
- }
-
- const struct ovsrec_open_vswitch_table *ovs_table =
- ovsrec_open_vswitch_table_get(ovs_idl);
- const char *chassis_id = get_ovs_chassis_id(ovs_table);
- return get_chassis_external_id_value_int(
- &cfg->external_ids, chassis_id,
- "ovn-openflow-probe-interval", OFCTRL_DEFAULT_PROBE_INTERVAL_SEC);
-}
-
/* Retrieves the pointer to the OVN Southbound database from 'ovs_idl' and
* updates 'sbdb_idl' with that pointer. */
static void
@@ -4975,8 +4958,7 @@ main(int argc, char *argv[])
engine_get_internal_data(&en_lb_data);
ofctrl_init(&lflow_output_data->group_table,
- &lflow_output_data->meter_table,
- get_ofctrl_probe_interval(ovs_idl_loop.idl));
+ &lflow_output_data->meter_table);
ofctrl_seqno_init();
unixctl_command_register("group-table-list", "", 0, 0,
@@ -5104,7 +5086,6 @@ main(int argc, char *argv[])
&reset_ovnsb_idl_min_index,
&ctrl_engine_ctx, &ovnsb_expected_cond_seqno);
update_ssl_config(ovsrec_ssl_table_get(ovs_idl_loop.idl));
- ofctrl_set_probe_interval(get_ofctrl_probe_interval(ovs_idl_loop.idl));
struct ovsdb_idl_txn *ovnsb_idl_txn
= ovsdb_idl_loop_run(&ovnsb_idl_loop);
diff --git a/controller/pinctrl.c b/controller/pinctrl.c
index c396ad4c2..a86db3f32 100644
--- a/controller/pinctrl.c
+++ b/controller/pinctrl.c
@@ -3362,7 +3362,7 @@ pinctrl_handler(void *arg_)
static long long int svc_monitors_next_run_time = LLONG_MAX;
static long long int send_prefixd_time = LLONG_MAX;
- swconn = rconn_create(5, 0, DSCP_DEFAULT, 1 << OFP15_VERSION);
+ swconn = rconn_create(0, 0, DSCP_DEFAULT, 1 << OFP15_VERSION);
while (!latch_is_set(&pctrl->pinctrl_thread_exit)) {
long long int bfd_time = LLONG_MAX;
diff --git a/lib/features.c b/lib/features.c
index 97c9c86f0..ad3357570 100644
--- a/lib/features.c
+++ b/lib/features.c
@@ -28,11 +28,10 @@
#include "openvswitch/ofp-meter.h"
#include "openvswitch/ofp-util.h"
#include "ovn/features.h"
+#include "controller/ofctrl.h"
VLOG_DEFINE_THIS_MODULE(features);
-#define FEATURES_DEFAULT_PROBE_INTERVAL_SEC 5
-
struct ovs_feature {
enum ovs_feature_value value;
const char *name;
@@ -82,8 +81,7 @@ static void
ovs_feature_rconn_setup(const char *br_name)
{
if (!swconn) {
- swconn = rconn_create(FEATURES_DEFAULT_PROBE_INTERVAL_SEC, 0,
- DSCP_DEFAULT, 1 << OFP15_VERSION);
+ swconn = rconn_create(0, 0, DSCP_DEFAULT, 1 << OFP15_VERSION);
}
if (!rconn_is_connected(swconn)) {
@@ -94,7 +92,6 @@ ovs_feature_rconn_setup(const char *br_name)
}
free(target);
}
- rconn_set_probe_interval(swconn, FEATURES_DEFAULT_PROBE_INTERVAL_SEC);
}
static bool