From patchwork Sun Jul 21 19:33:03 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_=28eBPF_Foundation=29?= X-Patchwork-Id: 13738088 X-Patchwork-Delegate: bpf@iogearbox.net Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) (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 DEFEC166301; Sun, 21 Jul 2024 19:33:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.196 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721590404; cv=none; b=j8SIGq0KHoDdBmcBPsbg7/qgeD9XDc+TxEXppbp6FtfcC2Wj6Hz7dXJxD6akPDLftlXWu32ZI96RQC2wbhWiFHaJHePxeIkEflG5GeBJpQopjZLF0tuCUlli4MToN+qghaLK2xYtMe7ipP22hk4W8HXbc0RwbIi1vuBvfVqad6s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721590404; c=relaxed/simple; bh=iAo487ia/wp3XezejlFMYb+izrM0mct6oShgF6NffGU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=DI/LzS+GM0Clk9qUaG0/KiJaVZj5d90FXhZOR8MfT7kD34roBpmQYVK2e6WVjrJ0h8CkE+Jcd+tj8AmcNzaci9aolYt7etfuviCAcy05Rli03rw5Pmt63DB/XXKDxmJ9/RHzNLGy8Pm5FO+AzrTcXJflaPg+fLzGEu6dljF26oc= 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=Ka3Y07O5; arc=none smtp.client-ip=217.70.183.196 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="Ka3Y07O5" Received: by mail.gandi.net (Postfix) with ESMTPSA id 6FA1EE0002; Sun, 21 Jul 2024 19:33:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1721590393; 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=Ka3Y07O5CEay6bu5kGkLiKyAj3u6aVX9/R0IHgcFwJ1i2WHms1vWBqM8ImoJzJU/u8XqHj 8BrfePTBs8f/68qwtdgh/ectnFvLSOtq/ut6VwL0hZv6/PBegfKqRgY/X9aEoIQSn69pnC /DBPl33IotFrxheA6bEhhYjXEErpB2c4M11QU2BX5ChcW7t9KBBAPDxvQ9DLSUqV5Npjor COjBqiOhbcyhofbm82XhmT6LfirHB2QDPVCt5+ZjAPqUgAvhtdlSRMCxGj87SQgDaePpJ2 flp8HTDSEZUR0/Lf/g8+mJHEny+ZB89JiP5GPJ1g1X1bKs/ddF+APCrEKR2R/w== From: =?utf-8?q?Alexis_Lothor=C3=A9_=28eBPF_Foundation=29?= Date: Sun, 21 Jul 2024 21:33:03 +0200 Subject: [PATCH v4 1/2] selftests/bpf: update xdp_redirect_map prog sections for libbpf Precedence: bulk X-Mailing-List: bpf@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240721-convert_test_xdp_veth-v4-1-23bdba21b2f9@bootlin.com> References: <20240721-convert_test_xdp_veth-v4-0-23bdba21b2f9@bootlin.com> In-Reply-To: <20240721-convert_test_xdp_veth-v4-0-23bdba21b2f9@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 X-Patchwork-Delegate: bpf@iogearbox.net 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);