From patchwork Wed May 25 09:37:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Po-Hsu Lin X-Patchwork-Id: 1635352 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=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=A1kr7fAm; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4L7QxJ0KZZz9sGS for ; Wed, 25 May 2022 19:38:42 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1ntnTN-00050w-HE; Wed, 25 May 2022 09:38:33 +0000 Received: from smtp-relay-internal-0.internal ([10.131.114.225] helo=smtp-relay-internal-0.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1ntnTL-00050N-J4 for kernel-team@lists.ubuntu.com; Wed, 25 May 2022 09:38:31 +0000 Received: from mail-pf1-f199.google.com (mail-pf1-f199.google.com [209.85.210.199]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 61AA73F19E for ; Wed, 25 May 2022 09:38:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1653471511; bh=xiamy75OF37nWwlzYytbEV5zj27ntXzRQV5iyGAhQf4=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=A1kr7fAmn6UXciF6Qx46OedAZ05ka8uSPEqAmecBX36k4xs+Bvuuzd5v2ZqC4lzbg ZvA9OmMDmK8IjCePcpwEFBnkjzTtylRhCyNF2loUZCoSyKPtYMe+T++Dg0zzWm7XeK k+sViir4hwKX+LULKERgVnx7n8iZeFPKLL6skrJX9YVm2WkfNm9iDJZKIk9cEpvt7K 1cTo8ObBbcIAkFNZhWEGAkmUFJMn4Nlv2OUvrCL1Dwm54L0YWn360eLavKKDBMqbhh W/gcsRTPiyOgkZ7Wu3VCRLlIhMN1SsYepMx/F0Abcxt7kbPy/lC0Rm+5waPGIdVVLf Jns6UIIFhDNSw== Received: by mail-pf1-f199.google.com with SMTP id z186-20020a6233c3000000b00510a6bc2864so9050088pfz.10 for ; Wed, 25 May 2022 02:38:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=xiamy75OF37nWwlzYytbEV5zj27ntXzRQV5iyGAhQf4=; b=tzuc0eREEfQyPLUMNE0KZORQTIhGSl8plvwPO/nlpeUMpUUqnCIrSnPxeMyWAzsYHV oBRr5yE7FyCbHFMPIifpiBZI7iWu4sIBHiOJaFi4N5emBSTpuT247+wXuFuOU3nT+tPs Cj73GOuPoCPhiMQEsBKWHE99GcuIu8geHE1eqI5RUIx42hotw8Fai4Mt1Xj077y4CbiW sQtj52Uv5fQ8u13IUx/NejgNUI3dhdUTxOTNuDT8vRa8KLgwNUI+jfkCC7QkOlDObQQn fwWDCqaA3z/objhrMptwSBOIqN2o1N/Hq/veqvyYpsVSakfvgy65kLMBIUlS9xET37gm iO+w== X-Gm-Message-State: AOAM5322SnfqjiB/oyySNrEQV/rdLSTdMRAsm1/9VYb1H/JvJj9NewdY 9D/oy4uJwmnfOd4w6egIGNMCOpRfMKRM/sAIM48IgE8AcuqJ++AFipemEItrZKPvR1MUEpLqI9M 3Oh97PW5MuP2XpYI4WVj17ZETw/Y47FJLX0G51ris X-Received: by 2002:a17:902:d2c8:b0:161:bc97:2805 with SMTP id n8-20020a170902d2c800b00161bc972805mr32654196plc.4.1653471509795; Wed, 25 May 2022 02:38:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJygbCqjOi/rHqvCzM3ht2vcRgNXv5Fgh17yoOQ4cA7Rb8WYKJz4Vs4SSTVzIuPy5f7tPHLiyg== X-Received: by 2002:a17:902:d2c8:b0:161:bc97:2805 with SMTP id n8-20020a170902d2c800b00161bc972805mr32654172plc.4.1653471509486; Wed, 25 May 2022 02:38:29 -0700 (PDT) Received: from localhost.localdomain (114-136-187-239.emome-ip.hinet.net. [114.136.187.239]) by smtp.gmail.com with ESMTPSA id i18-20020a170902c95200b0015e8d4eb287sm8885383pla.209.2022.05.25.02.38.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 May 2022 02:38:28 -0700 (PDT) From: Po-Hsu Lin To: kernel-team@lists.ubuntu.com Subject: [Impish][SRU][PATCH 2/2] selftests: test_vxlan_under_vrf: Fix broken test case Date: Wed, 25 May 2022 17:37:54 +0800 Message-Id: <20220525093754.161546-3-po-hsu.lin@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220525093754.161546-1-po-hsu.lin@canonical.com> References: <20220525093754.161546-1-po-hsu.lin@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Ido Schimmel BugLink: https://bugs.launchpad.net/bugs/1871015 The purpose of the last test case is to test VXLAN encapsulation and decapsulation when the underlay lookup takes place in a non-default VRF. This is achieved by enslaving the physical device of the tunnel to a VRF. The binding of the VXLAN UDP socket to the VRF happens when the VXLAN device itself is opened, not when its physical device is opened. This was also mentioned in the cited commit ("tests that moving the underlay from a VRF to another works when down/up the VXLAN interface"), but the test did something else. Fix it by reopening the VXLAN device instead of its physical device. Before: # ./test_vxlan_under_vrf.sh Checking HV connectivity [ OK ] Check VM connectivity through VXLAN (underlay in the default VRF) [ OK ] Check VM connectivity through VXLAN (underlay in a VRF) [FAIL] After: # ./test_vxlan_under_vrf.sh Checking HV connectivity [ OK ] Check VM connectivity through VXLAN (underlay in the default VRF) [ OK ] Check VM connectivity through VXLAN (underlay in a VRF) [ OK ] Fixes: 03f1c26b1c56 ("test/net: Add script for VXLAN underlay in a VRF") Signed-off-by: Ido Schimmel Reviewed-by: David Ahern Link: https://lore.kernel.org/r/20220324200514.1638326-1-idosch@nvidia.com Signed-off-by: Jakub Kicinski (cherry picked from commit b50d3b46f84282d795ae3076111acb75ae1031f3) Signed-off-by: Po-Hsu Lin --- tools/testing/selftests/net/test_vxlan_under_vrf.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/testing/selftests/net/test_vxlan_under_vrf.sh b/tools/testing/selftests/net/test_vxlan_under_vrf.sh index 5e56a8c..4458bf0 100755 --- a/tools/testing/selftests/net/test_vxlan_under_vrf.sh +++ b/tools/testing/selftests/net/test_vxlan_under_vrf.sh @@ -120,11 +120,11 @@ echo "[ OK ]" # Move the underlay to a non-default VRF ip -netns hv-1 link set veth0 vrf vrf-underlay -ip -netns hv-1 link set veth0 down -ip -netns hv-1 link set veth0 up +ip -netns hv-1 link set vxlan0 down +ip -netns hv-1 link set vxlan0 up ip -netns hv-2 link set veth0 vrf vrf-underlay -ip -netns hv-2 link set veth0 down -ip -netns hv-2 link set veth0 up +ip -netns hv-2 link set vxlan0 down +ip -netns hv-2 link set vxlan0 up echo -n "Check VM connectivity through VXLAN (underlay in a VRF) " if ! ip netns exec vm-1 ping -c 1 -W 1 10.0.0.2 &> /dev/null; then