From patchwork Tue Jul 16 10:13:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alexis_Lothor=C3=A9?= X-Patchwork-Id: 13734245 Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) (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 7D2F2196438; Tue, 16 Jul 2024 10:13:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.199 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721124829; cv=none; b=JRp2kWz8f+XOscMvOGkJpkYGFzSWz2bk7RF4S1azbujuO1cXT8Nr9fG6aTL4OV7fwWnhPONVzt22dyWLHmTjErxZTZGtxVNtY+oPW6i0eE4/RQm8WHDvGaXeED4pu5CrcMbbq28otaYmrjoIJReUssQ+8OYe8k0YCLfPNsWLIc4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721124829; c=relaxed/simple; bh=iAo487ia/wp3XezejlFMYb+izrM0mct6oShgF6NffGU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=I/id48YzFaf3RdwMGBM9ds79ooib/MrVYAXaSQn19EBOEfF9YrLI0O2dnsDPkzFH7tiWuUV+Yae5OW1tkb6w1utOReFRWMjNY8fPk3chpg/R2z6w/N4MvzEsiuGSIc03IaFtqyPEFnEO8S7l/x4tcXU06H4zTea5Z80TNExjQr0= 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=htayENVm; arc=none smtp.client-ip=217.70.183.199 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="htayENVm" Received: by mail.gandi.net (Postfix) with ESMTPSA id CBCBDFF805; Tue, 16 Jul 2024 10:13:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1721124824; 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: in-reply-to:in-reply-to:references:references; bh=DsUX943pSWyx64jeqbX92/+5qMtvxBsUvtsU2xaH1MQ=; b=htayENVmDIqSp9t+ikRRQ7L+I73RR85vsggc4bkr5bakU8hE/BSIf05y/6wp8Eo6gV3hH3 tURe6CklAkyqBeePFMsKRaBCZraQBk4VTYry9O74Eu3IRroX1oBTgJsSORa9zprF8/yUAS y+ET+guFbGniI3Nd/8QaON1PQVTEyCpRQxkRNP3qjlW5n15qKwSDHyYDcwgMaZnPDTOxdD IikcrmRZ+ilYNPNvdYrzSO59KAg/KjyUflEsppUduWwqaLpn8GONIlytZ8GfUkJ8RdxGtF Y/4bSIxDoql6GSy/PpTfj53Io3Uu3156a15VIrtZLgUgGdLuPWxcvWoQULFofQ== From: =?utf-8?q?Alexis_Lothor=C3=A9_=28eBPF_Foundation=29?= Date: Tue, 16 Jul 2024 12:13:28 +0200 Subject: [PATCH v3 1/2] selftests/bpf: update xdp_redirect_map prog sections for libbpf Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240716-convert_test_xdp_veth-v3-1-7b01389e3cb3@bootlin.com> References: <20240716-convert_test_xdp_veth-v3-0-7b01389e3cb3@bootlin.com> In-Reply-To: <20240716-convert_test_xdp_veth-v3-0-7b01389e3cb3@bootlin.com> 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 , Simon Horman Cc: ebpf@linuxfoundation.org, netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Thomas Petazzoni , =?utf-8?q?Alexis_Lothor?= =?utf-8?q?=C3=A9?= X-Mailer: b4 0.13.0 X-GND-Sasl: alexis.lothore@bootlin.com xdp_redirect_map.c is a bpf program used by test_xdp_veth.sh, which is not handled by the generic test runner (test_progs). To allow converting this test to test_progs, the corresponding program must be updated to allow handling it through skeletons generated by bpftool and libbpf. Update programs section names to allow to manipulate those with libbpf. Signed-off-by: Alexis Lothoré (eBPF Foundation) Acked-by: Stanislav Fomichev --- tools/testing/selftests/bpf/progs/xdp_redirect_map.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/bpf/progs/xdp_redirect_map.c b/tools/testing/selftests/bpf/progs/xdp_redirect_map.c index d037262c8937..682dda8dabbc 100644 --- a/tools/testing/selftests/bpf/progs/xdp_redirect_map.c +++ b/tools/testing/selftests/bpf/progs/xdp_redirect_map.c @@ -10,19 +10,19 @@ struct { __uint(value_size, sizeof(int)); } tx_port SEC(".maps"); -SEC("redirect_map_0") +SEC("xdp") int xdp_redirect_map_0(struct xdp_md *xdp) { return bpf_redirect_map(&tx_port, 0, 0); } -SEC("redirect_map_1") +SEC("xdp") int xdp_redirect_map_1(struct xdp_md *xdp) { return bpf_redirect_map(&tx_port, 1, 0); } -SEC("redirect_map_2") +SEC("xdp") int xdp_redirect_map_2(struct xdp_md *xdp) { return bpf_redirect_map(&tx_port, 2, 0);