From patchwork Tue Nov 23 17:07:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladislav Odintsov X-Patchwork-Id: 1558646 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.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=20210112 header.b=L6zc3TTE; dkim-atps=neutral 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 4Hz9Z33z02z9sCD for ; Wed, 24 Nov 2021 04:07:55 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 4CB1440119; Tue, 23 Nov 2021 17:07:53 +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 wYmXn0MHvBXM; Tue, 23 Nov 2021 17:07:52 +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 6C35C403EB; Tue, 23 Nov 2021 17:07:51 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 41631C002E; Tue, 23 Nov 2021 17:07:51 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) by lists.linuxfoundation.org (Postfix) with ESMTP id 93FE1C0012 for ; Tue, 23 Nov 2021 17:07:50 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 705A480EEE for ; Tue, 23 Nov 2021 17:07:50 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp1.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eZWPyNuGARgx for ; Tue, 23 Nov 2021 17:07:49 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [IPv6:2a00:1450:4864:20::530]) by smtp1.osuosl.org (Postfix) with ESMTPS id 95CDC80D0F for ; Tue, 23 Nov 2021 17:07:49 +0000 (UTC) Received: by mail-ed1-x530.google.com with SMTP id y13so94900477edd.13 for ; Tue, 23 Nov 2021 09:07:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=6AKGXvk6HpsH5FljU6AjKFPEaBpCmFKl+45q0tMMnaU=; b=L6zc3TTETzWFa2M4lfFZE4VCWgB4BAiSesf7Uq29gKJpQv1g/x922DpVPHIQg4qZVQ X+Ic6pK5xc/tlnLnbjOcmVuxsxzZ5NR7fgE0YhfPP1FypA5JFxwz5QSLbMkJHtmz/QHb 61/E/O4blnrzrtjk9apKDySKRIPzizJ/xWMt3ocIP8+8MgINAe+A+ayjBK7kYSSTOV3N NAR0K1y4KUlt4DoGLWd95M9/I4YgS1Bu0WBq2vCHOnBcMOEbzJgkM2zOOriXhzQTT8iq rpDOZVhy2llvwP4nHI+DaFQxSWM+dHYMRV3jMvnWVs+d9AhIA5/y9As4P3GgfD17BSAM gNuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=6AKGXvk6HpsH5FljU6AjKFPEaBpCmFKl+45q0tMMnaU=; b=gpKMTWADkwQWRz4w8sw1JQr0hB3z3TVGxdzF5wvJB/68Tt3W2LHhx7+rLdJ6gSCwn7 RbEVELHeQl0lL2Kc8Ztaui099tilLcxg9qK1IFQSnXJ877KOwWbV/BnB3Oj80IyrhV2H PplWgCelVH/Fu5iNzOPemHucSk/BheAKGt5dW/NUJneckOaMblKKFJQ0uVhDrAlUUQSQ Kvqv6X8gTKrtuoAKWXsoaqqtBg1S1Mmjmlvc3166QdFLpj0MMoaEcTwAUwEfgu8DgmVj 4V9LcRXICsHD6ce25MI92kgM2w3S5FdwbMrpWgiTbxhcbYJDX6eQYQkXtPbYWtJNod1h 2PvA== X-Gm-Message-State: AOAM530WTLsszmTvj4N33cMQALJ5t2l6ldB5vdk3ITAiuMb4hJPNzZIe 8oKpa0fLsm0JVtyXthEHdN1aC4oWMTtfAw== X-Google-Smtp-Source: ABdhPJzCYUvUYYwxd9hInW1kk7eHaDgQcG+fFTnmNOcDkhQURovNTJzoE+xmea5c88j9K6GhzvRBqQ== X-Received: by 2002:a05:6402:2079:: with SMTP id bd25mr11656721edb.116.1637687267574; Tue, 23 Nov 2021 09:07:47 -0800 (PST) Received: from localhost.localdomain (109-252-131-59.dynamic.spd-mgts.ru. [109.252.131.59]) by smtp.gmail.com with ESMTPSA id p10sm5995383edj.91.2021.11.23.09.07.46 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Nov 2021 09:07:46 -0800 (PST) From: Vladislav Odintsov To: dev@openvswitch.org Date: Tue, 23 Nov 2021 20:07:38 +0300 Message-Id: <20211123170739.86576-1-odivlad@gmail.com> X-Mailer: git-send-email 2.30.0 MIME-Version: 1.0 Cc: Vladislav Odintsov Subject: [ovs-dev] [PATCH ovn 1/2] northd: allow having VXLAN encaps in ovn-ic enabled setup 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" In ovn-ic enabled setups, which also use VXLAN encapsulation (for instance, for VTEP-switches) interconnected transit switches (datapaths) were not configured after the patch from "Fixes" tag. This was due to the fact that ovn-ic utilises tunnel key for transit switches > OVN_VXLAN_MIN_MULTICAST. This patch allows having such setup. Fixes: fd44d7595 (Enforce datapath and port key constraints in vxlan mode) Signed-off-by: Vladislav Odintsov --- northd/northd.c | 4 +++- tests/ovn-ic.at | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/northd/northd.c b/northd/northd.c index 2b7dd5980..0145a4943 100644 --- a/northd/northd.c +++ b/northd/northd.c @@ -1439,7 +1439,9 @@ ovn_datapath_assign_requested_tnl_id(struct northd_input *input_data, : &od->nbr->options); uint32_t tunnel_key = smap_get_int(other_config, "requested-tnl-key", 0); if (tunnel_key) { - if (is_vxlan_mode(input_data) && tunnel_key >= 1 << 12) { + const char *interconn_ts = smap_get(other_config, "interconn-ts"); + if (!interconn_ts && is_vxlan_mode(input_data) && + tunnel_key >= 1 << 12) { static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 1); VLOG_WARN_RL(&rl, "Tunnel key %"PRIu32" for datapath %s is " "incompatible with VXLAN", tunnel_key, diff --git a/tests/ovn-ic.at b/tests/ovn-ic.at index a189a8fed..05bd3e9a6 100644 --- a/tests/ovn-ic.at +++ b/tests/ovn-ic.at @@ -38,6 +38,9 @@ AT_SETUP([ovn-ic -- transit switch handling]) ovn_init_ic_db ovn_start az1 +# create fake chassis with vxlan encap to enforce requested tunnel key checks +ovn-sbctl chassis-add fakechassis vxlan 192.168.0.2 + AT_CHECK([ovn-ic-nbctl ts-add ts1]) AT_CHECK([ovn-ic-nbctl ts-add ts2]) From patchwork Tue Nov 23 17:07:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladislav Odintsov X-Patchwork-Id: 1558647 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.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=20210112 header.b=a47+4gUr; dkim-atps=neutral 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 4Hz9Z66QG3z9sCD for ; Wed, 24 Nov 2021 04:07:58 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 08E2440435; Tue, 23 Nov 2021 17:07:56 +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 kGfS6z6Y8EiQ; Tue, 23 Nov 2021 17:07:55 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp4.osuosl.org (Postfix) with ESMTPS id 4C006400AB; Tue, 23 Nov 2021 17:07:54 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 0380CC0031; Tue, 23 Nov 2021 17:07:54 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by lists.linuxfoundation.org (Postfix) with ESMTP id 8FBBAC002E for ; Tue, 23 Nov 2021 17:07:52 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 7794480EEE for ; Tue, 23 Nov 2021 17:07:52 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp1.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9P5DDL-ogBSb for ; Tue, 23 Nov 2021 17:07:51 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) by smtp1.osuosl.org (Postfix) with ESMTPS id 3D40780D0F for ; Tue, 23 Nov 2021 17:07:51 +0000 (UTC) Received: by mail-ed1-x529.google.com with SMTP id l25so78144153eda.11 for ; Tue, 23 Nov 2021 09:07:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=1RZzJzqLA/whNgeDI8E6yBQGtSOU7WaljLCa3x3/bgw=; b=a47+4gUr7N4+WcjZ6IQyC/ktu+B3AIlFqqMv73TkrL14SXR2h16ys5ipknd8KNeYUh +hnfY82BbJ+eY+KuRjFUAu2N8uxuerHetkKSc0LLgPLvxZ5zPy8Xu/ik7OhPXIj9chLA eBc9eQHJIBKlZExY6VikfbYzVgUu8j1kSio/Rp8ueit+/BXIG0IqdYjudNAHAgM/Zpad RwX6aZUBIxkltgxMiIuyLczYp4jG+C/BoDqmjdQxOKLSfy71okhy57ItvKFTSl3ohtZ0 rR8eeShOKkiKIhuNQk3nPdJxKD5nCyIxlAF3hMG4ApCWHCJ5T75zhAZZnwmBpEqlZUsP dVYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=1RZzJzqLA/whNgeDI8E6yBQGtSOU7WaljLCa3x3/bgw=; b=aL+gLvGy85YK2DayiZij51wer4HDTmTIwi6y9WgcGEWDok608gDI44mf9a5pxYxS8C oqeO4fxR3r1UNbfidSvl6d5j/Z5WLjhGz9GvwL1AR/89jPeVaq+S4eWi37ziFFFEF7qQ d/DSIvWC7ekf7qkk2e75/JP5litPq03UFsE8kXUuffChZXA/pawnzyMgW5pEDGLDz4jk YibuC6VQRhgWaaj1ozvxz0CXsK8R1kmsTs13xSVZ829qSYRRjDwOALEk426pjb/MssWL 1KMKcQRlTijB9yfwkKIYravN/cBkK39AkNefYhcnIiPexHb3A2YklFrxpVeMCq4F0Rvk vunQ== X-Gm-Message-State: AOAM533G/MUzlNGwvlU5TKGUvgen9WPFgHSsrOqtTNlw6XZUl/Al9v4z lUiTJ2oEiD/dQP7IOgWmlR7ClS/Ztyk1tg== X-Google-Smtp-Source: ABdhPJx3Pxc8Oj0MdzFJ0LXWRVTFyBpGgbKTaptX8q+1zRr2UOa60hSAMMmh5isnboS8vJJllOZePw== X-Received: by 2002:a17:907:3e25:: with SMTP id hp37mr9633956ejc.43.1637687269076; Tue, 23 Nov 2021 09:07:49 -0800 (PST) Received: from localhost.localdomain (109-252-131-59.dynamic.spd-mgts.ru. [109.252.131.59]) by smtp.gmail.com with ESMTPSA id p10sm5995383edj.91.2021.11.23.09.07.48 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Nov 2021 09:07:48 -0800 (PST) From: Vladislav Odintsov To: dev@openvswitch.org Date: Tue, 23 Nov 2021 20:07:39 +0300 Message-Id: <20211123170739.86576-2-odivlad@gmail.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20211123170739.86576-1-odivlad@gmail.com> References: <20211123170739.86576-1-odivlad@gmail.com> MIME-Version: 1.0 Cc: Vladislav Odintsov Subject: [ovs-dev] [PATCH ovn 2/2] tests: fix flaky VXLAN check port/datapath key space limits test 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" OVN requested-tnl-key VXLAN checks affect tunnel_key in datapath_binding record only on datapath tunnel key assigning. If a dp tnl key was already assigned and VXLAN-enabled chassis is added after that, the value would never be changed. The test didn't check the VXLAN-enabled chassis was created and thus test could fail like this: ovn.at:3777: waiting until test x`ovn-nbctl lsp-get-up lsp-bad` = xup... ovn.at:3777: wait succeeded immediately ./ovn.at:3777: ovn-sbctl get Datapath_Binding ls-bad tunnel_key --- - 2021-11-23 17:34:51.646403185 +0300 +++ /builddir/build/BUILD/ovn-21.09.90/tests/testsuite.dir/at-groups/104/stdout 2021-11-23 17:34:51.644406189 +0300 @@ -1,2 +1,2 @@ -1 +5000 This patch fixes such fail by adding await for chassis to be registered in SB DB. Signed-off-by: Vladislav Odintsov --- tests/ovn.at | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/ovn.at b/tests/ovn.at index 965eed809..c39f3162e 100644 --- a/tests/ovn.at +++ b/tests/ovn.at @@ -3783,6 +3783,7 @@ check ovs-vsctl add-br br-phys check ovs-vsctl set open . external-ids:ovn-bridge-mappings=phys:br-phys ovn_attach net br-phys 192.168.0.1 24 vxlan check ovn-nbctl --wait=sb sync +OVS_WAIT_UNTIL([ovn-sbctl get chassis main _uuid]) check ovn-nbctl ls-add ls-bad -- \ set Logical_Switch ls-bad other_config:requested-tnl-key=5000