Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp9052172ybl; Fri, 17 Jan 2020 05:38:26 -0800 (PST) X-Google-Smtp-Source: APXvYqzLwvjQyvLqbB/ykTAjO1mLt+EtHAT4c84MSGVT4sSXjK2SHkRZ3BIMHgCpMJhGt+EBoHmC X-Received: by 2002:aca:6042:: with SMTP id u63mr3464803oib.76.1579268306193; Fri, 17 Jan 2020 05:38:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579268306; cv=none; d=google.com; s=arc-20160816; b=bCxQFp8w6YLNqRcqsOpB//+pNRNJxE9O1AkO/Ddli3i+9Pojf3WhnimKwcOW1S9gkY UDbLTSMxANCG9Q9qtiUNPZuhGX6dTXTMyUgtxzochIg+iU4CUtFwkuubKbJmSvcehnNa oCMw5hrkZUW6LCI05PTpjs8TGiBs1Lwo6oWkxc1ahGTnGrajifzciAspS5wo3QFKuI4K jCe0ppRanbn1HG1E1cvmvvgCB/MxyKkv2pgMBtFy1qkDOGyU5BtMyaKy4yvrLF40fcC+ vM27oHsZJOgixMsfva4M8fYXIGFVzdZfNvVPG1Y08cXOI5hoesWlyFY0rwn9qVwPoziS vXaQ== 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=OknDVKXPzEk2i0iYFrlDPLSC26NRFKasACpxW1z9e2E=; b=W3X2YwyFGNh5wvGuCSpV/evDk7Rs+iNQpHUZUEorh1hBmY0bR5ZGcgDK6RGFUcdwAg 24lFa30ZzFjrCdX7516X2KyNlv5EKyjXZn0hUv2rGcZe80tCki3zdViPWbBNqEFvyzC/ OboboU72VVTnMYOS0RrFhO6NPobeugHkiF5EazclcuCQp8mZUfdtP7mdwWywyMFgKtiQ 2+p7mXR6PTukNrsEgJ2fP6dttW6Siol+8ub7bG1L7tGruPFdlcJ0PZpyjRUFhLSk2rb3 t5oUqInSrT0gICVPXMomznV9d3vhEt516A6z2XKBovpYWtwm2nfuhCzApRnF0/eQ+TBx q0Tw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=KzHo9sKD; 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 q190si13733199oic.187.2020.01.17.05.38.13; Fri, 17 Jan 2020 05:38:26 -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=KzHo9sKD; 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 S1728842AbgAQNgv (ORCPT + 99 others); Fri, 17 Jan 2020 08:36:51 -0500 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:50672 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728709AbgAQNgs (ORCPT ); Fri, 17 Jan 2020 08:36:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1579268206; 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=OknDVKXPzEk2i0iYFrlDPLSC26NRFKasACpxW1z9e2E=; b=KzHo9sKDLUIdMeQFdTb2y7vmYZ37+ZU+vCzF5SPmedTd+7SH5H64bYHldndq3ppSXMg8w0 TWNzqtQhAP9ZJcYPdbUxN9OyDd+YHItyvXJ7vvoZ8l1a+f0OaIFcOVStBp5i1C2zSnGYyj rDXi9lK/jlz5SgCIG3TvlT7MAA5ObFU= Received: from mail-lf1-f72.google.com (mail-lf1-f72.google.com [209.85.167.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-310-XWLfvP_wPCKV8VCV_egsIA-1; Fri, 17 Jan 2020 08:36:45 -0500 X-MC-Unique: XWLfvP_wPCKV8VCV_egsIA-1 Received: by mail-lf1-f72.google.com with SMTP id l2so4355680lfk.23 for ; Fri, 17 Jan 2020 05:36:45 -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=OknDVKXPzEk2i0iYFrlDPLSC26NRFKasACpxW1z9e2E=; b=H5FqIZRSu4grmNf347ZN+vG0tVolBI76kbEOQx+FQoOJo3HzLoHd+h8ZPm2Gg3Mxn5 lE6aCQDwBz+Wj4CWx3nSM38ZPMJrRdI2y2lpyyRMVjr1pEtSiUDd5qvZ9ZLSRO0zTvOG maPHocJHFY5JDnu7BPChkYJs+aIJ1coCtg5IORjXk9i2BhSnlDPuquTUZxrQoaJU2faD JfWtvcOM7aMKB91r2sRGPtN2PNppIMMsAVFVZDXBwE1pN6LfIZbhiavlOKXY9IBRVSML WONq92iKDoA4xnytjpxyl14D9uv7i/MrGjMV4SBaxdnYhmcl5I9yUE0EsK4kAQcnrx6N S1qw== X-Gm-Message-State: APjAAAWaelzkmNcQm/H5MnY1wPRr626gLOLJGAY006T3f1Ao5UGvrZhn RZsh4MXw/hz0WyETbb6z5I+yOPFtEcUU9t+iw9eLBhVoVPhFmnYEACZt2gsnH5DowXJuNOGmvW+ q52hFIqy7RmAoWMWFoGruHDYI X-Received: by 2002:ac2:5c4a:: with SMTP id s10mr5379675lfp.88.1579268204096; Fri, 17 Jan 2020 05:36:44 -0800 (PST) X-Received: by 2002:ac2:5c4a:: with SMTP id s10mr5379639lfp.88.1579268203914; Fri, 17 Jan 2020 05:36:43 -0800 (PST) Received: from alrua-x1.borgediget.toke.dk ([2a0c:4d80:42:443::2]) by smtp.gmail.com with ESMTPSA id l64sm12147018lfd.30.2020.01.17.05.36.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jan 2020 05:36:43 -0800 (PST) Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000) id 5BD791804D6; Fri, 17 Jan 2020 14:36:41 +0100 (CET) Subject: [PATCH bpf-next v4 04/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: Fri, 17 Jan 2020 14:36:41 +0100 Message-ID: <157926820131.1555735.1177228853838027248.stgit@toke.dk> In-Reply-To: <157926819690.1555735.10756593211671752826.stgit@toke.dk> References: <157926819690.1555735.10756593211671752826.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 b62fc9646c39..9f022f7f2593 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) +INCLUDES := -I$(OUTPUT) -I$(abspath ../../lib) -I$(abspath ../../lib/bpf) LIBBPF_SRC := $(abspath ../../lib/bpf) CFLAGS := -g -Wall @@ -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"