From patchwork Mon Mar 28 05:39:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Han Zhou X-Patchwork-Id: 1610008 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.137; helo=smtp4.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) 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 RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4KRhNt1tm4z9sFy for ; Mon, 28 Mar 2022 16:40:13 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 9087541725; Mon, 28 Mar 2022 05:40:10 +0000 (UTC) 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 FOoeHkmlfxPz; Mon, 28 Mar 2022 05:40:07 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp4.osuosl.org (Postfix) with ESMTPS id 4C82B4171E; Mon, 28 Mar 2022 05:40:06 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 05C87C0084; Mon, 28 Mar 2022 05:40:05 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) by lists.linuxfoundation.org (Postfix) with ESMTP id 75A11C0087 for ; Mon, 28 Mar 2022 05:40:02 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 4C968416D0 for ; Mon, 28 Mar 2022 05:40:02 +0000 (UTC) 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 cxL2W3QzMZWk for ; Mon, 28 Mar 2022 05:40:01 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by smtp4.osuosl.org (Postfix) with ESMTPS id 73A1541604 for ; Mon, 28 Mar 2022 05:40:01 +0000 (UTC) Received: (Authenticated sender: hzhou@ovn.org) by mail.gandi.net (Postfix) with ESMTPSA id 2A9D560008; Mon, 28 Mar 2022 05:39:58 +0000 (UTC) From: Han Zhou To: dev@openvswitch.org Date: Sun, 27 Mar 2022 22:39:41 -0700 Message-Id: <20220328053943.1606715-5-hzhou@ovn.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220328053943.1606715-1-hzhou@ovn.org> References: <20220328053943.1606715-1-hzhou@ovn.org> MIME-Version: 1.0 Subject: [ovs-dev] [PATCH ovn v4 4/6] ovn-northd: Improve the doc and tests for ecmp-symmetric-reply. 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" 1. The ovn-northd.8.xml didn't cover the flow in the lr_in_arp_resolve stage. 2. The original test didn't really test the ecmp-symmetric-reply because the option takes effect only for gateway routers. This patch set the chassis to make the router a gateway router. Also, add the check for the ecmp-symmetric-reply related flow in the lr_in_arp_resolve stage.. Signed-off-by: Han Zhou --- northd/ovn-northd.8.xml | 17 ++++++++++++++--- tests/ovn-northd.at | 4 ++++ 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/northd/ovn-northd.8.xml b/northd/ovn-northd.8.xml index 4784bff04..51e132239 100644 --- a/northd/ovn-northd.8.xml +++ b/northd/ovn-northd.8.xml @@ -3520,9 +3520,12 @@ output; ct_label value is used to choose the destination. The least significant 48 bits of the ct_label tell the destination MAC address to which the packet should be sent. The next 16 bits tell the - logical router port on which the packet should be sent. These values in - the ct_label are set when the initial ingress traffic is - received over the ECMP route. + logical router port on which the packet should be sent. These values are + saved to the ct_label when the initial ingress traffic is + received over the ECMP route and committed to conntrack. The + priority-10300 flows in this stage set the outport, + while the eth.dst is set by flows at the ARP/ND Resolution + stage.

@@ -3881,6 +3884,14 @@ outport = P

+
  • +

    + Priority-200 flows that match ECMP reply traffic for the routes + configured to use symmetric replies, with actions + eth.dst = ct_label.ecmp_reply_eth; next;. +

    +
  • +
  • Static MAC bindings. MAC bindings can be known statically based on diff --git a/tests/ovn-northd.at b/tests/ovn-northd.at index 17d4f31b3..e661bd84d 100644 --- a/tests/ovn-northd.at +++ b/tests/ovn-northd.at @@ -5664,6 +5664,7 @@ ovn_start check ovn-sbctl chassis-add ch1 geneve 127.0.0.1 check ovn-nbctl lr-add lr0 +check ovn-nbctl set logical_router lr0 options:chassis=ch1 check ovn-nbctl ls-add public check ovn-nbctl lrp-add lr0 lr0-public 00:00:20:20:12:13 192.168.0.1/24 check ovn-nbctl lsp-add public public-lr0 @@ -5692,6 +5693,9 @@ AT_CHECK([grep -e "lr_in_ip_routing_ecmp" lr0flows | sed 's/192\.168\.0\..0/192. table=??(lr_in_ip_routing_ecmp), priority=100 , match=(reg8[[0..15]] == 1 && reg8[[16..31]] == 2), action=(reg0 = 192.168.0.??; reg1 = 192.168.0.1; eth.src = 00:00:20:20:12:13; outport = "lr0-public"; next;) table=??(lr_in_ip_routing_ecmp), priority=150 , match=(reg8[[0..15]] == 0), action=(next;) ]) +AT_CHECK([grep -e "lr_in_arp_resolve.*ecmp" lr0flows | sed 's/table=../table=??/'], [0], [dnl + table=??(lr_in_arp_resolve ), priority=200 , match=(ct.rpl && ct_label.ecmp_reply_port == 1), action=(eth.dst = ct_label.ecmp_reply_eth; next;) +]) # add ecmp route with wrong nexthop check ovn-nbctl --wait=sb --ecmp-symmetric-reply lr-route-add lr0 1.0.0.1 192.168.1.20