From patchwork Thu May 25 13:07:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frode Nordahl X-Patchwork-Id: 1786130 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::137; helo=smtp4.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: legolas.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=pCR+bjZr; dkim-atps=neutral Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QRpJQ04CZz20Q1 for ; Thu, 25 May 2023 23:08:05 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id D4C7F426B1; Thu, 25 May 2023 13:08:02 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org D4C7F426B1 Authentication-Results: smtp4.osuosl.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=pCR+bjZr 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 J5tTsDFUCOmJ; Thu, 25 May 2023 13:08:01 +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 95A45426DA; Thu, 25 May 2023 13:08:00 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 95A45426DA Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 41644C0036; Thu, 25 May 2023 13:08:00 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id 12A1DC002A for ; Thu, 25 May 2023 13:07:59 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id E1B1560E86 for ; Thu, 25 May 2023 13:07:58 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org E1B1560E86 Authentication-Results: smtp3.osuosl.org; dkim=pass (2048-bit key) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=pCR+bjZr X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MqZNn6Dc_Ti6 for ; Thu, 25 May 2023 13:07:57 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 7A42B60E22 Received: from smtp-relay-canonical-0.canonical.com (smtp-relay-canonical-0.canonical.com [185.125.188.120]) by smtp3.osuosl.org (Postfix) with ESMTPS id 7A42B60E22 for ; Thu, 25 May 2023 13:07:57 +0000 (UTC) Received: from frode-threadripper.. (2.general.frode.uk.vpn [10.172.193.251]) (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-canonical-0.canonical.com (Postfix) with ESMTPSA id 860183F17F; Thu, 25 May 2023 13:07:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1685020074; bh=trGt7vbQNMz1vnxZNO7j9jDIz0vjMx0yrdET3tZ3duc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=pCR+bjZrO1twXxOV4ispS7UMCEC+6bwmXJBhqnEOOpGb5XCJrlov8XWrYqf4D5dly nNA1m4vR3ysYxpuof5cM8eKnBQUMNDFiqi5PqLjwai9ZI6iMFat8bKUbxXv++sEPDT BuJk9nT9sF0wVs603X0Qj+y5VtR55LQEPdvGRWCV9BVHqQicUyVSM43erPC/8jT77S rzpA9g3kP6eT+Rqu0UiVIrwij/GzhGeI/vnNH1kDgZfj6S5x1SjcYy2zdpC7mJeZ0l QQFRRH5G/qzGRKEI8P9pnDtDMoLg8ZscSi1KfooGjkwOoKLGLrWXAATHs2B7H51HSx wq6OIqDHUNuaQ== From: Frode Nordahl To: dev@openvswitch.org Date: Thu, 25 May 2023 15:07:53 +0200 Message-Id: <20230525130753.2717172-1-frode.nordahl@canonical.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <03370823-2952-d806-0a44-4f05edb37122@ovn.org> References: <03370823-2952-d806-0a44-4f05edb37122@ovn.org> MIME-Version: 1.0 Cc: Simon Horman , Ilya Maximets Subject: [ovs-dev] [PATCH v2] tests: layer3-tunnels: Skip bareudp tests if not supported by kernel. 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" The bareudp tests depend on specific kernel configuration to succeed. Skip the test if the feature is not enabled in the running kernel. Signed-off-by: Frode Nordahl --- tests/system-kmod-macros.at | 10 ++++++++++ tests/system-layer3-tunnels.at | 4 ++-- tests/system-userspace-macros.at | 8 ++++++++ 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/tests/system-kmod-macros.at b/tests/system-kmod-macros.at index fb15a5a7c..712925ded 100644 --- a/tests/system-kmod-macros.at +++ b/tests/system-kmod-macros.at @@ -237,3 +237,13 @@ m4_define([CHECK_L3L4_CONNTRACK_REASM]) # # The kernel module tests do not use TC offload. m4_define([CHECK_NO_TC_OFFLOAD]) + +# OVS_CHECK_BAREUDP() +# +# The feature needs to be enabled in the kernel configuration (CONFIG_BAREUDP) +# to work. +m4_define([OVS_CHECK_BAREUDP], +[ + AT_SKIP_IF([! ip link add dev ovs_bareudp0 type bareudp dstport 6635 ethertype mpls_uc 2>&1 >/dev/null]) + AT_CHECK([ip link del dev ovs_bareudp0]) +]) diff --git a/tests/system-layer3-tunnels.at b/tests/system-layer3-tunnels.at index c37852b21..81123f730 100644 --- a/tests/system-layer3-tunnels.at +++ b/tests/system-layer3-tunnels.at @@ -154,7 +154,7 @@ OVS_VSWITCHD_STOP AT_CLEANUP AT_SETUP([layer3 - ping over MPLS Bareudp]) -OVS_CHECK_MIN_KERNEL(5, 7) +OVS_CHECK_BAREUDP() OVS_TRAFFIC_VSWITCHD_START([_ADD_BR([br1])]) ADD_NAMESPACES(at_ns0, at_ns1) @@ -202,7 +202,7 @@ OVS_TRAFFIC_VSWITCHD_STOP AT_CLEANUP AT_SETUP([layer3 - ping over Bareudp]) -OVS_CHECK_MIN_KERNEL(5, 7) +OVS_CHECK_BAREUDP() OVS_TRAFFIC_VSWITCHD_START([_ADD_BR([br1])]) ADD_NAMESPACES(at_ns0, at_ns1) diff --git a/tests/system-userspace-macros.at b/tests/system-userspace-macros.at index 482079386..c1855cbc5 100644 --- a/tests/system-userspace-macros.at +++ b/tests/system-userspace-macros.at @@ -336,3 +336,11 @@ m4_define([CHECK_L3L4_CONNTRACK_REASM], # # Userspace tests do not use TC offload. m4_define([CHECK_NO_TC_OFFLOAD]) + +# OVS_CHECK_BAREUDP() +# +# The userspace datapath does not support bareudp tunnels. +m4_define([OVS_CHECK_BAREUDP], +[ + AT_SKIP_IF([:]) +])