From nobody Wed Nov 27 16:54:07 2024 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 8E05618E751; Wed, 9 Oct 2024 10:12:24 +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=1728468747; cv=none; b=OBK838GUmFsdRz5psuVIYZp4XB9jMlaySeJr/kmBR31eLoazW03WlAUiK1Buk5xbZZCY4hECgHAulzdWPUmnLl7gZJuSwk6FJas3H3YxkhEcp42P1/JvyPdLnU/VJrtJrXbQ/Bo4YrD+iL18ER8eZRhazegyVPx7TAUZds9iEd0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728468747; c=relaxed/simple; bh=+sARYNDXya94+YnYkLip8MAbxcbLt0ahvueDeRSmTro=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=JcU7tDRFXERXV3pCX9dF+Y4yy8MwBOBxuzCTwECB9SPyXHP9bEIgdxlmkilu9AIh4a2igiUidVTS+fQxPKuDsY+tGC92oLf8GjJDvX9yX+dDMTVl+5tLmVuA/oew3dPNWCAL3ubBx5uKzUtJBQ2tLC+VRKeAHbSS8N+XES6hfQw= 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=PbNAs8+Z; 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="PbNAs8+Z" Received: by mail.gandi.net (Postfix) with ESMTPSA id C980BFF805; Wed, 9 Oct 2024 10:12:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1728468737; 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=wvGaG4iHniQKZT0Rk4g1io76BAEbe8ISZyb9QH08KlU=; b=PbNAs8+Z2DIETxeSLPLqmy15dh91DCTk0b1gZjFq3GVo/+GPi5K6hNAIba4ywTjwhV83Go qHaj2ILOA//oNPBuCSAtte70oumv0qpv1F7L3+StkBQKd8NNNeKkC9JtTmY3c6Y6L2q+Dt G/aBJWZ1gj+MqqyiYvn9q/quT93JlZFpAAyPwNsN/OBOrBUoe0FmjrnNFNIAMt5C6hmPLw z0R7FGLnFUxar6QG5ZauCibgg4aOosB/7tfdQF8Jcx6i9isxc95oe1JXlXx7+qjhSlcjEh FHYksVHknzDisArZ7xz3bcSohDFAUuTBmoeDBzVLrxZBh6anxQd4/cx9+kp+zA== From: =?utf-8?q?Alexis_Lothor=C3=A9_=28eBPF_Foundation=29?= Date: Wed, 09 Oct 2024 12:12:07 +0200 Subject: [PATCH bpf-next v3 1/3] selftests/bpf: fix bpf_map_redirect call for cpu map test Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241009-convert_xdp_tests-v3-1-51cea913710c@bootlin.com> References: <20241009-convert_xdp_tests-v3-0-51cea913710c@bootlin.com> In-Reply-To: <20241009-convert_xdp_tests-v3-0-51cea913710c@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 Cc: ebpf@linuxfoundation.org, Thomas Petazzoni , netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, =?utf-8?q?Alexis_Lothor=C3=A9_=28eBPF_Foundation=29?= X-Mailer: b4 0.14.2 X-GND-Sasl: alexis.lothore@bootlin.com xdp_redir_prog currently redirects packets based on the entry at index 1 in cpu_map, but the corresponding test only manipulates the entry at index 0. This does not really affect the test in its current form since the program is detached before having the opportunity to execute, but it needs to be fixed before being able improve the corresponding test (ie, not only test attach/detach but also the redirect feature) Fix this XDP program by making it redirect packets based on entry 0 in cpu_map instead of entry 1. Signed-off-by: Alexis Lothor=C3=A9 (eBPF Foundation) --- Changes in v3: - new patch --- tools/testing/selftests/bpf/progs/test_xdp_with_cpumap_helpers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/bpf/progs/test_xdp_with_cpumap_helpers= .c b/tools/testing/selftests/bpf/progs/test_xdp_with_cpumap_helpers.c index 20ec6723df18a6e8c036bf7754fbed83f2d2430b..d848fe96924e32a72e1e0327e3a= fffeb349b933e 100644 --- a/tools/testing/selftests/bpf/progs/test_xdp_with_cpumap_helpers.c +++ b/tools/testing/selftests/bpf/progs/test_xdp_with_cpumap_helpers.c @@ -15,7 +15,7 @@ struct { SEC("xdp") int xdp_redir_prog(struct xdp_md *ctx) { - return bpf_redirect_map(&cpu_map, 1, 0); + return bpf_redirect_map(&cpu_map, 0, 0); } =20 SEC("xdp") --=20 2.46.2