From patchwork Tue Jan 21 10:22:14 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Bastien Curutchet (eBPF Foundation)" X-Patchwork-Id: 13946052 Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 706671B4251; Tue, 21 Jan 2025 10:22:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.193 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737454943; cv=none; b=gOtuqDQCdVzJvYMii/27ZMg6Y0Qk8vFwFmN/IGjvCztZKGSx4weSkY3boPhY9aIliyuvVD6TxtCZP5MMFvSIMF4Pl4Y5MAQFq78MCBkHncOoAOG+6Wa/eR0ZlPmWlQKQulzIiGzGbah7PIgHi5sO7QQUnJZfTAigR4D3s44WxRc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737454943; c=relaxed/simple; bh=ESdptXXVOfXAqsr9p18hJKUyWQhzRcjYpJjeZYOfC4A=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=XxIjtIsEYKdXc6P5SIDnA9igxUNJR1YiPA/JxTqL2bt3iATmTlcyNPvO3cNDhXiUsN4O1/Ob7SDOuAxE4g4Za8uSkS6/+uU4P/WeXFv2OLjf6fEp9BGPobFFr5LZUL8B+vb1AmwacYA048RuVs3QFMNALfC4D6fd2L9UPYwk8l0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=jmglL4ws; arc=none smtp.client-ip=217.70.183.193 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="jmglL4ws" Received: by mail.gandi.net (Postfix) with ESMTPSA id 15D7B240003; Tue, 21 Jan 2025 10:22:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1737454938; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wBZ6J8YBUBEKBz+krzyV3uMHD2IyWDLli4c0/4yEHUU=; b=jmglL4wskwgHtYOATL20Jo30HlpW0s9PZhi+xQbwvf+Ma0c2z5fBGbTQ7N3G93Etd8z4Tu fxIXoSE/Xq+VKQwzUxt+DY8dB5GkRFsdxMyp6E5g7S+BfUh++xFW40vKDvocuRQTE4eJpz irni8c5h1o3SHs065B2bA/Hg1CNLdgNIjbo7qmXTd5Iv/OcuYkLcPBGXPCPrva58F5CDDG tnpiPtOW+3oYI/8BYRWCwpI0TrxHghky9F+y+U06ASOehNh10zqib/sPXVHODyjwOVi5k+ nNf35DoliMozmwzB7tzUZqGaXGPou2COKGytaEbQ6Pn0aR3dJwWF7orWt/GW/A== From: "Bastien Curutchet (eBPF Foundation)" Subject: [PATCH bpf-next 00/10] selftests/bpf: Migrate test_xdp_redirect_multi.sh to test_progs Date: Tue, 21 Jan 2025 11:22:14 +0100 Message-Id: <20250121-redirect-multi-v1-0-b215e35ff505@bootlin.com> Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAFZ1j2cC/x3MQQqDMBBG4avIrDuQpKYLr1K6UPNHB2oqkyiCe PcGl9/ivZMyVJCpa05S7JLllyrso6Fx7tMEllBNzjhvrHmyIohiLLxs3yLsWh9e6OPgg6UarYo oxz1807BGTjgKfa7rD7O97wRqAAAA X-Change-ID: 20250103-redirect-multi-245d6eafb5d1 To: Alexei Starovoitov , Daniel Borkmann , "David S. Miller" , Jakub Kicinski , Jesper Dangaard Brouer , John Fastabend , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Mykola Lysenko , Shuah Khan Cc: Alexis Lothore , Thomas Petazzoni , netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, "Bastien Curutchet (eBPF Foundation)" X-Mailer: b4 0.14.2 X-GND-Sasl: bastien.curutchet@bootlin.com Hi all, This patch series continues the work to migrate the *.sh tests into prog_tests framework. test_xdp_redirect_multi.sh tests the XDP redirections done through bpf_redirect_map(). This is already partly covered by test_xdp_veth.c that already tests map redirections at XDP level. What isn't covered yet by test_xdp_veth is the use of the broadcast flags (BPF_F_BROADCAST or BPF_F_EXCLUDE_INGRESS) and XDP egress programs. Hence, this patch series add test cases to test_xdp_veth.c to get rid of the test_xdp_redirect_multi.sh: - PATCH 1 to 5 rework test_xdp_veth to make it more generic and allow to configure different test cases - PATCH 6 adds test cases for 'classic' bpf_redirect_map() - PATCH 7 & 8 covers the broadcast flags - PATCH 9 covers the XDP egress programs - PATCH 10 removes test_xdp_redirect_multi.sh Signed-off-by: Bastien Curutchet (eBPF Foundation) --- Bastien Curutchet (eBPF Foundation) (10): selftests/bpf: test_xdp_veth: Split network configuration selftests/bpf: Remove unused argument selftests/bpf: test_xdp_veth: Rename config[] selftests/bpf: test_xdp_veth: Add prog_config[] table selftests/bpf: test_xdp_veth: Add XDP flags to prog_configuration selftests/bpf: test_xdp_veth: Add new test cases for XDP flags selftests/bpf: Optionally select broadcasting flags selftests/bpf: test_xdp_veth: Add XDP broadcast redirection tests selftests/bpf: test_xdp_veth: Add XDP program on egress test selftests/bpf: Remove test_xdp_redirect_multi.sh tools/testing/selftests/bpf/Makefile | 2 - .../selftests/bpf/prog_tests/test_xdp_veth.c | 534 +++++++++++++++++---- .../testing/selftests/bpf/progs/xdp_redirect_map.c | 89 ++++ .../selftests/bpf/progs/xdp_redirect_multi_kern.c | 41 +- .../selftests/bpf/test_xdp_redirect_multi.sh | 214 --------- tools/testing/selftests/bpf/xdp_redirect_multi.c | 226 --------- 6 files changed, 553 insertions(+), 553 deletions(-) --- base-commit: 075d2f15ddfc67f27601c8f861dd5d3b189af401 change-id: 20250103-redirect-multi-245d6eafb5d1 Best regards,