From patchwork Fri Oct 8 13:12:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 12545337 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 33871C433EF for ; Fri, 8 Oct 2021 13:13:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0B5916103C for ; Fri, 8 Oct 2021 13:13:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242463AbhJHNPC (ORCPT ); Fri, 8 Oct 2021 09:15:02 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:35131 "EHLO out1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242410AbhJHNPB (ORCPT ); Fri, 8 Oct 2021 09:15:01 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 12AE95C00B2; Fri, 8 Oct 2021 09:13:06 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Fri, 08 Oct 2021 09:13:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=Tu6KOZnUNSHFrIYAu P0di5wKRZjWa8yXiJFyTGbvHjQ=; b=Ph75ZdeKJEioLimn5F0B6cqBRdro+tWf7 AGLDfA9mdyHtojwCNJc+hrUGkglB15YEZpQL9rrFHTryMYxMVH12vp8rr13Wlerc jf4k+NmS8QlqPC4b0FgVeXGU5hllVqrS/MFqcSdh8iu1IWOgrqwl5IXlpJknyFlU JEm/7reO7xoPr5Ps7Kc7AdJkSa+S3Hxs7Vn3W1lqNg0Z2EoPbk17206q8TyhfF+2 6F1Dpi8cy6XReIGeu9vEKzTGNJeq9PpYXd69Sv5lVigTLUbVPVR9DyAqweHK3ZQx mXEqn5QIXINgJ3j4pYAkB6DQXId/L6J3s6960X5vkPdyMqPfRIJ1g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvddttddgheelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgggfestdekredtre dttdenucfhrhhomhepkfguohcuufgthhhimhhmvghluceoihguohhstghhsehiughoshgt hhdrohhrgheqnecuggftrfgrthhtvghrnhepteevgefhvefggfffkeeuffeuvdfhueehhe etffeikeegheevfedvgeelvdffudfhnecuvehluhhsthgvrhfuihiivgeptdenucfrrghr rghmpehmrghilhhfrhhomhepihguohhstghhsehiughoshgthhdrohhrgh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 8 Oct 2021 09:13:03 -0400 (EDT) From: Ido Schimmel To: netdev@vger.kernel.org Cc: davem@davemloft.net, kuba@kernel.org, amcohen@nvidia.com, petrm@nvidia.com, mlxsw@nvidia.com, Ido Schimmel Subject: [PATCH net-next 0/8] selftests: forwarding: Add ip6gre tests Date: Fri, 8 Oct 2021 16:12:33 +0300 Message-Id: <20211008131241.85038-1-idosch@idosch.org> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Ido Schimmel This patchset adds forwarding selftests for ip6gre. The tests can be run with veth pairs or with physical loopbacks. Patch #1 adds a new config option to determine if 'skip_sw' / 'skip_hw' flags are used when installing tc filters. By default, it is not set which means the flags are not used. 'skip_sw' is useful to ensure traffic is forwarded by the hardware data path. Patch #2 adds a new helper function. Patches #3-#4 add the forwarding selftests. Patch #5 adds a mlxsw-specific selftest to validate correct behavior of the 'decap_error' trap with IPv6 underlay. Patches #6-#8 align the corresponding IPv4 underlay test to the IPv6 one. Amit Cohen (8): testing: selftests: forwarding.config.sample: Add tc flag testing: selftests: tc_common: Add tc_check_at_least_x_packets() selftests: forwarding: Add IPv6 GRE flat tests selftests: forwarding: Add IPv6 GRE hierarchical tests selftests: mlxsw: devlink_trap_tunnel_ipip6: Add test case for IPv6 decap_error selftests: mlxsw: devlink_trap_tunnel_ipip: Align topology drawing correctly selftests: mlxsw: devlink_trap_tunnel_ipip: Remove code duplication selftests: mlxsw: devlink_trap_tunnel_ipip: Send a full-length key .../net/mlxsw/devlink_trap_tunnel_ipip.sh | 50 +- .../spectrum-2/devlink_trap_tunnel_ipip6.sh | 250 ++++++++++ .../net/forwarding/forwarding.config.sample | 3 + .../selftests/net/forwarding/ip6gre_flat.sh | 65 +++ .../net/forwarding/ip6gre_flat_key.sh | 65 +++ .../net/forwarding/ip6gre_flat_keys.sh | 65 +++ .../selftests/net/forwarding/ip6gre_hier.sh | 65 +++ .../net/forwarding/ip6gre_hier_key.sh | 65 +++ .../net/forwarding/ip6gre_hier_keys.sh | 65 +++ .../selftests/net/forwarding/ip6gre_lib.sh | 438 ++++++++++++++++++ .../selftests/net/forwarding/tc_common.sh | 10 + 11 files changed, 1109 insertions(+), 32 deletions(-) create mode 100755 tools/testing/selftests/drivers/net/mlxsw/spectrum-2/devlink_trap_tunnel_ipip6.sh create mode 100755 tools/testing/selftests/net/forwarding/ip6gre_flat.sh create mode 100755 tools/testing/selftests/net/forwarding/ip6gre_flat_key.sh create mode 100755 tools/testing/selftests/net/forwarding/ip6gre_flat_keys.sh create mode 100755 tools/testing/selftests/net/forwarding/ip6gre_hier.sh create mode 100755 tools/testing/selftests/net/forwarding/ip6gre_hier_key.sh create mode 100755 tools/testing/selftests/net/forwarding/ip6gre_hier_keys.sh create mode 100644 tools/testing/selftests/net/forwarding/ip6gre_lib.sh