From nobody Fri Apr 3 07:58:30 2026 Received: from out-170.mta1.migadu.com (out-170.mta1.migadu.com [95.215.58.170]) (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 BF11033291D for ; Wed, 18 Feb 2026 21:57:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.170 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771451846; cv=none; b=sMQTOBdhHmqKZDhoyPf5O4Uqlgmz3eFMfotvWBkegjge6q2LUMYHhfVWG89+M9fyUtvR2tkpI+xvr+Ro9L4wC0dMV2ndSCZ5N2UnGUg54wf5+pItXo5qbS9LRgswH9/eZUgfQmPd2sKh8QAIrdv6HyWsl8jehVK05Bhf9e28ehE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771451846; c=relaxed/simple; bh=c+WDXqM8sDVsswRFsMkOu3/2l2Qz9rVh8qUGLDvOZ/w=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=OzKMakKy71hWqZTXytgJpeMkMzyBB661C7z1DN/5NBNiFfjsBY5r80Y/6QQGj+tdEjrYThT5+CYN2hqnPOGH8EbyTos89QMkb5Ay8XFT+klkhc9R/MKoAEVKT283DdnIpNCAj8SkHB5XEcto1w1+296HSEd9iNb0qHNhSEjSnho= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=xnJ2uaJo; arc=none smtp.client-ip=95.215.58.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="xnJ2uaJo" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1771451841; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ikI0dMYoKsLjRMmywjlbASCgYtr3sLlx0NAOlszAzGE=; b=xnJ2uaJoL+Wf0+IH7biH3dk9oy5Vgqi87x30B9JUVeK5HwNlrFnsMV+6FLDxF2yTgfEDzC eHtrIuWrsPiWzB0PgA5Rh/IWWbGkSIDrwMV3UWjRrIiEcuXzkBY7ee6g5XxfQ8r9h9zwIp 9G4WWxIYW0WTA+daBlU3gBoJHlAvHs0= From: Ihor Solodrai To: Alexei Starovoitov , Andrii Nakryiko , Daniel Borkmann , Eduard Zingerman Cc: Jakub Sitnicki , bpf@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@meta.com Subject: [PATCH bpf v1 1/2] selftests/bpf: Use vmlinux.h in test_xdp_meta Date: Wed, 18 Feb 2026 13:56:50 -0800 Message-ID: <20260218215651.2057673-2-ihor.solodrai@linux.dev> In-Reply-To: <20260218215651.2057673-1-ihor.solodrai@linux.dev> References: <20260218215651.2057673-1-ihor.solodrai@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT Content-Type: text/plain; charset="utf-8" - Replace linux/* includes with vmlinux.h - Include errno.h - Include bpf_tracing_net.h for TC_ACT_* and ETH_* - Use BPF_STDERR instead of BPF_STREAM_STDERR Signed-off-by: Ihor Solodrai --- tools/testing/selftests/bpf/progs/test_xdp_meta.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/testing/selftests/bpf/progs/test_xdp_meta.c b/tools/test= ing/selftests/bpf/progs/test_xdp_meta.c index 0a0f371a2dec..fa73b17cb999 100644 --- a/tools/testing/selftests/bpf/progs/test_xdp_meta.c +++ b/tools/testing/selftests/bpf/progs/test_xdp_meta.c @@ -1,12 +1,12 @@ -#include -#include -#include -#include -#include +// SPDX-License-Identifier: GPL-2.0 +#include =20 #include #include +#include + #include "bpf_kfuncs.h" +#include "bpf_tracing_net.h" =20 #define META_SIZE 32 =20 @@ -42,7 +42,7 @@ static bool check_metadata(const char *file, int line, __= u8 *meta_have) if (!__builtin_memcmp(meta_have, meta_want, META_SIZE)) return true; =20 - bpf_stream_printk(BPF_STREAM_STDERR, + bpf_stream_printk(BPF_STDERR, "FAIL:%s:%d: metadata mismatch\n" " have:\n %pI6\n %pI6\n" " want:\n %pI6\n %pI6\n", --=20 2.53.0 From nobody Fri Apr 3 07:58:30 2026 Received: from out-172.mta1.migadu.com (out-172.mta1.migadu.com [95.215.58.172]) (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 48641335064; Wed, 18 Feb 2026 21:57:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771451847; cv=none; b=dFA0q/8ZDBWjxCQpWfu6kuA2ZCsbgQKiu83MmJZl2LNcrXJzrMIOqBwcDIMJ1dI6GWZ0mR5nuJ7bZzl/P5UEycFsuO88IDQaKac8hWBHAXqbH2ZUgmkwy/pPzUyCgbsdYhVHxnxeOZQi3rTfpzZve//TmYhooMFJGWmzC6hazWM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771451847; c=relaxed/simple; bh=DRgr1EbFrdyTMoT7piwL2u7hZCduWCNaUokBHV+e5hE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NSdeRWIIrWOdeexR1xLgF+xJ4VfPZpceYtUB0jEL5vIx8uUMElOG4LMfuNwms8h5/zRfPL1+wQW0UKD/G3jTpWXbFutILc4PykDsPjDr8fXyOux8Rc5KXHzuZL3PoQOWbNanNenbNSJuaJKRD1f3nb/gYsYC2o76BLCm3pbGu1s= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=M7Ejn14f; arc=none smtp.client-ip=95.215.58.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="M7Ejn14f" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1771451844; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=afWp1dJ7RUaL93yOIWrXY/cdbONGwsWj/SKBhi2ZCLc=; b=M7Ejn14fzQ50VScpn1Mcf6UmFfYqxQvdxWhP44UnyJi6ehJug+KAb3KP5IRXaJpxDpRLr4 U7/uUiGwCxZAvTL+yqMgvSAD1bqOqo84WQ5/CLHhKzpiBG8CP1Q35OdQIu5IkqAFeLSgj+ VyNFRPxz2OJgg/4smNBqMXdasVhWsK0= From: Ihor Solodrai To: Alexei Starovoitov , Andrii Nakryiko , Daniel Borkmann , Eduard Zingerman Cc: Jakub Sitnicki , bpf@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@meta.com Subject: [PATCH bpf v1 2/2] libbpf: Remove extern declaration of bpf_stream_vprintk() Date: Wed, 18 Feb 2026 13:56:51 -0800 Message-ID: <20260218215651.2057673-3-ihor.solodrai@linux.dev> In-Reply-To: <20260218215651.2057673-1-ihor.solodrai@linux.dev> References: <20260218215651.2057673-1-ihor.solodrai@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT Content-Type: text/plain; charset="utf-8" An issue was reported that building BPF program which includes both vmlinux.h and bpf_helpers.h from libbpf fails due to conflicting declarations of bpf_stream_vprintk(). Remove the extern declaration from bpf_helpers.h to address this. In order to use bpf_stream_printk() macro, BPF programs are expected to either include vmlinux.h of the kernel they are targeting, or add their own extern declaration. Reported-by: Luca Boccassi Closes: https://github.com/libbpf/libbpf/issues/947 Signed-off-by: Ihor Solodrai --- tools/lib/bpf/bpf_helpers.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/tools/lib/bpf/bpf_helpers.h b/tools/lib/bpf/bpf_helpers.h index c145da05a67c..9d160b5b9c0e 100644 --- a/tools/lib/bpf/bpf_helpers.h +++ b/tools/lib/bpf/bpf_helpers.h @@ -315,9 +315,6 @@ enum libbpf_tristate { ___param, sizeof(___param)); \ }) =20 -extern int bpf_stream_vprintk(int stream_id, const char *fmt__str, const v= oid *args, - __u32 len__sz) __weak __ksym; - #define bpf_stream_printk(stream_id, fmt, args...) \ ({ \ static const char ___fmt[] =3D fmt; \ --=20 2.53.0