From patchwork Wed May 25 09:37:53 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: 1635354 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=NPwqlb6b; 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 4L7QxH6cBwz9sG4 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-00050j-AV; 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 1ntnTJ-0004s9-MN for kernel-team@lists.ubuntu.com; Wed, 25 May 2022 09:38:29 +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 6937B3F19E for ; Wed, 25 May 2022 09:38:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1653471509; bh=DScaHCFrCvI2AUXtyEXVKXyIWd3anGyU/DjohPyqXAQ=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=NPwqlb6bqFJvZmuFm88c1Z9+iUg0J96qIq7hGBL06bfsw6bWA8yl3Ft+cGm7o4KAH nGUaM3d+h9k32ygXEhfSrgMhQj0W9kfRcaqPUxilLgHLq7mo7f0kNLXiN5p/HmEUJ6 fqhMghMJfUBqPNPeDqp/CavyXPnkLhrsgHRMKNlZtZCObxQ8AXBfkd7e8QSZKoF0UP gOQcaZPzY3kwGN685TKKUqqcSDCv7O9Y2AYb/GwpQovnCwlG18hmWzHCFkZb7LZyYq dzDdU9fd2Iz4uZWQyw/LRJjtNKipvtXm8i9bEevHsJLB5GDsKdmDr5ScHJM5AZ1TcR GUVr0+alfrw0w== Received: by mail-pf1-f199.google.com with SMTP id d207-20020a621dd8000000b00518119a0e6cso9062736pfd.8 for ; Wed, 25 May 2022 02:38:29 -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=DScaHCFrCvI2AUXtyEXVKXyIWd3anGyU/DjohPyqXAQ=; b=CowwVMA803UuYyBG2aDO4FH6ZtFEXOzBoCLM5dsQJ/Xk7Fm+kfd5D1625q82BAqaWM 40DXMaBmnO8hBOYqFSR8J18pYtqOqVukOR0dKyoFf2i9/myTRYeUI1VMACKH7h2FDIw3 O8Rke183ow7R2KZXanz2H8Kg2hJMbsWBhhttakA/LCCcKPKJGFR0MPWXgRmk+aIYUK2m RqeuctisNMqGdofeijOut8stI8IhqfpHkz/Chfi7JvmaCEPn2yUj4Z1b+WBrT46FHnBI eIDM7BUPXdB0lXeylZaMCXvAA7GT8IyGsdmp6P3/N5n+0BAvNJeAlhKMRMnRuEhUlvN+ OuDw== X-Gm-Message-State: AOAM533FcvCcNGQm01G48Y2tT4g4W7hnJKWdGKc44AVwrx7s/+e6qV7L 478TUNJqA+U8tkS38Tc9a7rRpKClthKvchZj5To7p6QiqqBKh/QTxsi8wlEFGuHbFuUmpY/rf63 TKY3m0Yn9EjGbIyFeoDDLIh9fiNpL3qVMWmzkt687 X-Received: by 2002:a17:90b:4a49:b0:1df:d294:a13 with SMTP id lb9-20020a17090b4a4900b001dfd2940a13mr9555766pjb.6.1653471507824; Wed, 25 May 2022 02:38:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxeO2qQIJZKH+T8lziIR9FFShEHvXsBnTgRKioV2StE3l4IevfNreedppWsZsflIWE40zZWPA== X-Received: by 2002:a17:90b:4a49:b0:1df:d294:a13 with SMTP id lb9-20020a17090b4a4900b001dfd2940a13mr9555741pjb.6.1653471507510; Wed, 25 May 2022 02:38:27 -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.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 May 2022 02:38:26 -0700 (PDT) From: Po-Hsu Lin To: kernel-team@lists.ubuntu.com Subject: [Impish][OEM-5.14][SRU][PATCH 1/2] selftests: net: test_vxlan_under_vrf: fix HV connectivity test Date: Wed, 25 May 2022 17:37:53 +0800 Message-Id: <20220525093754.161546-2-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: Andrea Righi BugLink: https://bugs.launchpad.net/bugs/1871015 It looks like test_vxlan_under_vrf.sh is always failing to verify the connectivity test during the ping between the two simulated VMs. This is due to the fact that veth-hv in each VM should have a distinct MAC address. Fix by setting a unique MAC address on each simulated VM interface. Without this fix: $ sudo ./tools/testing/selftests/net/test_vxlan_under_vrf.sh Checking HV connectivity [ OK ] Check VM connectivity through VXLAN (underlay in the default VRF) [FAIL] With this fix applied: $ sudo ./tools/testing/selftests/net/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] NOTE: the connectivity test with the underlay VRF is still failing; it seems that ARP requests are blocked at the simulated hypervisor level, probably due to some missing ARP forwarding rules. This requires more investigation (in the meantime we may consider to set that test as expected failure - XFAIL). Signed-off-by: Andrea Righi Signed-off-by: David S. Miller (cherry picked from commit e7e4785fa30f9b5d1b60ed2d8e221891325dfc5f) Signed-off-by: Po-Hsu Lin --- tools/testing/selftests/net/test_vxlan_under_vrf.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/testing/selftests/net/test_vxlan_under_vrf.sh b/tools/testing/selftests/net/test_vxlan_under_vrf.sh index 9b919ac..5e56a8c 100755 --- a/tools/testing/selftests/net/test_vxlan_under_vrf.sh +++ b/tools/testing/selftests/net/test_vxlan_under_vrf.sh @@ -101,6 +101,8 @@ setup-vm() { ip -netns hv-$id link set veth-tap master br0 ip -netns hv-$id link set veth-tap up + ip link set veth-hv address 02:1d:8d:dd:0c:6$id + ip link set veth-hv netns vm-$id ip -netns vm-$id addr add 10.0.0.$id/24 dev veth-hv ip -netns vm-$id link set veth-hv up 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