From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 0C60A26561C; Tue, 8 Apr 2025 11:22:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744111361; cv=none; b=g5++KXIHTCyQoK2scWYECduCW23+TSecx8OEGzMe2Blx41EdwsauT6HARxOSfV64XchgDK2qrRNt1G6+cRTHh2oOKYtWdnnWQ7Cy8LCYxWY6QK6EcHngDsU9nPX2LylaU33sFSEcMaO+axDXiTs606UAl0pUbL4YO146Wtv5FgM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744111361; c=relaxed/simple; bh=Hx4toyyDH7fIsWgPCcrex3Hsrknckv+v5AzXeoWefJ4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=WTiCAo00isgQzpmDMvX70pzjRVDUgmHX6R50gtRbQBeG+dS7q8uLsmgFZG1rlELYerNo5zhok/cLfu056Iyp/Jsm2pUo2Y1ExQgs547dekMwLoPp7nh7GGkmIlQ6hGOT83YlJ2DTd8MVOk2MF4RuwReMUTdpg6iWnlTSIpaLgbg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=R+KjM4fn; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="R+KjM4fn" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 60B25C4CEE5; Tue, 8 Apr 2025 11:22:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1744111360; bh=Hx4toyyDH7fIsWgPCcrex3Hsrknckv+v5AzXeoWefJ4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=R+KjM4fn5mwP5TPTolP2SncnoiWB8opILqRdcoyC8LymxUUdlTsXnVTGKkV8x6qxu 0tQIHBTwgka3CAkrVbCLjw54rLSXDoCvkkaT/4OfGiwxQixarSOoT2z9lCGzE7P7Vu /nUwKKxwmuPSBABcjfD/4FBrhxZjnHC5GQs7CtKA= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Saket Kumar Bhaskar , Andrii Nakryiko , Yonghong Song , Sasha Levin Subject: [PATCH 6.14 404/731] selftests/bpf: Select NUMA_NO_NODE to create map Date: Tue, 8 Apr 2025 12:45:01 +0200 Message-ID: <20250408104923.670807910@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250408104914.247897328@linuxfoundation.org> References: <20250408104914.247897328@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Saket Kumar Bhaskar [ Upstream commit 4107a1aeb20ed4cdad6a0d49de92ea0f933c71b7 ] On powerpc, a CPU does not necessarily originate from NUMA node 0. This contrasts with architectures like x86, where CPU 0 is not hot-pluggable, making NUMA node 0 a consistently valid node. This discrepancy can lead to failures when creating a map on NUMA node 0, which is initialized by default, if no CPUs are allocated from NUMA node 0. This patch fixes the issue by setting NUMA_NO_NODE (-1) for map creation for this selftest. Fixes: 96eabe7a40aa ("bpf: Allow selecting numa node during map creation") Signed-off-by: Saket Kumar Bhaskar Signed-off-by: Andrii Nakryiko Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/cf1f61468b47425ecf3728689bc9636ddd1d910e.1738302337.git.skb99@linux.ibm.com Signed-off-by: Sasha Levin --- tools/testing/selftests/bpf/prog_tests/bloom_filter_map.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/testing/selftests/bpf/prog_tests/bloom_filter_map.c b/tools/testing/selftests/bpf/prog_tests/bloom_filter_map.c index cc184e4420f6e..67557cda22083 100644 --- a/tools/testing/selftests/bpf/prog_tests/bloom_filter_map.c +++ b/tools/testing/selftests/bpf/prog_tests/bloom_filter_map.c @@ -6,6 +6,10 @@ #include #include "bloom_filter_map.skel.h" +#ifndef NUMA_NO_NODE +#define NUMA_NO_NODE (-1) +#endif + static void test_fail_cases(void) { LIBBPF_OPTS(bpf_map_create_opts, opts); @@ -69,6 +73,7 @@ static void test_success_cases(void) /* Create a map */ opts.map_flags = BPF_F_ZERO_SEED | BPF_F_NUMA_NODE; + opts.numa_node = NUMA_NO_NODE; fd = bpf_map_create(BPF_MAP_TYPE_BLOOM_FILTER, NULL, 0, sizeof(value), 100, &opts); if (!ASSERT_GE(fd, 0, "bpf_map_create bloom filter success case")) return; -- 2.39.5