From patchwork Mon Jan 20 13:06:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Toke_H=C3=B8iland-J=C3=B8rgensen?= X-Patchwork-Id: 208899 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C070AC2D0DB for ; Mon, 20 Jan 2020 13:08:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 98F7022522 for ; Mon, 20 Jan 2020 13:08:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="bhX7yiQC" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727688AbgATNGr (ORCPT ); Mon, 20 Jan 2020 08:06:47 -0500 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:28249 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727289AbgATNGr (ORCPT ); Mon, 20 Jan 2020 08:06:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1579525606; 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=oVICxkwYE819T09jumS9b6kqZZVW9alGabNhw2Byv4c=; b=bhX7yiQC06ov8M3HpddvHv1pG1e/EwEZ6AzVoYP+YZaot0iUufBUXPWd1c8e7WTe+FmGBj HSllop26wd/fEU9wb3SCNorMgXZ+JGdZAJLmxDIbzeDNgMedZR+zw3NS3Awlkhlu2Oe42k tuHM1oxS0oGxA5+lE/ec2khu+6SZ1AE= Received: from mail-lj1-f200.google.com (mail-lj1-f200.google.com [209.85.208.200]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-286-jxfYp7ZhOXmqOffpz_V1dg-1; Mon, 20 Jan 2020 08:06:45 -0500 X-MC-Unique: jxfYp7ZhOXmqOffpz_V1dg-1 Received: by mail-lj1-f200.google.com with SMTP id z17so7516645ljz.2 for ; Mon, 20 Jan 2020 05:06:44 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:date:message-id:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=oVICxkwYE819T09jumS9b6kqZZVW9alGabNhw2Byv4c=; b=ZaNTM7tjFGzkSi+2UQ/KJkgeTXDaD7Y7d/sLDABKkq9smD9cBF2+SV+Lqe83xBnud9 SNSXQBmUyMiiLwjzHBP0uh01w8VXMAGj6BKEtNndkQQy+vJGYm/D+0xmNJVXoumqi84N s3ZlYRvmwWKu9VQey14R5nvNLRLQmKhd7RadrfQnw/qxVuAi5b4B1WmGcbop1JQdsvkJ 9CqYfpjHuYsqH+gJQslgCEAtmLWua9BYfPrvzSdUXhnExQFOjM+u3KJWtsYb65OWYLP6 rMt1uFED4d1nu7yVtmaTUEEOv0ZqWrKnQJWlwvZAXLUH5NZgUvWaDUkX0T56fjKDcP9h atlQ== X-Gm-Message-State: APjAAAUivZ8IdX4H5a2pxf4hM00EufJK4P1zYeZyS/yzfWyV+3qH56mU JXACaj5vFc7TkYXqIta265YZ/KDCYC9heDYlT0wnolmmfRd7v+gfowrDeKpDgD9CdzihxYVLjAP 0A/7r9lpbAmhBqLn/+KG07ZV8fmzI X-Received: by 2002:a2e:9015:: with SMTP id h21mr13901701ljg.69.1579525603444; Mon, 20 Jan 2020 05:06:43 -0800 (PST) X-Google-Smtp-Source: APXvYqxl6cjsyjw8Scl4Npe4TQQoKpYIFE7qfthL3twnuQzv1KZL4kmSTEjNXwjKvkvlIou0OEBbwA== X-Received: by 2002:a2e:9015:: with SMTP id h21mr13901661ljg.69.1579525603114; Mon, 20 Jan 2020 05:06:43 -0800 (PST) Received: from alrua-x1.borgediget.toke.dk ([2a0c:4d80:42:443::2]) by smtp.gmail.com with ESMTPSA id z5sm16825740lji.40.2020.01.20.05.06.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jan 2020 05:06:42 -0800 (PST) Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000) id 59E971804D7; Mon, 20 Jan 2020 14:06:41 +0100 (CET) Subject: [PATCH bpf-next v5 01/11] samples/bpf: Don't try to remove user's homedir on clean From: =?utf-8?q?Toke_H=C3=B8iland-J=C3=B8rgensen?= To: Alexei Starovoitov Cc: Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , Andrii Nakryiko , Doug Ledford , Jason Gunthorpe , "David S. Miller" , Jakub Kicinski , Jesper Dangaard Brouer , John Fastabend , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Shuah Khan , netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, linux-kselftest@vger.kernel.org, clang-built-linux@googlegroups.com Date: Mon, 20 Jan 2020 14:06:41 +0100 Message-ID: <157952560126.1683545.7273054725976032511.stgit@toke.dk> In-Reply-To: <157952560001.1683545.16757917515390545122.stgit@toke.dk> References: <157952560001.1683545.16757917515390545122.stgit@toke.dk> User-Agent: StGit/0.21 MIME-Version: 1.0 Sender: linux-kselftest-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org From: Toke Høiland-Jørgensen The 'clean' rule in the samples/bpf Makefile tries to remove backup files (ending in ~). However, if no such files exist, it will instead try to remove the user's home directory. While the attempt is mostly harmless, it does lead to a somewhat scary warning like this: rm: cannot remove '~': Is a directory Fix this by using find instead of shell expansion to locate any actual backup files that need to be removed. Fixes: b62a796c109c ("samples/bpf: allow make to be run from samples/bpf/ directory") Acked-by: Jesper Dangaard Brouer Signed-off-by: Toke Høiland-Jørgensen --- samples/bpf/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile index 5b89c0370f33..f86d713a17a5 100644 --- a/samples/bpf/Makefile +++ b/samples/bpf/Makefile @@ -254,7 +254,7 @@ all: clean: $(MAKE) -C ../../ M=$(CURDIR) clean - @rm -f *~ + @find $(CURDIR) -type f -name '*~' -delete $(LIBBPF): FORCE # Fix up variables inherited from Kbuild that tools/ build system won't like From patchwork Mon Jan 20 13:06:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Toke_H=C3=B8iland-J=C3=B8rgensen?= X-Patchwork-Id: 208900 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8E21AC33CB8 for ; Mon, 20 Jan 2020 13:07:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6527822314 for ; Mon, 20 Jan 2020 13:07:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="h6N1aw1u" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726999AbgATNHp (ORCPT ); Mon, 20 Jan 2020 08:07:45 -0500 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:55589 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728655AbgATNGt (ORCPT ); Mon, 20 Jan 2020 08:06:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1579525608; 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=MkLSYm3mzAZXDQgD2SVlnhnv45Ao3CBk7NzaRvQfH7U=; b=h6N1aw1ubvrOW7G/ysDHROfT28oEufwwPWGsJlAh84H+szBE/QZp2vaYy3MgJtFDPzapAx p26sOUz2hIzznXG3QbFzfehKKEFkYg74WSn4Gw2v/+tPy4Y4h6+yWLbTRdjZ2bad+cD8/Y Yd65urD5zM7fvSl8FoxX0bPVQIrKBOo= Received: from mail-lf1-f70.google.com (mail-lf1-f70.google.com [209.85.167.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-427-AcOn5KtnOLOOleTKRQa09A-1; Mon, 20 Jan 2020 08:06:47 -0500 X-MC-Unique: AcOn5KtnOLOOleTKRQa09A-1 Received: by mail-lf1-f70.google.com with SMTP id b22so336330lfa.16 for ; Mon, 20 Jan 2020 05:06:46 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:date:message-id:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=MkLSYm3mzAZXDQgD2SVlnhnv45Ao3CBk7NzaRvQfH7U=; b=iqrKMW/8VGDkkDPEebXmku5ZqSAcMDfNK3bx0+xWemVr6uZi/C14/BK4YlHjW8Wq3a 6DwdMOdn5Ca1i7WjtQ3FRjGe79E+uEh8cnkbyrwLWwNvHq7zELwVtlo/JQXYggzdGpps jXAHTKPvEp81h2rx4F9CpVMN8Ryo4rvb6Acru/EFVBkJ6zrc6IpRf+oxVASLP7fMpDaF VL1yZJFzuFw/0ZQ292N8kESxAFPMoGnJjjgBDCqu4TJz01GCq0E2+rW3H22/FK8JVCey Lrbzefix/pVwDW8SWC5faEJ7Vm0DWmsxhluDixd1c4yAwAPi30HKrFAlkiatZuLkfC3U cKmQ== X-Gm-Message-State: APjAAAURIGynhsmes4dt7bn2gxUmXpka5FuFbWfMdRPzU2SP4xNoUkr3 Md6iv67JuNwvSHUAVYZMpAcwb2/iZ0K5BFG87morB/NDNccCfrMi6vYd5VXfWcGRySUTnluygJs o05g0cUheP9S58LjOl44uov8ymKx9 X-Received: by 2002:ac2:5e2e:: with SMTP id o14mr7404708lfg.198.1579525605660; Mon, 20 Jan 2020 05:06:45 -0800 (PST) X-Google-Smtp-Source: APXvYqxxFiThs7woU8NNE+Z3Xi+dI52IZDR8cAEXZMjePibrZkF51mtKKwxYoZzZkPgd0sMDCRYfMg== X-Received: by 2002:ac2:5e2e:: with SMTP id o14mr7404688lfg.198.1579525605362; Mon, 20 Jan 2020 05:06:45 -0800 (PST) Received: from alrua-x1.borgediget.toke.dk ([85.204.121.218]) by smtp.gmail.com with ESMTPSA id b22sm20503583lji.99.2020.01.20.05.06.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jan 2020 05:06:44 -0800 (PST) Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000) id 89C7B1804D7; Mon, 20 Jan 2020 14:06:43 +0100 (CET) Subject: [PATCH bpf-next v5 03/11] selftests: Pass VMLINUX_BTF to runqslower Makefile From: =?utf-8?q?Toke_H=C3=B8iland-J=C3=B8rgensen?= To: Alexei Starovoitov Cc: Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , Andrii Nakryiko , Doug Ledford , Jason Gunthorpe , "David S. Miller" , Jakub Kicinski , Jesper Dangaard Brouer , John Fastabend , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Shuah Khan , netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, linux-kselftest@vger.kernel.org, clang-built-linux@googlegroups.com Date: Mon, 20 Jan 2020 14:06:43 +0100 Message-ID: <157952560344.1683545.2723631988771664417.stgit@toke.dk> In-Reply-To: <157952560001.1683545.16757917515390545122.stgit@toke.dk> References: <157952560001.1683545.16757917515390545122.stgit@toke.dk> User-Agent: StGit/0.21 MIME-Version: 1.0 Sender: linux-kselftest-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org From: Toke Høiland-Jørgensen Add a VMLINUX_BTF variable with the locally-built path when calling the runqslower Makefile from selftests. This makes sure a simple 'make' invocation in the selftests dir works even when there is no BTF information for the running kernel. Do a wildcard expansion and include the same paths for BTF for the running kernel as in the runqslower Makefile, to make it possible to build selftests without having a vmlinux in the local tree. Also fix the make invocation to use $(OUTPUT)/tools as the destination directory instead of $(CURDIR)/tools. Fixes: 3a0d3092a4ed ("selftests/bpf: Build runqslower from selftests") Acked-by: Andrii Nakryiko Signed-off-by: Toke Høiland-Jørgensen --- tools/testing/selftests/bpf/Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile index 246d09ffb296..8240282aef7f 100644 --- a/tools/testing/selftests/bpf/Makefile +++ b/tools/testing/selftests/bpf/Makefile @@ -124,10 +124,14 @@ $(OUTPUT)/test_stub.o: test_stub.c $(call msg,CC,,$@) $(CC) -c $(CFLAGS) -o $@ $< +VMLINUX_BTF_PATHS := $(abspath ../../../../vmlinux) \ + /sys/kernel/btf/vmlinux \ + /boot/vmlinux-$(shell uname -r) +VMLINUX_BTF:= $(firstword $(wildcard $(VMLINUX_BTF_PATHS))) .PHONY: $(OUTPUT)/runqslower $(OUTPUT)/runqslower: force - $(Q)$(MAKE) $(submake_extras) -C $(TOOLSDIR)/bpf/runqslower \ - OUTPUT=$(CURDIR)/tools/ + $(Q)$(MAKE) $(submake_extras) -C $(TOOLSDIR)/bpf/runqslower \ + OUTPUT=$(OUTPUT)/tools/ VMLINUX_BTF=$(VMLINUX_BTF) BPFOBJ := $(OUTPUT)/libbpf.a From patchwork Mon Jan 20 13:06:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Toke_H=C3=B8iland-J=C3=B8rgensen?= X-Patchwork-Id: 208901 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A268CC2D0DB for ; Mon, 20 Jan 2020 13:07:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6951722527 for ; Mon, 20 Jan 2020 13:07:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="BGnzmZRn" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729271AbgATNHf (ORCPT ); Mon, 20 Jan 2020 08:07:35 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:49611 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727117AbgATNGx (ORCPT ); Mon, 20 Jan 2020 08:06:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1579525612; 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=kZR8zX+ydWBbBu89eT3Dfy7pXd3GWbtA0n7Gp7hmhwM=; b=BGnzmZRnQ6nKpjgoarUwWdbz+0/tj62PJGwNt3gFOXH/vPlLZEpXUdPTlVCVwiVuvS2dbO HiHRO14IWlz/btOJgrQrcBiO7KPh4FuAPCY4oD5F2O+2VJKozCyf60CNYUlpiPKY21tvvA fPZX5aivgK1aUmje1oIW7g1UdiDC+S4= Received: from mail-lf1-f70.google.com (mail-lf1-f70.google.com [209.85.167.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-316-7Lm7_3--MG-1-4-KzuSCnw-1; Mon, 20 Jan 2020 08:06:51 -0500 X-MC-Unique: 7Lm7_3--MG-1-4-KzuSCnw-1 Received: by mail-lf1-f70.google.com with SMTP id w72so6221421lff.20 for ; Mon, 20 Jan 2020 05:06:51 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:date:message-id:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=kZR8zX+ydWBbBu89eT3Dfy7pXd3GWbtA0n7Gp7hmhwM=; b=mhRj6XV2/CQE1g4HAYqUt4+YHuI1vDKGYXapqMdL7D1UbRyX2tfMd3F4D/bxZoJlcW uInaYl9ks4sedi02jpwgQDAZEQ1IVv1FT619/9Z3b6hMOdNKox4xEBoqbs4deKlmsrSY a48PfktEvopILg58nAWyxuD85l7vRhpUwhN0dfD3j6Jq4z9BqtqO9KsqoruzRMIcR/2o n11gPPMQS1gnpNxyE0JhP9cJHrFG/oe2FnRH+CJuSC5AQM1K8hxDI60HSFrzlaC8iRK5 /P0Yuey0iyOOwhWPRSn/KYP6z2oIqeBy1l9E5bwcgov2FaPzNLN4bwkaptysp5oBdpYX yIvA== X-Gm-Message-State: APjAAAVSwUqAWkn80LBJxbvoV1qK8ry31jsu8ELLbb1crO67kmnGxEyR J+sNFLULalwe+tQGV+5o/+2PpDv4zhac9vAe39jmvAdfArJ1s5zRYfKk0dpOgEsJl4vz3V0Yagj C+M9fYW4HKiTBAJ64IgwKUlw5tUpu X-Received: by 2002:a19:c82:: with SMTP id 124mr6361232lfm.152.1579525610209; Mon, 20 Jan 2020 05:06:50 -0800 (PST) X-Google-Smtp-Source: APXvYqzP2QdGmR9drjELXs9stfRKxX9t6uODuDCYi7BoHCel4Br99OHqeQNYuT6HeyyQr5h3NkqBng== X-Received: by 2002:a19:c82:: with SMTP id 124mr6361203lfm.152.1579525609886; Mon, 20 Jan 2020 05:06:49 -0800 (PST) Received: from alrua-x1.borgediget.toke.dk ([85.204.121.218]) by smtp.gmail.com with ESMTPSA id y1sm16673362ljm.12.2020.01.20.05.06.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jan 2020 05:06:48 -0800 (PST) Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000) id 1BCA01804D8; Mon, 20 Jan 2020 14:06:48 +0100 (CET) Subject: [PATCH bpf-next v5 07/11] perf: Use consistent include paths for libbpf From: =?utf-8?q?Toke_H=C3=B8iland-J=C3=B8rgensen?= To: Alexei Starovoitov Cc: Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , Andrii Nakryiko , Doug Ledford , Jason Gunthorpe , "David S. Miller" , Jakub Kicinski , Jesper Dangaard Brouer , John Fastabend , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Shuah Khan , netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, linux-kselftest@vger.kernel.org, clang-built-linux@googlegroups.com Date: Mon, 20 Jan 2020 14:06:48 +0100 Message-ID: <157952560797.1683545.7685921032671386301.stgit@toke.dk> In-Reply-To: <157952560001.1683545.16757917515390545122.stgit@toke.dk> References: <157952560001.1683545.16757917515390545122.stgit@toke.dk> User-Agent: StGit/0.21 MIME-Version: 1.0 Sender: linux-kselftest-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org From: Toke Høiland-Jørgensen Fix perf to include libbpf header files with the bpf/ prefix, to be consistent with external users of the library. Acked-by: Andrii Nakryiko Signed-off-by: Toke Høiland-Jørgensen --- tools/perf/examples/bpf/5sec.c | 2 +- tools/perf/examples/bpf/empty.c | 2 +- tools/perf/examples/bpf/sys_enter_openat.c | 2 +- tools/perf/include/bpf/pid_filter.h | 2 +- tools/perf/include/bpf/stdio.h | 2 +- tools/perf/include/bpf/unistd.h | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/perf/examples/bpf/5sec.c b/tools/perf/examples/bpf/5sec.c index b9c203219691..49f4f84da485 100644 --- a/tools/perf/examples/bpf/5sec.c +++ b/tools/perf/examples/bpf/5sec.c @@ -39,7 +39,7 @@ Copyright (C) 2018 Red Hat, Inc., Arnaldo Carvalho de Melo */ -#include +#include int probe(hrtimer_nanosleep, rqtp->tv_sec)(void *ctx, int err, long sec) { diff --git a/tools/perf/examples/bpf/empty.c b/tools/perf/examples/bpf/empty.c index 3776d26db9e7..7d7fb0c9fe76 100644 --- a/tools/perf/examples/bpf/empty.c +++ b/tools/perf/examples/bpf/empty.c @@ -1,3 +1,3 @@ -#include +#include license(GPL); diff --git a/tools/perf/examples/bpf/sys_enter_openat.c b/tools/perf/examples/bpf/sys_enter_openat.c index 9cd124b09392..c4481c390d23 100644 --- a/tools/perf/examples/bpf/sys_enter_openat.c +++ b/tools/perf/examples/bpf/sys_enter_openat.c @@ -14,7 +14,7 @@ * the return value. */ -#include +#include struct syscall_enter_openat_args { unsigned long long unused; diff --git a/tools/perf/include/bpf/pid_filter.h b/tools/perf/include/bpf/pid_filter.h index 6e61c4bdf548..607189a315b2 100644 --- a/tools/perf/include/bpf/pid_filter.h +++ b/tools/perf/include/bpf/pid_filter.h @@ -3,7 +3,7 @@ #ifndef _PERF_BPF_PID_FILTER_ #define _PERF_BPF_PID_FILTER_ -#include +#include #define pid_filter(name) pid_map(name, bool) diff --git a/tools/perf/include/bpf/stdio.h b/tools/perf/include/bpf/stdio.h index 316af5b2ff35..7ca6fa5463ee 100644 --- a/tools/perf/include/bpf/stdio.h +++ b/tools/perf/include/bpf/stdio.h @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 -#include +#include struct bpf_map SEC("maps") __bpf_stdout__ = { .type = BPF_MAP_TYPE_PERF_EVENT_ARRAY, diff --git a/tools/perf/include/bpf/unistd.h b/tools/perf/include/bpf/unistd.h index ca7877f9a976..d1a35b6c649d 100644 --- a/tools/perf/include/bpf/unistd.h +++ b/tools/perf/include/bpf/unistd.h @@ -1,6 +1,6 @@ // SPDX-License-Identifier: LGPL-2.1 -#include +#include static int (*bpf_get_current_pid_tgid)(void) = (void *)BPF_FUNC_get_current_pid_tgid; From patchwork Mon Jan 20 13:06:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Toke_H=C3=B8iland-J=C3=B8rgensen?= X-Patchwork-Id: 208903 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 40F34C33CAA for ; Mon, 20 Jan 2020 13:07:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0DDDE21D7E for ; Mon, 20 Jan 2020 13:07:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="XzIsg+Ah" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729144AbgATNHD (ORCPT ); Mon, 20 Jan 2020 08:07:03 -0500 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:27424 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729092AbgATNHC (ORCPT ); Mon, 20 Jan 2020 08:07:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1579525621; 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=JyRp3l6AOwRTiJ2eAm7wsXaTFpgYg30fqN3mquU0y+o=; b=XzIsg+AhST5i8vwVJsWPrSaJ/XWOUOKg/5NVeHcI3REk2lI3n77VHJt9uXYNhwFjeYu+4r PAqbWV5QucUM6571VnPL+1B6FDUIqLeLGAQ1NycI5BoGsT64Zucw3v1ey++wMDQL5lKq7m DW+ahxIz7cbw6QcgQ7H8jlhGjaEXjKQ= Received: from mail-lj1-f197.google.com (mail-lj1-f197.google.com [209.85.208.197]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-237-Np__jeYUN5qgXZVtGoJvOA-1; Mon, 20 Jan 2020 08:06:58 -0500 X-MC-Unique: Np__jeYUN5qgXZVtGoJvOA-1 Received: by mail-lj1-f197.google.com with SMTP id j23so7534098lji.23 for ; Mon, 20 Jan 2020 05:06:58 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:date:message-id:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=JyRp3l6AOwRTiJ2eAm7wsXaTFpgYg30fqN3mquU0y+o=; b=WYvUgD+IMmiLAm2e40XR+eyxWmi2UgfHsOonBiYSPNI7ENepReGEQIpwM5WLQ8mLxP zcnpQRVn2Q54O7WevLsdttJc/gltZIr81wyoDH6r/wzNcp3bmrOod2UOK8uZ6bKxy0UD nzaRbYepa9lta34aCvCy0btKGohm5eKJLuJvXA9kEnE9ZKFIEC096Ppl+Qv9OzdIyIV7 GnMmQ0ypSgm/CNxRaIafExgcIfWqcgMrK/BX2TXV6uBsloNzz1UiRomzl3RGXms2AY+L cOxureVjLjYhi7aQ4FR8WU4x3sqr/uox1CE/01dgfrxnWYTLCmOW8HkrGf5zbtGQD+p+ XvTg== X-Gm-Message-State: APjAAAUta1sH+1TgphWQxeM4dC9BnzklX8Aod8poT1cLJ90Wl4wW/dpo ZMTAxgWxHGDfXO+1BKjv0BT7qjhIXtgHvau6Yxka/CKHYULQ3hTg9LHOcGpmiA1/dX+zh7ua2ns PIcUn0Rdbe6o+qqq9tVVk8cWtm27S X-Received: by 2002:a2e:a168:: with SMTP id u8mr14142963ljl.5.1579525614237; Mon, 20 Jan 2020 05:06:54 -0800 (PST) X-Google-Smtp-Source: APXvYqyT4U/nA5Zg30wJQdy7Dt8tPnqtKJuHbZ6ydmSlJbVZhrwumqG6hjnfmqeMmszpVPOCKs8Gaw== X-Received: by 2002:a2e:a168:: with SMTP id u8mr14142918ljl.5.1579525613394; Mon, 20 Jan 2020 05:06:53 -0800 (PST) Received: from alrua-x1.borgediget.toke.dk ([85.204.121.218]) by smtp.gmail.com with ESMTPSA id u16sm16548115ljo.22.2020.01.20.05.06.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jan 2020 05:06:51 -0800 (PST) Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000) id 41C251804D7; Mon, 20 Jan 2020 14:06:49 +0100 (CET) Subject: [PATCH bpf-next v5 08/11] samples/bpf: Use consistent include paths for libbpf From: =?utf-8?q?Toke_H=C3=B8iland-J=C3=B8rgensen?= To: Alexei Starovoitov Cc: Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , Andrii Nakryiko , Doug Ledford , Jason Gunthorpe , "David S. Miller" , Jakub Kicinski , Jesper Dangaard Brouer , John Fastabend , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Shuah Khan , netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, linux-kselftest@vger.kernel.org, clang-built-linux@googlegroups.com Date: Mon, 20 Jan 2020 14:06:49 +0100 Message-ID: <157952560911.1683545.8795966751309534150.stgit@toke.dk> In-Reply-To: <157952560001.1683545.16757917515390545122.stgit@toke.dk> References: <157952560001.1683545.16757917515390545122.stgit@toke.dk> User-Agent: StGit/0.21 MIME-Version: 1.0 Sender: linux-kselftest-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org From: Toke Høiland-Jørgensen Fix all files in samples/bpf to include libbpf header files with the bpf/ prefix, to be consistent with external users of the library. Also ensure that all includes of exported libbpf header files (those that are exported on 'make install' of the library) use bracketed includes instead of quoted. To make sure no new files are introduced that doesn't include the bpf/ prefix in its include, remove tools/lib/bpf from the include path entirely, and use tools/lib instead. Fixes: 6910d7d3867a ("selftests/bpf: Ensure bpf_helper_defs.h are taken from selftests dir") Acked-by: Jesper Dangaard Brouer Acked-by: Andrii Nakryiko Signed-off-by: Toke Høiland-Jørgensen --- samples/bpf/Makefile | 3 +-- samples/bpf/cpustat_kern.c | 2 +- samples/bpf/fds_example.c | 2 +- samples/bpf/hbm.c | 4 ++-- samples/bpf/hbm_kern.h | 4 ++-- samples/bpf/ibumad_kern.c | 2 +- samples/bpf/ibumad_user.c | 2 +- samples/bpf/lathist_kern.c | 2 +- samples/bpf/lwt_len_hist_kern.c | 2 +- samples/bpf/map_perf_test_kern.c | 4 ++-- samples/bpf/offwaketime_kern.c | 4 ++-- samples/bpf/offwaketime_user.c | 2 +- samples/bpf/parse_ldabs.c | 2 +- samples/bpf/parse_simple.c | 2 +- samples/bpf/parse_varlen.c | 2 +- samples/bpf/sampleip_kern.c | 4 ++-- samples/bpf/sampleip_user.c | 2 +- samples/bpf/sock_flags_kern.c | 2 +- samples/bpf/sockex1_kern.c | 2 +- samples/bpf/sockex1_user.c | 2 +- samples/bpf/sockex2_kern.c | 2 +- samples/bpf/sockex2_user.c | 2 +- samples/bpf/sockex3_kern.c | 2 +- samples/bpf/spintest_kern.c | 4 ++-- samples/bpf/spintest_user.c | 2 +- samples/bpf/syscall_tp_kern.c | 2 +- samples/bpf/task_fd_query_kern.c | 2 +- samples/bpf/task_fd_query_user.c | 2 +- samples/bpf/tc_l2_redirect_kern.c | 2 +- samples/bpf/tcbpf1_kern.c | 2 +- samples/bpf/tcp_basertt_kern.c | 4 ++-- samples/bpf/tcp_bufs_kern.c | 4 ++-- samples/bpf/tcp_clamp_kern.c | 4 ++-- samples/bpf/tcp_cong_kern.c | 4 ++-- samples/bpf/tcp_dumpstats_kern.c | 4 ++-- samples/bpf/tcp_iw_kern.c | 4 ++-- samples/bpf/tcp_rwnd_kern.c | 4 ++-- samples/bpf/tcp_synrto_kern.c | 4 ++-- samples/bpf/tcp_tos_reflect_kern.c | 4 ++-- samples/bpf/test_cgrp2_tc_kern.c | 2 +- samples/bpf/test_current_task_under_cgroup_kern.c | 2 +- samples/bpf/test_lwt_bpf.c | 2 +- samples/bpf/test_map_in_map_kern.c | 4 ++-- samples/bpf/test_overhead_kprobe_kern.c | 4 ++-- samples/bpf/test_overhead_raw_tp_kern.c | 2 +- samples/bpf/test_overhead_tp_kern.c | 2 +- samples/bpf/test_probe_write_user_kern.c | 4 ++-- samples/bpf/trace_event_kern.c | 4 ++-- samples/bpf/trace_event_user.c | 2 +- samples/bpf/trace_output_kern.c | 2 +- samples/bpf/trace_output_user.c | 2 +- samples/bpf/tracex1_kern.c | 4 ++-- samples/bpf/tracex2_kern.c | 4 ++-- samples/bpf/tracex3_kern.c | 4 ++-- samples/bpf/tracex4_kern.c | 4 ++-- samples/bpf/tracex5_kern.c | 4 ++-- samples/bpf/tracex6_kern.c | 2 +- samples/bpf/tracex7_kern.c | 2 +- samples/bpf/xdp1_kern.c | 2 +- samples/bpf/xdp1_user.c | 4 ++-- samples/bpf/xdp2_kern.c | 2 +- samples/bpf/xdp2skb_meta_kern.c | 2 +- samples/bpf/xdp_adjust_tail_kern.c | 2 +- samples/bpf/xdp_adjust_tail_user.c | 4 ++-- samples/bpf/xdp_fwd_kern.c | 2 +- samples/bpf/xdp_fwd_user.c | 2 +- samples/bpf/xdp_monitor_kern.c | 2 +- samples/bpf/xdp_redirect_cpu_kern.c | 2 +- samples/bpf/xdp_redirect_cpu_user.c | 2 +- samples/bpf/xdp_redirect_kern.c | 2 +- samples/bpf/xdp_redirect_map_kern.c | 2 +- samples/bpf/xdp_redirect_map_user.c | 2 +- samples/bpf/xdp_redirect_user.c | 2 +- samples/bpf/xdp_router_ipv4_kern.c | 2 +- samples/bpf/xdp_router_ipv4_user.c | 2 +- samples/bpf/xdp_rxq_info_kern.c | 2 +- samples/bpf/xdp_rxq_info_user.c | 4 ++-- samples/bpf/xdp_sample_pkts_kern.c | 2 +- samples/bpf/xdp_sample_pkts_user.c | 2 +- samples/bpf/xdp_tx_iptunnel_kern.c | 2 +- samples/bpf/xdp_tx_iptunnel_user.c | 2 +- samples/bpf/xdpsock_kern.c | 2 +- samples/bpf/xdpsock_user.c | 6 +++--- 83 files changed, 112 insertions(+), 113 deletions(-) diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile index f86d713a17a5..b0e8adf7eb01 100644 --- a/samples/bpf/Makefile +++ b/samples/bpf/Makefile @@ -184,7 +184,6 @@ TPROGS_CFLAGS += -Wmissing-prototypes TPROGS_CFLAGS += -Wstrict-prototypes TPROGS_CFLAGS += -I$(objtree)/usr/include -TPROGS_CFLAGS += -I$(srctree)/tools/lib/bpf/ TPROGS_CFLAGS += -I$(srctree)/tools/testing/selftests/bpf/ TPROGS_CFLAGS += -I$(srctree)/tools/lib/ TPROGS_CFLAGS += -I$(srctree)/tools/include @@ -305,7 +304,7 @@ $(obj)/%.o: $(src)/%.c @echo " CLANG-bpf " $@ $(Q)$(CLANG) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) $(BPF_EXTRA_CFLAGS) \ -I$(obj) -I$(srctree)/tools/testing/selftests/bpf/ \ - -I$(srctree)/tools/lib/bpf/ \ + -I$(srctree)/tools/lib/ \ -D__KERNEL__ -D__BPF_TRACING__ -Wno-unused-value -Wno-pointer-sign \ -D__TARGET_ARCH_$(SRCARCH) -Wno-compare-distinct-pointer-types \ -Wno-gnu-variable-sized-type-not-at-end \ diff --git a/samples/bpf/cpustat_kern.c b/samples/bpf/cpustat_kern.c index 68c84da065b1..a86a19d5f033 100644 --- a/samples/bpf/cpustat_kern.c +++ b/samples/bpf/cpustat_kern.c @@ -3,7 +3,7 @@ #include #include #include -#include "bpf_helpers.h" +#include /* * The CPU number, cstate number and pstate number are based diff --git a/samples/bpf/fds_example.c b/samples/bpf/fds_example.c index 2d4b717726b6..d5992f787232 100644 --- a/samples/bpf/fds_example.c +++ b/samples/bpf/fds_example.c @@ -14,7 +14,7 @@ #include -#include "libbpf.h" +#include #include "bpf_insn.h" #include "sock_example.h" diff --git a/samples/bpf/hbm.c b/samples/bpf/hbm.c index 829b68d87687..7d7153777678 100644 --- a/samples/bpf/hbm.c +++ b/samples/bpf/hbm.c @@ -50,8 +50,8 @@ #include "cgroup_helpers.h" #include "hbm.h" #include "bpf_util.h" -#include "bpf.h" -#include "libbpf.h" +#include +#include bool outFlag = true; int minRate = 1000; /* cgroup rate limit in Mbps */ diff --git a/samples/bpf/hbm_kern.h b/samples/bpf/hbm_kern.h index 4edaf47876ca..e00f26f6afba 100644 --- a/samples/bpf/hbm_kern.h +++ b/samples/bpf/hbm_kern.h @@ -22,8 +22,8 @@ #include #include #include -#include "bpf_endian.h" -#include "bpf_helpers.h" +#include +#include #include "hbm.h" #define DROP_PKT 0 diff --git a/samples/bpf/ibumad_kern.c b/samples/bpf/ibumad_kern.c index f281df7e0089..3a91b4c1989a 100644 --- a/samples/bpf/ibumad_kern.c +++ b/samples/bpf/ibumad_kern.c @@ -13,7 +13,7 @@ #define KBUILD_MODNAME "ibumad_count_pkts_by_class" #include -#include "bpf_helpers.h" +#include struct bpf_map_def SEC("maps") read_count = { diff --git a/samples/bpf/ibumad_user.c b/samples/bpf/ibumad_user.c index cb5a8f994849..fa06eef31a84 100644 --- a/samples/bpf/ibumad_user.c +++ b/samples/bpf/ibumad_user.c @@ -25,7 +25,7 @@ #include "bpf_load.h" #include "bpf_util.h" -#include "libbpf.h" +#include static void dump_counts(int fd) { diff --git a/samples/bpf/lathist_kern.c b/samples/bpf/lathist_kern.c index 18fa088473cd..ca9c2e4e69aa 100644 --- a/samples/bpf/lathist_kern.c +++ b/samples/bpf/lathist_kern.c @@ -8,7 +8,7 @@ #include #include #include -#include "bpf_helpers.h" +#include #define MAX_ENTRIES 20 #define MAX_CPU 4 diff --git a/samples/bpf/lwt_len_hist_kern.c b/samples/bpf/lwt_len_hist_kern.c index df75383280f9..9ed63e10e170 100644 --- a/samples/bpf/lwt_len_hist_kern.c +++ b/samples/bpf/lwt_len_hist_kern.c @@ -14,7 +14,7 @@ #include #include #include -#include "bpf_helpers.h" +#include # define printk(fmt, ...) \ ({ \ diff --git a/samples/bpf/map_perf_test_kern.c b/samples/bpf/map_perf_test_kern.c index 281bcdaee58e..12e91ae64d4d 100644 --- a/samples/bpf/map_perf_test_kern.c +++ b/samples/bpf/map_perf_test_kern.c @@ -8,9 +8,9 @@ #include #include #include -#include "bpf_helpers.h" +#include #include "bpf_legacy.h" -#include "bpf_tracing.h" +#include #define MAX_ENTRIES 1000 #define MAX_NR_CPUS 1024 diff --git a/samples/bpf/offwaketime_kern.c b/samples/bpf/offwaketime_kern.c index 9cb5207a692f..c4ec10dbfc3b 100644 --- a/samples/bpf/offwaketime_kern.c +++ b/samples/bpf/offwaketime_kern.c @@ -5,8 +5,8 @@ * License as published by the Free Software Foundation. */ #include -#include "bpf_helpers.h" -#include "bpf_tracing.h" +#include +#include #include #include #include diff --git a/samples/bpf/offwaketime_user.c b/samples/bpf/offwaketime_user.c index fc8767d001f6..51c7da5341cc 100644 --- a/samples/bpf/offwaketime_user.c +++ b/samples/bpf/offwaketime_user.c @@ -12,7 +12,7 @@ #include #include #include -#include "libbpf.h" +#include #include "bpf_load.h" #include "trace_helpers.h" diff --git a/samples/bpf/parse_ldabs.c b/samples/bpf/parse_ldabs.c index ef5892377beb..c6f65f90a097 100644 --- a/samples/bpf/parse_ldabs.c +++ b/samples/bpf/parse_ldabs.c @@ -11,7 +11,7 @@ #include #include #include -#include "bpf_helpers.h" +#include #include "bpf_legacy.h" #define DEFAULT_PKTGEN_UDP_PORT 9 diff --git a/samples/bpf/parse_simple.c b/samples/bpf/parse_simple.c index 10af53d33cc2..4a486cb1e0df 100644 --- a/samples/bpf/parse_simple.c +++ b/samples/bpf/parse_simple.c @@ -12,7 +12,7 @@ #include #include #include -#include "bpf_helpers.h" +#include #define DEFAULT_PKTGEN_UDP_PORT 9 diff --git a/samples/bpf/parse_varlen.c b/samples/bpf/parse_varlen.c index 0b6f22feb2c9..d8623846e810 100644 --- a/samples/bpf/parse_varlen.c +++ b/samples/bpf/parse_varlen.c @@ -14,7 +14,7 @@ #include #include #include -#include "bpf_helpers.h" +#include #define DEFAULT_PKTGEN_UDP_PORT 9 #define DEBUG 0 diff --git a/samples/bpf/sampleip_kern.c b/samples/bpf/sampleip_kern.c index 4a190893894f..e504dc308371 100644 --- a/samples/bpf/sampleip_kern.c +++ b/samples/bpf/sampleip_kern.c @@ -8,8 +8,8 @@ #include #include #include -#include "bpf_helpers.h" -#include "bpf_tracing.h" +#include +#include #define MAX_IPS 8192 diff --git a/samples/bpf/sampleip_user.c b/samples/bpf/sampleip_user.c index 6b5dc26d9701..b0f115f938bc 100644 --- a/samples/bpf/sampleip_user.c +++ b/samples/bpf/sampleip_user.c @@ -15,7 +15,7 @@ #include #include #include -#include "libbpf.h" +#include #include "bpf_load.h" #include "perf-sys.h" #include "trace_helpers.h" diff --git a/samples/bpf/sock_flags_kern.c b/samples/bpf/sock_flags_kern.c index 05dcdf8a4baa..6d0ac7569d6f 100644 --- a/samples/bpf/sock_flags_kern.c +++ b/samples/bpf/sock_flags_kern.c @@ -3,7 +3,7 @@ #include #include #include -#include "bpf_helpers.h" +#include SEC("cgroup/sock1") int bpf_prog1(struct bpf_sock *sk) diff --git a/samples/bpf/sockex1_kern.c b/samples/bpf/sockex1_kern.c index 2408dbfb7a21..431c956460ad 100644 --- a/samples/bpf/sockex1_kern.c +++ b/samples/bpf/sockex1_kern.c @@ -2,7 +2,7 @@ #include #include #include -#include "bpf_helpers.h" +#include #include "bpf_legacy.h" struct { diff --git a/samples/bpf/sockex1_user.c b/samples/bpf/sockex1_user.c index a219442afbee..3c83722877dc 100644 --- a/samples/bpf/sockex1_user.c +++ b/samples/bpf/sockex1_user.c @@ -3,7 +3,7 @@ #include #include #include -#include "libbpf.h" +#include #include "sock_example.h" #include #include diff --git a/samples/bpf/sockex2_kern.c b/samples/bpf/sockex2_kern.c index a7bcd03bf529..a41dd520bc53 100644 --- a/samples/bpf/sockex2_kern.c +++ b/samples/bpf/sockex2_kern.c @@ -1,5 +1,5 @@ #include -#include "bpf_helpers.h" +#include #include "bpf_legacy.h" #include #include diff --git a/samples/bpf/sockex2_user.c b/samples/bpf/sockex2_user.c index 6de383ddd08b..af925a5afd1d 100644 --- a/samples/bpf/sockex2_user.c +++ b/samples/bpf/sockex2_user.c @@ -3,7 +3,7 @@ #include #include #include -#include "libbpf.h" +#include #include "sock_example.h" #include #include diff --git a/samples/bpf/sockex3_kern.c b/samples/bpf/sockex3_kern.c index 151dd842ecc0..36d4dac23549 100644 --- a/samples/bpf/sockex3_kern.c +++ b/samples/bpf/sockex3_kern.c @@ -5,7 +5,7 @@ * License as published by the Free Software Foundation. */ #include -#include "bpf_helpers.h" +#include #include "bpf_legacy.h" #include #include diff --git a/samples/bpf/spintest_kern.c b/samples/bpf/spintest_kern.c index 6e9478aa2938..f508af357251 100644 --- a/samples/bpf/spintest_kern.c +++ b/samples/bpf/spintest_kern.c @@ -9,8 +9,8 @@ #include #include #include -#include "bpf_helpers.h" -#include "bpf_tracing.h" +#include +#include struct bpf_map_def SEC("maps") my_map = { .type = BPF_MAP_TYPE_HASH, diff --git a/samples/bpf/spintest_user.c b/samples/bpf/spintest_user.c index 2556af2d9b3e..fb430ea2ef51 100644 --- a/samples/bpf/spintest_user.c +++ b/samples/bpf/spintest_user.c @@ -5,7 +5,7 @@ #include #include #include -#include "libbpf.h" +#include #include "bpf_load.h" #include "trace_helpers.h" diff --git a/samples/bpf/syscall_tp_kern.c b/samples/bpf/syscall_tp_kern.c index 630ce8c4d5a2..5a62b03b1f88 100644 --- a/samples/bpf/syscall_tp_kern.c +++ b/samples/bpf/syscall_tp_kern.c @@ -2,7 +2,7 @@ /* Copyright (c) 2017 Facebook */ #include -#include "bpf_helpers.h" +#include struct syscalls_enter_open_args { unsigned long long unused; diff --git a/samples/bpf/task_fd_query_kern.c b/samples/bpf/task_fd_query_kern.c index fb56fc2a3e5d..278ade5427c8 100644 --- a/samples/bpf/task_fd_query_kern.c +++ b/samples/bpf/task_fd_query_kern.c @@ -2,7 +2,7 @@ #include #include #include -#include "bpf_helpers.h" +#include SEC("kprobe/blk_mq_start_request") int bpf_prog1(struct pt_regs *ctx) diff --git a/samples/bpf/task_fd_query_user.c b/samples/bpf/task_fd_query_user.c index 4c31b305e6ef..ff2e9c1c7266 100644 --- a/samples/bpf/task_fd_query_user.c +++ b/samples/bpf/task_fd_query_user.c @@ -15,7 +15,7 @@ #include #include -#include "libbpf.h" +#include #include "bpf_load.h" #include "bpf_util.h" #include "perf-sys.h" diff --git a/samples/bpf/tc_l2_redirect_kern.c b/samples/bpf/tc_l2_redirect_kern.c index 7ef2a12b25b2..fd2fa0004330 100644 --- a/samples/bpf/tc_l2_redirect_kern.c +++ b/samples/bpf/tc_l2_redirect_kern.c @@ -15,7 +15,7 @@ #include #include #include -#include "bpf_helpers.h" +#include #define _htonl __builtin_bswap32 diff --git a/samples/bpf/tcbpf1_kern.c b/samples/bpf/tcbpf1_kern.c index ff43341bdfce..e9356130f84e 100644 --- a/samples/bpf/tcbpf1_kern.c +++ b/samples/bpf/tcbpf1_kern.c @@ -7,7 +7,7 @@ #include #include #include -#include "bpf_helpers.h" +#include #include "bpf_legacy.h" /* compiler workaround */ diff --git a/samples/bpf/tcp_basertt_kern.c b/samples/bpf/tcp_basertt_kern.c index 9dba48c2b920..8dfe09a92fec 100644 --- a/samples/bpf/tcp_basertt_kern.c +++ b/samples/bpf/tcp_basertt_kern.c @@ -16,8 +16,8 @@ #include #include #include -#include "bpf_helpers.h" -#include "bpf_endian.h" +#include +#include #define DEBUG 1 diff --git a/samples/bpf/tcp_bufs_kern.c b/samples/bpf/tcp_bufs_kern.c index af8486f33771..6a80d08952ad 100644 --- a/samples/bpf/tcp_bufs_kern.c +++ b/samples/bpf/tcp_bufs_kern.c @@ -17,8 +17,8 @@ #include #include #include -#include "bpf_helpers.h" -#include "bpf_endian.h" +#include +#include #define DEBUG 1 diff --git a/samples/bpf/tcp_clamp_kern.c b/samples/bpf/tcp_clamp_kern.c index 26c0fd091f3c..e88bd9ab0695 100644 --- a/samples/bpf/tcp_clamp_kern.c +++ b/samples/bpf/tcp_clamp_kern.c @@ -17,8 +17,8 @@ #include #include #include -#include "bpf_helpers.h" -#include "bpf_endian.h" +#include +#include #define DEBUG 1 diff --git a/samples/bpf/tcp_cong_kern.c b/samples/bpf/tcp_cong_kern.c index 6d4dc4c7dd1e..2311fc9dde85 100644 --- a/samples/bpf/tcp_cong_kern.c +++ b/samples/bpf/tcp_cong_kern.c @@ -16,8 +16,8 @@ #include #include #include -#include "bpf_helpers.h" -#include "bpf_endian.h" +#include +#include #define DEBUG 1 diff --git a/samples/bpf/tcp_dumpstats_kern.c b/samples/bpf/tcp_dumpstats_kern.c index 8557913106a0..e80d3afd24bd 100644 --- a/samples/bpf/tcp_dumpstats_kern.c +++ b/samples/bpf/tcp_dumpstats_kern.c @@ -4,8 +4,8 @@ */ #include -#include "bpf_helpers.h" -#include "bpf_endian.h" +#include +#include #define INTERVAL 1000000000ULL diff --git a/samples/bpf/tcp_iw_kern.c b/samples/bpf/tcp_iw_kern.c index da61d53378b3..d1444557358e 100644 --- a/samples/bpf/tcp_iw_kern.c +++ b/samples/bpf/tcp_iw_kern.c @@ -17,8 +17,8 @@ #include #include #include -#include "bpf_helpers.h" -#include "bpf_endian.h" +#include +#include #define DEBUG 1 diff --git a/samples/bpf/tcp_rwnd_kern.c b/samples/bpf/tcp_rwnd_kern.c index d011e38b80d2..223d9c23b10c 100644 --- a/samples/bpf/tcp_rwnd_kern.c +++ b/samples/bpf/tcp_rwnd_kern.c @@ -16,8 +16,8 @@ #include #include #include -#include "bpf_helpers.h" -#include "bpf_endian.h" +#include +#include #define DEBUG 1 diff --git a/samples/bpf/tcp_synrto_kern.c b/samples/bpf/tcp_synrto_kern.c index 720d1950322d..d58004eef124 100644 --- a/samples/bpf/tcp_synrto_kern.c +++ b/samples/bpf/tcp_synrto_kern.c @@ -16,8 +16,8 @@ #include #include #include -#include "bpf_helpers.h" -#include "bpf_endian.h" +#include +#include #define DEBUG 1 diff --git a/samples/bpf/tcp_tos_reflect_kern.c b/samples/bpf/tcp_tos_reflect_kern.c index 369faca70a15..953fedc79ce1 100644 --- a/samples/bpf/tcp_tos_reflect_kern.c +++ b/samples/bpf/tcp_tos_reflect_kern.c @@ -15,8 +15,8 @@ #include #include #include -#include "bpf_helpers.h" -#include "bpf_endian.h" +#include +#include #define DEBUG 1 diff --git a/samples/bpf/test_cgrp2_tc_kern.c b/samples/bpf/test_cgrp2_tc_kern.c index 1547b36a7b7b..4dd532a312b9 100644 --- a/samples/bpf/test_cgrp2_tc_kern.c +++ b/samples/bpf/test_cgrp2_tc_kern.c @@ -10,7 +10,7 @@ #include #include #include -#include "bpf_helpers.h" +#include /* copy of 'struct ethhdr' without __packed */ struct eth_hdr { diff --git a/samples/bpf/test_current_task_under_cgroup_kern.c b/samples/bpf/test_current_task_under_cgroup_kern.c index 86b28d7d6c99..6dc4f41bb6cb 100644 --- a/samples/bpf/test_current_task_under_cgroup_kern.c +++ b/samples/bpf/test_current_task_under_cgroup_kern.c @@ -8,7 +8,7 @@ #include #include #include -#include "bpf_helpers.h" +#include #include struct bpf_map_def SEC("maps") cgroup_map = { diff --git a/samples/bpf/test_lwt_bpf.c b/samples/bpf/test_lwt_bpf.c index bacc8013436b..1b568575ad11 100644 --- a/samples/bpf/test_lwt_bpf.c +++ b/samples/bpf/test_lwt_bpf.c @@ -20,7 +20,7 @@ #include #include #include -#include "bpf_helpers.h" +#include #include # define printk(fmt, ...) \ diff --git a/samples/bpf/test_map_in_map_kern.c b/samples/bpf/test_map_in_map_kern.c index 32ee752f19df..6cee61e8ce9b 100644 --- a/samples/bpf/test_map_in_map_kern.c +++ b/samples/bpf/test_map_in_map_kern.c @@ -10,9 +10,9 @@ #include #include #include -#include "bpf_helpers.h" +#include #include "bpf_legacy.h" -#include "bpf_tracing.h" +#include #define MAX_NR_PORTS 65536 diff --git a/samples/bpf/test_overhead_kprobe_kern.c b/samples/bpf/test_overhead_kprobe_kern.c index 8d2518e68db9..8b811c29dc79 100644 --- a/samples/bpf/test_overhead_kprobe_kern.c +++ b/samples/bpf/test_overhead_kprobe_kern.c @@ -7,8 +7,8 @@ #include #include #include -#include "bpf_helpers.h" -#include "bpf_tracing.h" +#include +#include #define _(P) ({typeof(P) val = 0; bpf_probe_read(&val, sizeof(val), &P); val;}) diff --git a/samples/bpf/test_overhead_raw_tp_kern.c b/samples/bpf/test_overhead_raw_tp_kern.c index d2af8bc1c805..8763181a32f3 100644 --- a/samples/bpf/test_overhead_raw_tp_kern.c +++ b/samples/bpf/test_overhead_raw_tp_kern.c @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 /* Copyright (c) 2018 Facebook */ #include -#include "bpf_helpers.h" +#include SEC("raw_tracepoint/task_rename") int prog(struct bpf_raw_tracepoint_args *ctx) diff --git a/samples/bpf/test_overhead_tp_kern.c b/samples/bpf/test_overhead_tp_kern.c index 38f5c0b9da9f..eaa32693f8fc 100644 --- a/samples/bpf/test_overhead_tp_kern.c +++ b/samples/bpf/test_overhead_tp_kern.c @@ -5,7 +5,7 @@ * License as published by the Free Software Foundation. */ #include -#include "bpf_helpers.h" +#include /* from /sys/kernel/debug/tracing/events/task/task_rename/format */ struct task_rename { diff --git a/samples/bpf/test_probe_write_user_kern.c b/samples/bpf/test_probe_write_user_kern.c index b7c48f37132c..f033f36a13a3 100644 --- a/samples/bpf/test_probe_write_user_kern.c +++ b/samples/bpf/test_probe_write_user_kern.c @@ -8,8 +8,8 @@ #include #include #include -#include "bpf_helpers.h" -#include "bpf_tracing.h" +#include +#include struct bpf_map_def SEC("maps") dnat_map = { .type = BPF_MAP_TYPE_HASH, diff --git a/samples/bpf/trace_event_kern.c b/samples/bpf/trace_event_kern.c index 8dc18d233a27..da1d69e20645 100644 --- a/samples/bpf/trace_event_kern.c +++ b/samples/bpf/trace_event_kern.c @@ -9,8 +9,8 @@ #include #include #include -#include "bpf_helpers.h" -#include "bpf_tracing.h" +#include +#include struct key_t { char comm[TASK_COMM_LEN]; diff --git a/samples/bpf/trace_event_user.c b/samples/bpf/trace_event_user.c index 749a50f2f9f3..356171bc392b 100644 --- a/samples/bpf/trace_event_user.c +++ b/samples/bpf/trace_event_user.c @@ -15,7 +15,7 @@ #include #include #include -#include "libbpf.h" +#include #include "bpf_load.h" #include "perf-sys.h" #include "trace_helpers.h" diff --git a/samples/bpf/trace_output_kern.c b/samples/bpf/trace_output_kern.c index 9b96f4fb8cea..1d7d422cae6f 100644 --- a/samples/bpf/trace_output_kern.c +++ b/samples/bpf/trace_output_kern.c @@ -1,7 +1,7 @@ #include #include #include -#include "bpf_helpers.h" +#include struct bpf_map_def SEC("maps") my_map = { .type = BPF_MAP_TYPE_PERF_EVENT_ARRAY, diff --git a/samples/bpf/trace_output_user.c b/samples/bpf/trace_output_user.c index 8ee47699a870..60a17dd05345 100644 --- a/samples/bpf/trace_output_user.c +++ b/samples/bpf/trace_output_user.c @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include "bpf_load.h" #include "perf-sys.h" diff --git a/samples/bpf/tracex1_kern.c b/samples/bpf/tracex1_kern.c index 1a15f6605129..8e2610e14475 100644 --- a/samples/bpf/tracex1_kern.c +++ b/samples/bpf/tracex1_kern.c @@ -8,8 +8,8 @@ #include #include #include -#include "bpf_helpers.h" -#include "bpf_tracing.h" +#include +#include #define _(P) ({typeof(P) val = 0; bpf_probe_read(&val, sizeof(val), &P); val;}) diff --git a/samples/bpf/tracex2_kern.c b/samples/bpf/tracex2_kern.c index d70b3ea79ea7..d865bb309bcb 100644 --- a/samples/bpf/tracex2_kern.c +++ b/samples/bpf/tracex2_kern.c @@ -8,8 +8,8 @@ #include #include #include -#include "bpf_helpers.h" -#include "bpf_tracing.h" +#include +#include struct bpf_map_def SEC("maps") my_map = { .type = BPF_MAP_TYPE_HASH, diff --git a/samples/bpf/tracex3_kern.c b/samples/bpf/tracex3_kern.c index 9af546bebfa9..fe21c14feb8d 100644 --- a/samples/bpf/tracex3_kern.c +++ b/samples/bpf/tracex3_kern.c @@ -8,8 +8,8 @@ #include #include #include -#include "bpf_helpers.h" -#include "bpf_tracing.h" +#include +#include struct bpf_map_def SEC("maps") my_map = { .type = BPF_MAP_TYPE_HASH, diff --git a/samples/bpf/tracex4_kern.c b/samples/bpf/tracex4_kern.c index 2a02cbe9d9a1..b1bb9df88f8e 100644 --- a/samples/bpf/tracex4_kern.c +++ b/samples/bpf/tracex4_kern.c @@ -7,8 +7,8 @@ #include #include #include -#include "bpf_helpers.h" -#include "bpf_tracing.h" +#include +#include struct pair { u64 val; diff --git a/samples/bpf/tracex5_kern.c b/samples/bpf/tracex5_kern.c index b3557b21a8fe..481790fde864 100644 --- a/samples/bpf/tracex5_kern.c +++ b/samples/bpf/tracex5_kern.c @@ -10,8 +10,8 @@ #include #include #include "syscall_nrs.h" -#include "bpf_helpers.h" -#include "bpf_tracing.h" +#include +#include #define PROG(F) SEC("kprobe/"__stringify(F)) int bpf_func_##F diff --git a/samples/bpf/tracex6_kern.c b/samples/bpf/tracex6_kern.c index 46c557afac73..96c234efa852 100644 --- a/samples/bpf/tracex6_kern.c +++ b/samples/bpf/tracex6_kern.c @@ -1,7 +1,7 @@ #include #include #include -#include "bpf_helpers.h" +#include struct bpf_map_def SEC("maps") counters = { .type = BPF_MAP_TYPE_PERF_EVENT_ARRAY, diff --git a/samples/bpf/tracex7_kern.c b/samples/bpf/tracex7_kern.c index 1ab308a43e0f..c5a92df8ac31 100644 --- a/samples/bpf/tracex7_kern.c +++ b/samples/bpf/tracex7_kern.c @@ -1,7 +1,7 @@ #include #include #include -#include "bpf_helpers.h" +#include SEC("kprobe/open_ctree") int bpf_prog1(struct pt_regs *ctx) diff --git a/samples/bpf/xdp1_kern.c b/samples/bpf/xdp1_kern.c index db6870aee42c..34b64394ed9c 100644 --- a/samples/bpf/xdp1_kern.c +++ b/samples/bpf/xdp1_kern.c @@ -12,7 +12,7 @@ #include #include #include -#include "bpf_helpers.h" +#include struct { __uint(type, BPF_MAP_TYPE_PERCPU_ARRAY); diff --git a/samples/bpf/xdp1_user.c b/samples/bpf/xdp1_user.c index 38a8852cb57f..c447ad9e3a1d 100644 --- a/samples/bpf/xdp1_user.c +++ b/samples/bpf/xdp1_user.c @@ -15,8 +15,8 @@ #include #include "bpf_util.h" -#include "bpf.h" -#include "libbpf.h" +#include +#include static int ifindex; static __u32 xdp_flags = XDP_FLAGS_UPDATE_IF_NOEXIST; diff --git a/samples/bpf/xdp2_kern.c b/samples/bpf/xdp2_kern.c index c74b52c6d945..c787f4b49646 100644 --- a/samples/bpf/xdp2_kern.c +++ b/samples/bpf/xdp2_kern.c @@ -12,7 +12,7 @@ #include #include #include -#include "bpf_helpers.h" +#include struct { __uint(type, BPF_MAP_TYPE_PERCPU_ARRAY); diff --git a/samples/bpf/xdp2skb_meta_kern.c b/samples/bpf/xdp2skb_meta_kern.c index 0c12048ac79f..9b783316e860 100644 --- a/samples/bpf/xdp2skb_meta_kern.c +++ b/samples/bpf/xdp2skb_meta_kern.c @@ -12,7 +12,7 @@ #include #include -#include "bpf_helpers.h" +#include /* * This struct is stored in the XDP 'data_meta' area, which is located diff --git a/samples/bpf/xdp_adjust_tail_kern.c b/samples/bpf/xdp_adjust_tail_kern.c index 0f707e0fb375..ffdd548627f0 100644 --- a/samples/bpf/xdp_adjust_tail_kern.c +++ b/samples/bpf/xdp_adjust_tail_kern.c @@ -18,7 +18,7 @@ #include #include #include -#include "bpf_helpers.h" +#include #define DEFAULT_TTL 64 #define MAX_PCKT_SIZE 600 diff --git a/samples/bpf/xdp_adjust_tail_user.c b/samples/bpf/xdp_adjust_tail_user.c index 008789eb6ada..ba482dc3da33 100644 --- a/samples/bpf/xdp_adjust_tail_user.c +++ b/samples/bpf/xdp_adjust_tail_user.c @@ -19,8 +19,8 @@ #include #include #include -#include "bpf.h" -#include "libbpf.h" +#include +#include #define STATS_INTERVAL_S 2U #define MAX_PCKT_SIZE 600 diff --git a/samples/bpf/xdp_fwd_kern.c b/samples/bpf/xdp_fwd_kern.c index d013029aeaa2..54c099cbd639 100644 --- a/samples/bpf/xdp_fwd_kern.c +++ b/samples/bpf/xdp_fwd_kern.c @@ -19,7 +19,7 @@ #include #include -#include "bpf_helpers.h" +#include #define IPV6_FLOWINFO_MASK cpu_to_be32(0x0FFFFFFF) diff --git a/samples/bpf/xdp_fwd_user.c b/samples/bpf/xdp_fwd_user.c index c30f9acfdb84..74a4583d0d86 100644 --- a/samples/bpf/xdp_fwd_user.c +++ b/samples/bpf/xdp_fwd_user.c @@ -24,7 +24,7 @@ #include #include -#include "libbpf.h" +#include #include static __u32 xdp_flags = XDP_FLAGS_UPDATE_IF_NOEXIST; diff --git a/samples/bpf/xdp_monitor_kern.c b/samples/bpf/xdp_monitor_kern.c index 39458a44472e..3d33cca2d48a 100644 --- a/samples/bpf/xdp_monitor_kern.c +++ b/samples/bpf/xdp_monitor_kern.c @@ -4,7 +4,7 @@ * XDP monitor tool, based on tracepoints */ #include -#include "bpf_helpers.h" +#include struct bpf_map_def SEC("maps") redirect_err_cnt = { .type = BPF_MAP_TYPE_PERCPU_ARRAY, diff --git a/samples/bpf/xdp_redirect_cpu_kern.c b/samples/bpf/xdp_redirect_cpu_kern.c index cfcc31e51197..313a8fe6d125 100644 --- a/samples/bpf/xdp_redirect_cpu_kern.c +++ b/samples/bpf/xdp_redirect_cpu_kern.c @@ -12,7 +12,7 @@ #include #include -#include "bpf_helpers.h" +#include #include "hash_func01.h" #define MAX_CPUS 64 /* WARNING - sync with _user.c */ diff --git a/samples/bpf/xdp_redirect_cpu_user.c b/samples/bpf/xdp_redirect_cpu_user.c index 79a2fb7d16cb..15bdf047a222 100644 --- a/samples/bpf/xdp_redirect_cpu_user.c +++ b/samples/bpf/xdp_redirect_cpu_user.c @@ -30,7 +30,7 @@ static const char *__doc__ = #define MAX_PROG 6 #include -#include "libbpf.h" +#include #include "bpf_util.h" diff --git a/samples/bpf/xdp_redirect_kern.c b/samples/bpf/xdp_redirect_kern.c index 1f0b7d05abb2..d26ec3aa215e 100644 --- a/samples/bpf/xdp_redirect_kern.c +++ b/samples/bpf/xdp_redirect_kern.c @@ -17,7 +17,7 @@ #include #include #include -#include "bpf_helpers.h" +#include struct { __uint(type, BPF_MAP_TYPE_ARRAY); diff --git a/samples/bpf/xdp_redirect_map_kern.c b/samples/bpf/xdp_redirect_map_kern.c index 4631b484c432..6489352ab7a4 100644 --- a/samples/bpf/xdp_redirect_map_kern.c +++ b/samples/bpf/xdp_redirect_map_kern.c @@ -17,7 +17,7 @@ #include #include #include -#include "bpf_helpers.h" +#include struct { __uint(type, BPF_MAP_TYPE_DEVMAP); diff --git a/samples/bpf/xdp_redirect_map_user.c b/samples/bpf/xdp_redirect_map_user.c index cc840661faab..35e16dee613e 100644 --- a/samples/bpf/xdp_redirect_map_user.c +++ b/samples/bpf/xdp_redirect_map_user.c @@ -17,7 +17,7 @@ #include "bpf_util.h" #include -#include "libbpf.h" +#include static int ifindex_in; static int ifindex_out; diff --git a/samples/bpf/xdp_redirect_user.c b/samples/bpf/xdp_redirect_user.c index 71dff8e3382a..9ca2bf457cda 100644 --- a/samples/bpf/xdp_redirect_user.c +++ b/samples/bpf/xdp_redirect_user.c @@ -17,7 +17,7 @@ #include "bpf_util.h" #include -#include "libbpf.h" +#include static int ifindex_in; static int ifindex_out; diff --git a/samples/bpf/xdp_router_ipv4_kern.c b/samples/bpf/xdp_router_ipv4_kern.c index bf11efc8e949..b37ca2b13063 100644 --- a/samples/bpf/xdp_router_ipv4_kern.c +++ b/samples/bpf/xdp_router_ipv4_kern.c @@ -12,7 +12,7 @@ #include #include #include -#include "bpf_helpers.h" +#include #include #include diff --git a/samples/bpf/xdp_router_ipv4_user.c b/samples/bpf/xdp_router_ipv4_user.c index fef286c5add2..c2da1b51ff95 100644 --- a/samples/bpf/xdp_router_ipv4_user.c +++ b/samples/bpf/xdp_router_ipv4_user.c @@ -21,7 +21,7 @@ #include #include #include "bpf_util.h" -#include "libbpf.h" +#include #include #include diff --git a/samples/bpf/xdp_rxq_info_kern.c b/samples/bpf/xdp_rxq_info_kern.c index 272d0f82a6b5..5e7459f9bf3e 100644 --- a/samples/bpf/xdp_rxq_info_kern.c +++ b/samples/bpf/xdp_rxq_info_kern.c @@ -6,7 +6,7 @@ #include #include #include -#include "bpf_helpers.h" +#include /* Config setup from with userspace * diff --git a/samples/bpf/xdp_rxq_info_user.c b/samples/bpf/xdp_rxq_info_user.c index fc4983fd6959..4fe47502ebed 100644 --- a/samples/bpf/xdp_rxq_info_user.c +++ b/samples/bpf/xdp_rxq_info_user.c @@ -22,8 +22,8 @@ static const char *__doc__ = " XDP RX-queue info extract example\n\n" #include #include -#include "bpf.h" -#include "libbpf.h" +#include +#include #include "bpf_util.h" static int ifindex = -1; diff --git a/samples/bpf/xdp_sample_pkts_kern.c b/samples/bpf/xdp_sample_pkts_kern.c index 6c7c7e0aaeda..33377289e2a8 100644 --- a/samples/bpf/xdp_sample_pkts_kern.c +++ b/samples/bpf/xdp_sample_pkts_kern.c @@ -2,7 +2,7 @@ #include #include #include -#include "bpf_helpers.h" +#include #define SAMPLE_SIZE 64ul #define MAX_CPUS 128 diff --git a/samples/bpf/xdp_sample_pkts_user.c b/samples/bpf/xdp_sample_pkts_user.c index 8c1af1b7372d..991ef6f0880b 100644 --- a/samples/bpf/xdp_sample_pkts_user.c +++ b/samples/bpf/xdp_sample_pkts_user.c @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/samples/bpf/xdp_tx_iptunnel_kern.c b/samples/bpf/xdp_tx_iptunnel_kern.c index 6db450a5c1ca..575d57e4b8d6 100644 --- a/samples/bpf/xdp_tx_iptunnel_kern.c +++ b/samples/bpf/xdp_tx_iptunnel_kern.c @@ -16,7 +16,7 @@ #include #include #include -#include "bpf_helpers.h" +#include #include "xdp_tx_iptunnel_common.h" struct { diff --git a/samples/bpf/xdp_tx_iptunnel_user.c b/samples/bpf/xdp_tx_iptunnel_user.c index 5f33b5530032..a419bee151a8 100644 --- a/samples/bpf/xdp_tx_iptunnel_user.c +++ b/samples/bpf/xdp_tx_iptunnel_user.c @@ -15,7 +15,7 @@ #include #include #include -#include "libbpf.h" +#include #include #include "bpf_util.h" #include "xdp_tx_iptunnel_common.h" diff --git a/samples/bpf/xdpsock_kern.c b/samples/bpf/xdpsock_kern.c index a06177c262cd..05430484375c 100644 --- a/samples/bpf/xdpsock_kern.c +++ b/samples/bpf/xdpsock_kern.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 #include -#include "bpf_helpers.h" +#include #include "xdpsock.h" /* This XDP program is only needed for the XDP_SHARED_UMEM mode. diff --git a/samples/bpf/xdpsock_user.c b/samples/bpf/xdpsock_user.c index d74c4c83fc93..0b5acd722306 100644 --- a/samples/bpf/xdpsock_user.c +++ b/samples/bpf/xdpsock_user.c @@ -30,10 +30,10 @@ #include #include -#include "libbpf.h" -#include "xsk.h" -#include "xdpsock.h" +#include +#include #include +#include "xdpsock.h" #ifndef SOL_XDP #define SOL_XDP 283 From patchwork Mon Jan 20 13:06:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Toke_H=C3=B8iland-J=C3=B8rgensen?= X-Patchwork-Id: 208902 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 39B81C33CB8 for ; Mon, 20 Jan 2020 13:07:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 10FF824656 for ; Mon, 20 Jan 2020 13:07:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="CGafp+6A" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729214AbgATNHY (ORCPT ); Mon, 20 Jan 2020 08:07:24 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:48189 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729047AbgATNG4 (ORCPT ); Mon, 20 Jan 2020 08:06:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1579525615; 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=KsPh+K2sGLcZZLAcEa0kQAsvwcVmMWDpkU86Oyeqz+o=; b=CGafp+6AcscDmOKb7TOukKRU/pAENkXcEorcv9QzCspgqK4AAMjZl6jxrW/DK3PVUDjdQb wtGph+d4ueshXXNVTrmpKWvYG9S4cFIlTT99kYG7SL2EncsMFyWPwvh++jnG9/pjJZLVzl pg7QomFc2x9Y+OOsgKJ7090M927wFc0= Received: from mail-lj1-f200.google.com (mail-lj1-f200.google.com [209.85.208.200]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-278-LzSWOx3GNYeaeZpsMzBZ5Q-1; Mon, 20 Jan 2020 08:06:54 -0500 X-MC-Unique: LzSWOx3GNYeaeZpsMzBZ5Q-1 Received: by mail-lj1-f200.google.com with SMTP id j23so7534051lji.23 for ; Mon, 20 Jan 2020 05:06:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:date:message-id:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=KsPh+K2sGLcZZLAcEa0kQAsvwcVmMWDpkU86Oyeqz+o=; b=NBMPPhFARGMVkaysDuuR/tsyyX1R/CiDT9yZra3q9UkjKuGrKEQfWKYgKAcWVJ/86x OS9+tSs1dWU3DLJ8nwbvInOTeUdQa5sh4BGocL4bBnHjHxWfh59751kdYwHx4ohZ0SJX ZFuA6hSCYU+UtqnFwLZZVveFH/bmpHDQQJFF7Al/aiy6ep+A/JEi9L9xkGpayCl8CzXX Eeb7grFk/dcaPTTsHA8o+sO53q1/e5tEeJEhGqcMOAY+objR/i//FE19f6oErT7I6XNM gZCkynd6ZD9r7zA4WmA6Olp0xE3zodXJV8UwtO1+2r2vWbDr1Z8R8SUDm+RBFBUpX9uv sT8g== X-Gm-Message-State: APjAAAWgh7lDCin8Oa0e1EHGvuekcXOqPpVh8aNXDomcS3Z7EBQ6aN+9 nSF2CqYLVhegEnitBlvFvaME62Mnz5HeQ8VAFXWO40JttdemAKbDLgPLA24E++615qMulJuNAmu QAvXAev57rhxq5yq3yBAxppybGjNG X-Received: by 2002:a2e:7a13:: with SMTP id v19mr13537747ljc.43.1579525612608; Mon, 20 Jan 2020 05:06:52 -0800 (PST) X-Google-Smtp-Source: APXvYqxq7D+NOw8boRnGBWgzLuvcBMZuEgfqik8rj3u7ynVqVlOwh9aSescMWf6m9o80N+P1u7Do7g== X-Received: by 2002:a2e:7a13:: with SMTP id v19mr13537712ljc.43.1579525612235; Mon, 20 Jan 2020 05:06:52 -0800 (PST) Received: from alrua-x1.borgediget.toke.dk ([85.204.121.218]) by smtp.gmail.com with ESMTPSA id u9sm16734044lji.49.2020.01.20.05.06.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jan 2020 05:06:51 -0800 (PST) Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000) id 567801804D8; Mon, 20 Jan 2020 14:06:50 +0100 (CET) Subject: [PATCH bpf-next v5 09/11] tools/runqslower: Remove tools/lib/bpf from include path From: =?utf-8?q?Toke_H=C3=B8iland-J=C3=B8rgensen?= To: Alexei Starovoitov Cc: Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , Andrii Nakryiko , Doug Ledford , Jason Gunthorpe , "David S. Miller" , Jakub Kicinski , Jesper Dangaard Brouer , John Fastabend , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Shuah Khan , netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, linux-kselftest@vger.kernel.org, clang-built-linux@googlegroups.com Date: Mon, 20 Jan 2020 14:06:50 +0100 Message-ID: <157952561027.1683545.1976265477926794138.stgit@toke.dk> In-Reply-To: <157952560001.1683545.16757917515390545122.stgit@toke.dk> References: <157952560001.1683545.16757917515390545122.stgit@toke.dk> User-Agent: StGit/0.21 MIME-Version: 1.0 Sender: linux-kselftest-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org From: Toke Høiland-Jørgensen Since we are now consistently using the bpf/ prefix on #include directives, we don't need to include tools/lib/bpf in the include path. Remove it to make sure we don't inadvertently introduce new includes without the prefix. Acked-by: Andrii Nakryiko Signed-off-by: Toke Høiland-Jørgensen --- tools/bpf/runqslower/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/bpf/runqslower/Makefile b/tools/bpf/runqslower/Makefile index b7b2230f807b..b90044caf270 100644 --- a/tools/bpf/runqslower/Makefile +++ b/tools/bpf/runqslower/Makefile @@ -6,7 +6,7 @@ LLVM_STRIP := llvm-strip DEFAULT_BPFTOOL := $(OUTPUT)/sbin/bpftool BPFTOOL ?= $(DEFAULT_BPFTOOL) LIBBPF_SRC := $(abspath ../../lib/bpf) -INCLUDES := -I$(OUTPUT) -I$(abspath ../../lib) -I$(abspath ../../lib/bpf) +INCLUDES := -I$(OUTPUT) -I$(abspath ../../lib) CFLAGS := -g -Wall # Try to detect best kernel BTF source From patchwork Mon Jan 20 13:06:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Toke_H=C3=B8iland-J=C3=B8rgensen?= X-Patchwork-Id: 208898 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6A54BC2D0DB for ; Mon, 20 Jan 2020 13:13:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 339E822525 for ; Mon, 20 Jan 2020 13:13:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="aeamstEo" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726619AbgATNNX (ORCPT ); Mon, 20 Jan 2020 08:13:23 -0500 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:60054 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726819AbgATNNX (ORCPT ); Mon, 20 Jan 2020 08:13:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1579526002; 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=7nX6gCvToHh/M+ufmuZNkVcVbY/LiP2p5Z5znXTQZT8=; b=aeamstEo4wluHA13W2AFtdyy9HpsLGYyQYOxpBi2dThqJu0PT7DPEUPDf+Yd9Lm0Yuwb7z YM0VfHAzA4lrOjh2aUtH50w8riwzTzfsxS4z9slQkhLkIdGqqsJ3XRmgGCDOGgA60vBJD7 fwCu8Z0CmlMzS0iv8PSNN/NAYAeHff8= Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-139-dLLDch7XNDKeIFhBgb3UEw-1; Mon, 20 Jan 2020 08:13:21 -0500 X-MC-Unique: dLLDch7XNDKeIFhBgb3UEw-1 Received: by mail-ed1-f71.google.com with SMTP id c24so21812615edy.9 for ; Mon, 20 Jan 2020 05:13:20 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:date:message-id:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=7nX6gCvToHh/M+ufmuZNkVcVbY/LiP2p5Z5znXTQZT8=; b=BHZNM3BqzX2kCndC2RvTgb+H7eI44J6hoopmy2Do9mor7ESHbTpz7BuIL9VARYAWan uqZXNB/BOjPy/XkOZcad1aI5PCf9UkqCF4uv33aSBVb2a/gvWKs+bJsPwNIHz4oGbu3J w1G+S4Mf605vGb+OU+3ct6oyL/cth2jvx2hkeeAEFPkWyRZbbpiYv+QtBZ928Yewc1OP qFsEsawdcLfC6hEfLfdywhyrXr2Ame/g6Zlpey+jZq/34X2p862wC6W0pz4NlbRrWR7W mLeilIci0eRhl1TpbnavH3JIbjKFYJI5/5utHyxdyR+mPombt7zHtc/Bf2v2xDxPzvO4 brCQ== X-Gm-Message-State: APjAAAUesc1xIHEJE71oFWiVCfm70L77yqS50FR/ZFVctyOYbIPwbexF oYqoefE9jSczUAF/qAEmOdUq2Flb87Vrm2dCyoQPdkjj3K/sB2XQuI4/h25ElNWEvsjzM/lCuo3 aeVQHC3pPBGHLfms3gUJaa7QO1aPi X-Received: by 2002:a05:6402:17fb:: with SMTP id t27mr17455455edy.159.1579525999513; Mon, 20 Jan 2020 05:13:19 -0800 (PST) X-Google-Smtp-Source: APXvYqx0QP6IDZi2QN6qajrJveTlJj75I05ZuYUObj5tdnbOi4mrACFD11iCcZbt/l4zWfp+Ir1i2Q== X-Received: by 2002:a05:651c:8f:: with SMTP id 15mr13842833ljq.109.1579525998002; Mon, 20 Jan 2020 05:13:18 -0800 (PST) Received: from alrua-x1.borgediget.toke.dk ([85.204.121.218]) by smtp.gmail.com with ESMTPSA id z3sm16867876ljh.83.2020.01.20.05.13.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jan 2020 05:13:16 -0800 (PST) Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000) id 709ED1804D6; Mon, 20 Jan 2020 14:06:51 +0100 (CET) Subject: [PATCH bpf-next v5 10/11] runsqslower: Support user-specified libbpf include and object paths From: =?utf-8?q?Toke_H=C3=B8iland-J=C3=B8rgensen?= To: Alexei Starovoitov Cc: Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , Andrii Nakryiko , Doug Ledford , Jason Gunthorpe , "David S. Miller" , Jakub Kicinski , Jesper Dangaard Brouer , John Fastabend , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Shuah Khan , netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, linux-kselftest@vger.kernel.org, clang-built-linux@googlegroups.com Date: Mon, 20 Jan 2020 14:06:51 +0100 Message-ID: <157952561135.1683545.5660339645093141381.stgit@toke.dk> In-Reply-To: <157952560001.1683545.16757917515390545122.stgit@toke.dk> References: <157952560001.1683545.16757917515390545122.stgit@toke.dk> User-Agent: StGit/0.21 MIME-Version: 1.0 Sender: linux-kselftest-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org From: Toke Høiland-Jørgensen This adds support for specifying the libbpf include and object paths as arguments to the runqslower Makefile, to support reusing the libbpf version built as part of the selftests. Signed-off-by: Toke Høiland-Jørgensen --- tools/bpf/runqslower/Makefile | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tools/bpf/runqslower/Makefile b/tools/bpf/runqslower/Makefile index b90044caf270..faf5418609ea 100644 --- a/tools/bpf/runqslower/Makefile +++ b/tools/bpf/runqslower/Makefile @@ -6,7 +6,9 @@ LLVM_STRIP := llvm-strip DEFAULT_BPFTOOL := $(OUTPUT)/sbin/bpftool BPFTOOL ?= $(DEFAULT_BPFTOOL) LIBBPF_SRC := $(abspath ../../lib/bpf) -INCLUDES := -I$(OUTPUT) -I$(abspath ../../lib) +BPFOBJ := $(OUTPUT)/libbpf.a +BPF_INCLUDE := $(OUTPUT) +INCLUDES := -I$(BPF_INCLUDE) -I$(OUTPUT) -I$(abspath ../../lib) CFLAGS := -g -Wall # Try to detect best kernel BTF source @@ -37,7 +39,7 @@ clean: $(call msg,CLEAN) $(Q)rm -rf $(OUTPUT) runqslower -$(OUTPUT)/runqslower: $(OUTPUT)/runqslower.o $(OUTPUT)/libbpf.a +$(OUTPUT)/runqslower: $(OUTPUT)/runqslower.o $(BPFOBJ) $(call msg,BINARY,$@) $(Q)$(CC) $(CFLAGS) -lelf -lz $^ -o $@ @@ -50,7 +52,7 @@ $(OUTPUT)/%.skel.h: $(OUTPUT)/%.bpf.o | $(BPFTOOL) $(call msg,GEN-SKEL,$@) $(Q)$(BPFTOOL) gen skeleton $< > $@ -$(OUTPUT)/%.bpf.o: %.bpf.c $(OUTPUT)/libbpf.a | $(OUTPUT) +$(OUTPUT)/%.bpf.o: %.bpf.c $(BPFOBJ) | $(OUTPUT) $(call msg,BPF,$@) $(Q)$(CLANG) -g -O2 -target bpf $(INCLUDES) \ -c $(filter %.c,$^) -o $@ && \ @@ -73,9 +75,9 @@ $(OUTPUT)/vmlinux.h: $(VMLINUX_BTF_PATH) | $(OUTPUT) $(BPFTOOL) fi $(Q)$(BPFTOOL) btf dump file $(VMLINUX_BTF_PATH) format c > $@ -$(OUTPUT)/libbpf.a: | $(OUTPUT) +$(BPFOBJ): | $(OUTPUT) $(Q)$(MAKE) $(submake_extras) -C $(LIBBPF_SRC) \ - OUTPUT=$(abs_out)/ $(abs_out)/libbpf.a + OUTPUT=$(abspath $(dir $@))/ $(abspath $@) $(DEFAULT_BPFTOOL): $(Q)$(MAKE) $(submake_extras) -C ../bpftool \