From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f50.google.com (mail-pj1-f50.google.com [209.85.216.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D1A6F3806C4 for ; Thu, 23 Apr 2026 10:52:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776941551; cv=none; b=o1GLuTtzVgY14Z7DwXDBFTKYtu03Y+j2vJr32EmUo0S79094Vf4CfPBR061c5qublZmyDlj7q0vS1YbqFdX9dpkcSvV63rj03BLi6i4fwRQTje4OC0+LjTnhs0V+dPT1ERuzhs63qsABH1AOiiO/gmH1N1b4cyW8f+JTUDOK8vk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776941551; c=relaxed/simple; bh=wq1Cu8bZXdxkc1IEjaOXG3kJSBniOcazTJJjusnkaCA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Bz7XIGixFnK4vZl4YNWr72PiZkWpj0WAQYfWfcCMX7EUJBUm7fuaZx9+Vy8uU07WxIkj9hfojp/brlKqIdsjAQTVvpp1vfdufei1oe2SQtT5ss3S+DwHQwB5BmiCM5RH+wJKAiIyzDOnQWfubzfkaUIzykMwc6Cd/SS7bM8sIDI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=VKZK9V5H; arc=none smtp.client-ip=209.85.216.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="VKZK9V5H" Received: by mail-pj1-f50.google.com with SMTP id 98e67ed59e1d1-35da8d037a5so3148671a91.0 for ; Thu, 23 Apr 2026 03:52:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1776941549; x=1777546349; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=OeNLLevQh3pBYAO6lXAZTdw0TrOMFI6h3YnGdTBUiYQ=; b=VKZK9V5Huo+WB4bmsS98C4hhHBTVcwFG6ZDszYozrLtqKuVfduLVPRd9ofWjILbXMr 5U2PlE6wfxBwoAQaSEU/X2gXrYS9/sX+QzSD4F9vUBfyjrJl81Bg8OslOWBTGsgWT06X VOUK0MHzf7qmyAxGtVO4ybuuG30h2hwy5NdRh5mp8sGSCSkfeOABoEp4mubaQZSCCjJk GJYUNgs0ALTH3stfrB7iN6JRMjw6jRzkHiTHKits2ObZaM95KzukWxDzjvSA9ZDmjmMF wLAKlsVKb1QtUfsGgsalRjgGzW3ZMWPtGeTibqoFNsTz2Upl/WWsLTjLJ4FHXaQ/DSGn VgnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776941549; x=1777546349; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OeNLLevQh3pBYAO6lXAZTdw0TrOMFI6h3YnGdTBUiYQ=; b=kumFoLXILjuKJt89uvn7zFw8IcLvcUmPTJEm6MBi5MVgEVtuCax4DxWlS+5B9udYyf tO/WdHLgvrYKRtyHqVhzZ0d+7j4lV5N35yg1VZZBlPAmaVZxXecyxed1/ulTF1TDWJQI 7Ai1GFkvPqd6vFcIB8kX/BzfWEpzF4896Mn3Gi5AiC3N244Hrr7fCy3RDjvzs0lUEYXl OlUvBi2gebop14slZlGtg10JxZaiohMfJUyG9OptigfkqRUqA9jsSrJBUKxM/9W8gRWA E7Q29gK/6P2ygiECm/P1ExdDiqsVwAT151ncYYpk/eQ7JrFY0Kwp/BGnsSY6ooSiKwjr LHKg== X-Forwarded-Encrypted: i=1; AFNElJ/iZaeg1ynVLkwokfa8JmhL/OnWpW8oV7/Q+jc18cj5WwuhJsikjV8vPUt3VKn1UeVihIRC3zWrSxOIetk=@vger.kernel.org X-Gm-Message-State: AOJu0YyRdIGwbhRdT0cjwyCYTVrjipYs0Netn1WOJtvrvEOhAnWIl2uw bjv9o/CFUr93ih2oG3g4Xy0iTZ6vShIi9ROFvRll2gTNWRg3LieePgr6GAlE6GXS X-Gm-Gg: AeBDieveIBncUrSDYTah6g5LSdqGhle/3/JyFOXEMCTrlPaLTMT4arnZ+Pqu0twC3B6 nGkVrN7eh8xsaFijd7I9Gfk3fFnXKDpT1MChy5IGpq2nvFdN+PsW3azmnerEX2hk7xR+gzI5kSY QEvSwuivewQOTS3kr3IsvJp1oKs5OAdA0+ue/o8bpuHj08gtDbU2LXV+KJBCGwB2RV0HRMqfvqM H//yBLf2vsbpsGXh/9+lLXaxDTNFZGUV1v2aK0Qa5pI1mNwB5J31tmLyrx0mxxtwQStb6ufLaH6 kXfBK1NtRB1YMwQ6Z7zwEvTwmCa12e2rZJENYegf90rpsxYJ+r0kqY8GbLhNacpnLCLELgTFPph cPkA+gHR8q3tgiD2tWe337CzGHpBvypTrzy9X7Z2oFCfMEbBm9ZN5tFE1WgyZMxX4up1dLcG0Ad 4S6TgDfnpaz5xPkqlXDnPq6WlpSiyiYkooPYFq/QRRdMJOPjSBFUFIRQu1XmsFXgfdHL+0SP1Hk R975CimJgucF36Y X-Received: by 2002:a17:90b:5544:b0:356:22ef:57ba with SMTP id 98e67ed59e1d1-361403dfee7mr25650866a91.7.1776941549066; Thu, 23 Apr 2026 03:52:29 -0700 (PDT) Received: from cchengyang.duckdns.org (36-225-83-234.dynamic-ip.hinet.net. [36.225.83.234]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3614189343esm19666810a91.6.2026.04.23.03.52.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Apr 2026 03:52:28 -0700 (PDT) Date: Thu, 23 Apr 2026 18:52:24 +0800 From: Cheng-Yang Chou To: Zhao Mengmeng Cc: Tejun Heo , David Vernet , Andrea Righi , Changwoo Min , sched-ext@lists.linux.dev, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org, Zhao Mengmeng , Ching-Chun Huang , Chia-Ping Tsai Subject: Re: [PATCH] selftests/sched_ext: Include common.bpf.h to avoid build failure Message-ID: <20260423184955.G2144@cchengyang.duckdns.org> References: <20260423-b4-selftest-fix-v1-1-8c72287bde3d@kylinos.cn> 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=us-ascii Content-Disposition: inline In-Reply-To: <20260423-b4-selftest-fix-v1-1-8c72287bde3d@kylinos.cn> Hi Zhao, On Thu, Apr 23, 2026 at 06:42:35PM +0800, Zhao Mengmeng wrote: > From: Zhao Mengmeng > > In scx-cid patchsets, sched_ext selftest failed to build with following > error: > > non_scx_kfunc_deny.bpf.c:17:6: error: conflicting types for 'scx_bpf_kick_cpu' > 17 | void scx_bpf_kick_cpu(s32 cpu, u64 flags) __ksym; > | ^ > tools/testing/selftests/sched_ext/build/include/vmlinux.h:136300:13: note: previous declaration is here > 136300 | extern void scx_bpf_kick_cpu(s32 cpu, u64 flags, const struct bpf_prog_aux *aux) __weak __ksym; > | ^ > non_scx_kfunc_deny.bpf.c:26:23: error: too few arguments to function call, expected 3, have 2 > 26 | scx_bpf_kick_cpu(0, 0); > | ~~~~~~~~~~~~~~~~ ^ > tools/testing/selftests/sched_ext/build/include/vmlinux.h:136300:13: note: 'scx_bpf_kick_cpu' declared here > 136300 | extern void scx_bpf_kick_cpu(s32 cpu, u64 flags, const struct bpf_prog_aux *aux) __weak __ksym; > > The root cause is on scx core part, but we can avoid this by including > common.bpf.h and remove scx_bpf_kick_cpu() to make it more robust, just > like the usage in other xx.bpf.c. > > Link: https://lore.kernel.org/sched-ext/20260421071945.3110084-1-tj@kernel.org/ > Signed-off-by: Zhao Mengmeng > Tested-by: Cheng-Yang Chou Thanks for the fix, LGTM! > --- > tools/testing/selftests/sched_ext/non_scx_kfunc_deny.bpf.c | 7 +------ > 1 file changed, 1 insertion(+), 6 deletions(-) > > diff --git a/tools/testing/selftests/sched_ext/non_scx_kfunc_deny.bpf.c b/tools/testing/selftests/sched_ext/non_scx_kfunc_deny.bpf.c > index 9f16d39255e7..0d6fcc8e5eb6 100644 > --- a/tools/testing/selftests/sched_ext/non_scx_kfunc_deny.bpf.c > +++ b/tools/testing/selftests/sched_ext/non_scx_kfunc_deny.bpf.c > @@ -9,12 +9,7 @@ > * Copyright (C) 2026 Cheng-Yang Chou > */ > > -#include > -#include > -#include > - > -/* SCX kfunc from scx_kfunc_ids_any set */ > -void scx_bpf_kick_cpu(s32 cpu, u64 flags) __ksym; > +#include > > SEC("struct_ops/ssthresh") > __u32 BPF_PROG(tcp_ca_ssthresh, struct sock *sk) > > --- > base-commit: eff158514a85c1b81966667a880dd8bcd29bbbd1 > change-id: 20260423-b4-selftest-fix-d87cdda6185e > > Best regards, > -- > Zhao Mengmeng > -- Cheers, Cheng-Yang