Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp6532671ybl; Wed, 15 Jan 2020 06:15:29 -0800 (PST) X-Google-Smtp-Source: APXvYqxxZGDGL1hjvSbw4RVjwZBB03X4scMfcnXhaI7FS5AG52SS1p32wY5rfH3kfU/nabc+8RqN X-Received: by 2002:a05:6808:6c5:: with SMTP id m5mr20051813oih.106.1579097729251; Wed, 15 Jan 2020 06:15:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579097729; cv=none; d=google.com; s=arc-20160816; b=EdEzUf9s5lFzAhB82juYaqXTppC5LujBk3E+IlCwLt1WABK+1sjo1OiDH8m5iPUQ+o Va4K6T7jLvRVUn4Ka5kfGm+O14FRRWAchEDD+lxvfdZ9CyJVYNm2mn3ur3uztVIpte55 In84oIV0SO+nCP6mwO7U7+GJkJi/2sD5tSLOXH9DCpEtCmeRZ9qeQWkOFkFBIrVkCdFm sUeRFzfOc0Rp4M31lpnbmb/5rxOWK0ShR5aq4xCWUG0MGdr89YHbQM2TfT6pSClcFjiu 19qQbUEL9N4KB8wKgJ1v1IWffBMgFvu5RNOtUwJ4uqYXp5w5VyiBhEG78rzwH1yY9nmV ld4g== 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=tdkfMOU4O1JSYnyvWTMVAu0Pbml2FCrACzP/iFrbkaQ=; b=S/EA6I4cOJEKTKziT6OL2EnqBBQ0UefiLLX886AK3An1PAgE8EVC7vBJjBZZ0hvjjf quq4C+4ZbZmZmfgYyZC7c2IlLM3d++92GM58JMOCpUeF03r4Z9dZZeMvGf0powl3d34C Mi+UWxDI4tbjPwbvcdTfZtKE8p6jMEb5d7NLyLo0l51vxjWajpOeTtCYE0q7JcsNAP2a H7sMffyfEVNfzElRqsg05sEoOAPSmA6JdczhBzpw2dpIY2Ly6xlLHKY2q8HPrB/RGRt5 8NqIr7ipTm2e4feXp8tW4X52fXpjRRK8nOvPqQqdT1OlaPnHVPrzsaBFxxwoF0kbYHr3 jf8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=R5wr0Pf2; 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 m20si10709201otq.35.2020.01.15.06.15.16; Wed, 15 Jan 2020 06:15:29 -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=R5wr0Pf2; 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 S1729410AbgAOONB (ORCPT + 99 others); Wed, 15 Jan 2020 09:13:01 -0500 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:34741 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729345AbgAOONA (ORCPT ); Wed, 15 Jan 2020 09:13:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1579097579; 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=tdkfMOU4O1JSYnyvWTMVAu0Pbml2FCrACzP/iFrbkaQ=; b=R5wr0Pf2i7AV+e4UjmtAaY16oCKvxCSnH8DNqU5kKw/+rbXOj9Zx/H+u5zzAFSb1MoLGAV BoObtBT28JNm2+WPhiibg/YGdHNj+W0czTK9z7uS5XWHMWA1aFUFlH1lVJMba7m0XccRga pB8haNbQAlKV+2paUtD0pJoiZb56sDs= 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-153-03x-UGO4MBCQT90PKVyQnQ-1; Wed, 15 Jan 2020 09:12:57 -0500 X-MC-Unique: 03x-UGO4MBCQT90PKVyQnQ-1 Received: by mail-lj1-f200.google.com with SMTP id f15so4188870ljj.11 for ; Wed, 15 Jan 2020 06:12:56 -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=tdkfMOU4O1JSYnyvWTMVAu0Pbml2FCrACzP/iFrbkaQ=; b=l3dn0M8mNhoE0VY4wXlWinNPj55Zf2BwIS7UG7yQYLlBZc3BXDsO10NigDX9wjWZbn +t0I544ol2z/i60HzieaSWcRobQB+IObvscuS2e7mMHIYZtteYczRnrGeiwPfK5bHpck XrJEYc2rEis2JcUdKw9ln/vtvfJWHkF86knQ4P+uj9Z180/gLTqkmfX/7Af4fy0ZqhqK dyDwXPg+et4FZ7XwTw8+KfuP0f6PZ9uVNIzOqR8zDwb0ontJTDpeW8DwnTI5ezEeUWYh Hh4+qJZFqucQaIwfpLIcI/vL5bpJVrO+X71EOE5pxU33QjEKhj2t8WHVVhzWYCyrqMVW t+Fg== X-Gm-Message-State: APjAAAXAiUr4vnwGXH2nh2gxMUMXBIjv54y6p86J9qVU8h6c6+O6GIFO 3mWC0PHnptgR7TQJgvvrIy59Vn818FBL+S+GqZsVQxo4w4fxULaEjyNGqDdGzonn0kMtRHCbXFo ckCQmlfvbYTA3Sdeowkyd7cr8 X-Received: by 2002:ac2:58ea:: with SMTP id v10mr4813038lfo.202.1579097574924; Wed, 15 Jan 2020 06:12:54 -0800 (PST) X-Received: by 2002:ac2:58ea:: with SMTP id v10mr4813000lfo.202.1579097574687; Wed, 15 Jan 2020 06:12:54 -0800 (PST) Received: from alrua-x1.borgediget.toke.dk ([2a0c:4d80:42:443::2]) by smtp.gmail.com with ESMTPSA id 195sm9156230ljj.55.2020.01.15.06.12.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Jan 2020 06:12:53 -0800 (PST) Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000) id 149BD1804D6; Wed, 15 Jan 2020 15:12:52 +0100 (CET) Subject: [PATCH bpf-next v2 03/10] 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: Wed, 15 Jan 2020 15:12:52 +0100 Message-ID: <157909757197.1192265.9826436565959764419.stgit@toke.dk> In-Reply-To: <157909756858.1192265.6657542187065456112.stgit@toke.dk> References: <157909756858.1192265.6657542187065456112.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") 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 fb93ce2bf2fe..3b7ae76c8ec4 100644 --- a/tools/bpf/runqslower/Makefile +++ b/tools/bpf/runqslower/Makefile @@ -5,6 +5,7 @@ LLC := llc LLVM_STRIP := llvm-strip DEFAULT_BPFTOOL := $(OUTPUT)/sbin/bpftool BPFTOOL ?= $(DEFAULT_BPFTOOL) +LIBBPF_INCLUDE := -I$(abspath ../../lib) -I$(abspath ../../lib/bpf) LIBBPF_SRC := $(abspath ../../lib/bpf) CFLAGS := -g -Wall @@ -59,13 +60,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 -I$(OUTPUT) $(LIBBPF_INCLUDE) \ -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) $(LIBBPF_INCLUDE) -I$(OUTPUT) -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"