From patchwork Sat May 16 06:47:18 2020
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Han Zhou
X-Patchwork-Id: 1291852
Return-Path:
X-Original-To: incoming@patchwork.ozlabs.org
Delivered-To: patchwork-incoming@bilbo.ozlabs.org
Authentication-Results: ozlabs.org;
spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org
(client-ip=140.211.166.138; helo=whitealder.osuosl.org;
envelope-from=ovs-dev-bounces@openvswitch.org; receiver=)
Authentication-Results: ozlabs.org;
dmarc=none (p=none dis=none) header.from=ovn.org
Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ozlabs.org (Postfix) with ESMTPS id 49PG7T5Kpmz9sTS
for ; Sat, 16 May 2020 16:48:05 +1000 (AEST)
Received: from localhost (localhost [127.0.0.1])
by whitealder.osuosl.org (Postfix) with ESMTP id 40D5187F6A;
Sat, 16 May 2020 06:48:02 +0000 (UTC)
X-Virus-Scanned: amavisd-new at osuosl.org
Received: from whitealder.osuosl.org ([127.0.0.1])
by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id h7lrKw3mSbyx; Sat, 16 May 2020 06:47:58 +0000 (UTC)
Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56])
by whitealder.osuosl.org (Postfix) with ESMTP id 78A8C87EFB;
Sat, 16 May 2020 06:47:58 +0000 (UTC)
Received: from lf-lists.osuosl.org (localhost [127.0.0.1])
by lists.linuxfoundation.org (Postfix) with ESMTP id 66133C0859;
Sat, 16 May 2020 06:47:58 +0000 (UTC)
X-Original-To: dev@openvswitch.org
Delivered-To: ovs-dev@lists.linuxfoundation.org
Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])
by lists.linuxfoundation.org (Postfix) with ESMTP id 81932C016F
for ; Sat, 16 May 2020 06:47:56 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
by hemlock.osuosl.org (Postfix) with ESMTP id 763F289813
for ; Sat, 16 May 2020 06:47:56 +0000 (UTC)
X-Virus-Scanned: amavisd-new at osuosl.org
Received: from hemlock.osuosl.org ([127.0.0.1])
by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id GRgU2Xmrl2HM for ;
Sat, 16 May 2020 06:47:55 +0000 (UTC)
X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6
Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net
[217.70.183.198])
by hemlock.osuosl.org (Postfix) with ESMTPS id 05CF588866
for ; Sat, 16 May 2020 06:47:54 +0000 (UTC)
X-Originating-IP: 216.113.160.71
Received: from localhost.localdomain.localdomain (unknown [216.113.160.71])
(Authenticated sender: hzhou@ovn.org)
by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 8C203C000D;
Sat, 16 May 2020 06:47:50 +0000 (UTC)
From: Han Zhou
To: dev@openvswitch.org
Date: Fri, 15 May 2020 23:47:18 -0700
Message-Id: <1589611638-96519-1-git-send-email-hzhou@ovn.org>
X-Mailer: git-send-email 2.1.0
Cc: Han Zhou
Subject: [ovs-dev] [RFC PATCH ovn] ovn-northd: Support optionally avoid
static neighbor flows in routers.
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: ,
MIME-Version: 1.0
Errors-To: ovs-dev-bounces@openvswitch.org
Sender: "dev"
Support option:dynamic_neigh_only for logical routers, so that in
particular use cases static neighbor flows are not prepopulated,
to avoid flow exploding problem reported for ovn-kubernetes large
scale setup.
Reported-by: Girish Moodalbail
Reported-at: https://mail.openvswitch.org/pipermail/ovs-discuss/2020-May/049995.html
Signed-off-by: Han Zhou
---
northd/ovn-northd.8.xml | 4 +++-
northd/ovn-northd.c | 18 ++++++++++++++++++
ovn-nb.xml | 12 ++++++++++++
3 files changed, 33 insertions(+), 1 deletion(-)
diff --git a/northd/ovn-northd.8.xml b/northd/ovn-northd.8.xml
index 8f224b0..e5ed14e 100644
--- a/northd/ovn-northd.8.xml
+++ b/northd/ovn-northd.8.xml
@@ -2692,7 +2692,9 @@ outport = P;
Logical_Switch_Port
table. For router ports
connected to other logical routers, MAC bindings can be known
statically from the mac
and networks
- column in the Logical_Router_Port
table.
+ column in the Logical_Router_Port
table. (Note: these
+ flows are NOT installed for routers that have
+ options:dynamic_neigh_only
set to true
)
diff --git a/northd/ovn-northd.c b/northd/ovn-northd.c
index 87625c3..436faec 100644
--- a/northd/ovn-northd.c
+++ b/northd/ovn-northd.c
@@ -9821,6 +9821,12 @@ build_lrouter_flows(struct hmap *datapaths, struct hmap *ports,
continue;
}
+ if (peer->od->nbr &&
+ smap_get_bool(&peer->od->nbr->options,
+ "dynamic_neigh_only", false)) {
+ continue;
+ }
+
if (!find_lrp_member_ip(peer, ip_s)) {
continue;
}
@@ -9857,6 +9863,12 @@ build_lrouter_flows(struct hmap *datapaths, struct hmap *ports,
continue;
}
+ if (peer->od->nbr &&
+ smap_get_bool(&peer->od->nbr->options,
+ "dynamic_neigh_only", false)) {
+ continue;
+ }
+
if (!find_lrp_member_ip(peer, ip_s)) {
continue;
}
@@ -9954,6 +9966,12 @@ build_lrouter_flows(struct hmap *datapaths, struct hmap *ports,
continue;
}
+ if (peer->od->nbr &&
+ smap_get_bool(&peer->od->nbr->options,
+ "dynamic_neigh_only", false)) {
+ continue;
+ }
+
if (!find_lrp_member_ip(peer, vip)) {
continue;
}
diff --git a/ovn-nb.xml b/ovn-nb.xml
index 95ee4c9..df916fa 100644
--- a/ovn-nb.xml
+++ b/ovn-nb.xml
@@ -1840,6 +1840,18 @@
connected to the logical router. Default: False.
+
+
+ If set to true
, the router will resolve neighbours' MAC
+ addresses only by dynamic ARP/ND, instead of prepopulating static
+ mappings for all neighbours in the ARP/ND Resolution stage. This
+ reduces number of flows, but requires ARP/ND messages to resolve
+ the IP-MAC bindings when needed. It is false
by
+ default. It is recommended to set to true
when a large
+ number of logical routers are connected to the same logical switch
+ but most of them never need to send traffic between each other.
+
+