Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2549013ybl; Mon, 20 Jan 2020 05:08:01 -0800 (PST) X-Google-Smtp-Source: APXvYqxfouRSrk9FG+6zUW40i2iCilJFGaOqeRdIC+9C+weNVNDud7R3YqGHm3JxtAIyAnq7Nb2U X-Received: by 2002:a9d:811:: with SMTP id 17mr16397491oty.369.1579525681578; Mon, 20 Jan 2020 05:08:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579525681; cv=none; d=google.com; s=arc-20160816; b=V23TSOEa4iBVd+/i7ETGLZtV26XLUoFBLpCPJCQOOBo5e714lDp4oR3Z4ticFawsFo 35r87Q6PQyrjWTzIXeh2YN8ZWGWR9QmCzeOJz+1BjZhp76oUOiMS8k5xsu+RuMrqkzRZ hPflnzkX3ZVjYCGeZhJFtwvdN6nQsVR0citG05iVzPmQd4ymo92WYmb8pLsDrFYY1kkc HkOjAXJyra7T3tl47bjwGQ0J0Xf13LdYb7BN5hK2EAAjX9r1QawjGhqlIX+i1cERtVwr 44tLZa/Z7aERgwGmNKRm3+amFWbkFPd9IRT6kdx8juLnWw/W9ZoDm8UkAEUBuKPtbOoE Jmew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:cc:to:from :subject:dkim-signature; bh=FO0YZDCYDI2J/1ujIzZCIdgWpSFgOqfh62+GspZ7r0s=; b=SQi+2oPkcDovhW/FLE6VNERheaM3BIzhMcu1cd8adu7y8VGt6JhEglGQUlgNMl9RzU 56wI68cbEIrWlUPuSg06NH00sKYyhaNv0I3PMQrn6iuPt7pSBXRoZT4mljyH+25053jt zX6GjHo3kgzrvNq6C5c0bU2+VkArBcg8MD/wVtYkIpAnQOCRJd16SMzeGyMM6BnYW/5r pw5I4CwOesBL1Z2F670vsywUt8/L9WvtHVt25yu5Lj/ksbM2BeJSTuNU0D35NSVoixQm O5D8yBNxK/Drw/FZjV9bvf3hMUzTpTILmtbznqfzM2jqhl2UgiJksNrAQpTjvDeiEDO6 DEkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Zo01GYPw; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s17si20546226otq.78.2020.01.20.05.07.48; Mon, 20 Jan 2020 05:08:01 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Zo01GYPw; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728835AbgATNGv (ORCPT + 99 others); Mon, 20 Jan 2020 08:06:51 -0500 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:42797 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727065AbgATNGu (ORCPT ); Mon, 20 Jan 2020 08:06:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1579525609; 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=FO0YZDCYDI2J/1ujIzZCIdgWpSFgOqfh62+GspZ7r0s=; b=Zo01GYPwwK1TRmA94JwqQhr2JtUZXpXZ5r+WKE1oGZN2hdEflEYTGxItPHsEOOnnOqL5+p +yhygjR5Ipc+SwC3TFYZsyU8WOMzS2xIdpVaCEr96JzEk/e/j0cp+cOtq6PpTCX4HGmqJ1 P40cUJnNjEp2Gq+7z32LThmpgiD7x1Y= Received: from mail-lf1-f71.google.com (mail-lf1-f71.google.com [209.85.167.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-41-pSKwoycvObKORvaIbBTLzw-1; Mon, 20 Jan 2020 08:06:48 -0500 X-MC-Unique: pSKwoycvObKORvaIbBTLzw-1 Received: by mail-lf1-f71.google.com with SMTP id c16so6202305lfm.10 for ; Mon, 20 Jan 2020 05:06:47 -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=FO0YZDCYDI2J/1ujIzZCIdgWpSFgOqfh62+GspZ7r0s=; b=K6la2s7j2k0t4xeJwMmnmgTGJtHVg9ZztY7gPuyzPlqMUptXv1MCrlWYfj0DboQLlL yreHsDzVMfkYaWJPEVWNs25vQZ1jP4FGDkzpl4dM3tPgleok9o7b0RtgScKs8dCIp0aV 29rlPUJp5ic3YAY9HRQWtV/ML6ELO0YycCveaFRCCEy48R58agG8JKg1/Nqr4ID1N0Cc +uPO+fVuw5Ffaw4ZYnGm3/DSNpdBNKocYEcdS3HJbf/8L1bgSbMHjkxi4fUdEHpF/Wof nmYpieUrqvpvp+JwLVBzq0Tz0wWCKi3dV4bNihoDrnwRfJ3R9jUl0AGIbvHii1pfkvlY 9ovw== X-Gm-Message-State: APjAAAUgEPnQrVsLLiNZwtFhMaGHlkc2eoGoljiTCDv87D5iEp/02X91 DmrtQpozZbX4Ntds/UOAlnaUM5h2UOhnWrzrxg6rS+pdjS1YEI1F5vxaBqaY+Xibj9aSpONY5HU 5zCc6rUwXuOXpRraYe3m/7Mab X-Received: by 2002:a2e:9cd8:: with SMTP id g24mr13288189ljj.243.1579525606544; Mon, 20 Jan 2020 05:06:46 -0800 (PST) X-Received: by 2002:a2e:9cd8:: with SMTP id g24mr13288163ljj.243.1579525606301; Mon, 20 Jan 2020 05:06:46 -0800 (PST) Received: from alrua-x1.borgediget.toke.dk ([2a0c:4d80:42:443::2]) by smtp.gmail.com with ESMTPSA id g24sm16765412lfb.85.2020.01.20.05.06.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jan 2020 05:06:45 -0800 (PST) Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000) id A70281804D6; Mon, 20 Jan 2020 14:06:44 +0100 (CET) Subject: [PATCH bpf-next v5 04/11] tools/runqslower: 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:44 +0100 Message-ID: <157952560457.1683545.9913736511685743625.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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Toke Høiland-Jørgensen Fix the runqslower tool 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 not break the build, keep the old include path until everything has been changed to the new one; a subsequent patch will remove that. Fixes: 6910d7d3867a ("selftests/bpf: Ensure bpf_helper_defs.h are taken from selftests dir") Acked-by: Andrii Nakryiko Signed-off-by: Toke Høiland-Jørgensen --- tools/bpf/runqslower/Makefile | 5 +++-- tools/bpf/runqslower/runqslower.bpf.c | 2 +- tools/bpf/runqslower/runqslower.c | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/tools/bpf/runqslower/Makefile b/tools/bpf/runqslower/Makefile index 3242ab874ac0..b7b2230f807b 100644 --- a/tools/bpf/runqslower/Makefile +++ b/tools/bpf/runqslower/Makefile @@ -6,6 +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) CFLAGS := -g -Wall # Try to detect best kernel BTF source @@ -51,13 +52,13 @@ $(OUTPUT)/%.skel.h: $(OUTPUT)/%.bpf.o | $(BPFTOOL) $(OUTPUT)/%.bpf.o: %.bpf.c $(OUTPUT)/libbpf.a | $(OUTPUT) $(call msg,BPF,$@) - $(Q)$(CLANG) -g -O2 -target bpf -I$(OUTPUT) -I$(LIBBPF_SRC) \ + $(Q)$(CLANG) -g -O2 -target bpf $(INCLUDES) \ -c $(filter %.c,$^) -o $@ && \ $(LLVM_STRIP) -g $@ $(OUTPUT)/%.o: %.c | $(OUTPUT) $(call msg,CC,$@) - $(Q)$(CC) $(CFLAGS) -I$(LIBBPF_SRC) -I$(OUTPUT) -c $(filter %.c,$^) -o $@ + $(Q)$(CC) $(CFLAGS) $(INCLUDES) -c $(filter %.c,$^) -o $@ $(OUTPUT): $(call msg,MKDIR,$@) diff --git a/tools/bpf/runqslower/runqslower.bpf.c b/tools/bpf/runqslower/runqslower.bpf.c index 623cce4d37f5..48a39f72fadf 100644 --- a/tools/bpf/runqslower/runqslower.bpf.c +++ b/tools/bpf/runqslower/runqslower.bpf.c @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 // Copyright (c) 2019 Facebook #include "vmlinux.h" -#include +#include #include "runqslower.h" #define TASK_RUNNING 0 diff --git a/tools/bpf/runqslower/runqslower.c b/tools/bpf/runqslower/runqslower.c index 996f0e2c560e..d89715844952 100644 --- a/tools/bpf/runqslower/runqslower.c +++ b/tools/bpf/runqslower/runqslower.c @@ -6,8 +6,8 @@ #include #include #include -#include -#include +#include +#include #include "runqslower.h" #include "runqslower.skel.h"