Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp7770263ybl; Thu, 16 Jan 2020 05:24:42 -0800 (PST) X-Google-Smtp-Source: APXvYqwqv6ok2uuqAPVREvpiD5lYT/mkQCG9HbNgvbfH53YxQ7o8Mw2bfzJxqq2r3JNxafQWydZl X-Received: by 2002:aca:5793:: with SMTP id l141mr3801035oib.38.1579181081815; Thu, 16 Jan 2020 05:24:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579181081; cv=none; d=google.com; s=arc-20160816; b=OsN8WHaOYkn4aZqNwhp+HVvzrgbvRtzN1/e1bNOxyzbSaPvQyQUZTY6OamM0z3zXxR 1DQQ7ZJqzkFyhGLFg3V8ZLFUx6RmiGnsq4Vj+8dZmz7gAk7jyRwQ7gy3bU/G5i1xTNeD vOBnCZVXGQ6Ej3KGD9zB9bW8mQQ2w8YEnsRSDoSXVRsMHFyAbRDr8IbixHlVABBEu4S+ ANeIYIlOCwrA/SjTufIhmXAKTQiLHOOgUqxCvrhS5pvWhdiL9l4RjJL37SfReIS2Y230 Q4xqXHGArzPAUByVd44naTNaADlL01KjQAWjezZd0xIyNvO9MojPxeOcjf1aSa6bZbHw Cd2g== 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=dddkGyog6/ukNzxfITycfkaFpImnWg5YZpf57HIco9g=; b=kbQUGDG/yFlTEvm6E+u8cQtwxu+BGlSChMH9fKlJnomzlQl8nlC78Kint+YqNxKcRr 9oL3ggJAxcliTr0yzSV2t04itOFqF1AmmaiQ3IQ5fyDgATrChkFSJFiJ5vGV9ursZIT5 p5vd73uIqmyGQH+8iQFeWSgE732pTCtw6UAhSCQvUuFOIyHHGty56jnklYVPPcvk/1Rc F7zSveCx4AvezDa8YfhiMr2bvsyUHXDd7bhmACP1UPsjmJ7NVBtiQ0kMq2NiMEUsg5pE IfN9I2JKM3KkGCEb8eXqAxOkRAQ85nWstw0jUOKyC5GPRDo6t22Mytvn3fynn1kINeJy HYEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=JPk1IALQ; 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 17si11499176oix.22.2020.01.16.05.24.29; Thu, 16 Jan 2020 05:24:41 -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=JPk1IALQ; 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 S1729146AbgAPNXE (ORCPT + 99 others); Thu, 16 Jan 2020 08:23:04 -0500 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:34754 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726979AbgAPNWX (ORCPT ); Thu, 16 Jan 2020 08:22:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1579180941; 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=dddkGyog6/ukNzxfITycfkaFpImnWg5YZpf57HIco9g=; b=JPk1IALQ4iON3jTpKc9aPujw/uuB2qQ8jMmIK16RC4Eyj7Ikuz9rVd1wnOGl7ARyltgLIV sS4ErMtapyDa8+scEBhfvHIldGUR5ezEKWkoOgrO91UVTwMfGS4STlyfmiLpo6W173+XgD N8vS64q7iAuSEyHseqvj+wUeztQnypg= 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-232-tcfj13ejOUKaGbsnOmHjdw-1; Thu, 16 Jan 2020 08:22:20 -0500 X-MC-Unique: tcfj13ejOUKaGbsnOmHjdw-1 Received: by mail-lf1-f70.google.com with SMTP id w72so3809364lff.20 for ; Thu, 16 Jan 2020 05:22: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=dddkGyog6/ukNzxfITycfkaFpImnWg5YZpf57HIco9g=; b=azR9rkfafjJEsAI+jp19Iviz+Dzxp8MqP0oJNOnmP0KgAkvOK93EF0OoxczPsVroky JRrFY8Y1iuMPz5bKI07BCvwZ91Ru7tQ71RPSMZ/aG6+5k80wnjW302+e1Y0OZZtveJT8 n6opn/I03G33+/dOfGWuYhoYabuqUEI90M4kd8dO4dBZHAgGrOQavRyly5YQi9DGws7Z l4WgSiPz3vDcPKYmOVpU728isqIXUoKcgEgRDWrlxXH9FRyTXVx+dWuNWquYrlIThfCu rWSUs855SC3xopHW/UEP3d1ACZIDK9HW+4x4RwvNBAFxj6dsGJPNnRdwsYAzKMq7ppuK KszQ== X-Gm-Message-State: APjAAAVnjgA/dSxX1dNVNFx1Tmvkdze3oNgJwquBJhQd6UTKtZCueIw5 gXe9YlzbAweZJnGPo3Od7iUCJBcEpFst6mxu8PK4bk/25Y4elSfpvo+D1/8TvQ8fHiBMXzd5Okz +CIvHk089d1Q5ao69wtvRH0wQ X-Received: by 2002:a19:3f51:: with SMTP id m78mr2377244lfa.70.1579180938886; Thu, 16 Jan 2020 05:22:18 -0800 (PST) X-Received: by 2002:a19:3f51:: with SMTP id m78mr2377225lfa.70.1579180938699; Thu, 16 Jan 2020 05:22:18 -0800 (PST) Received: from alrua-x1.borgediget.toke.dk ([45.145.92.2]) by smtp.gmail.com with ESMTPSA id 140sm10713621lfk.78.2020.01.16.05.22.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jan 2020 05:22:18 -0800 (PST) Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000) id 39AED1804D7; Thu, 16 Jan 2020 14:22:16 +0100 (CET) Subject: [PATCH bpf-next v3 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: Thu, 16 Jan 2020 14:22:16 +0100 Message-ID: <157918093613.1357254.10230277763921623892.stgit@toke.dk> In-Reply-To: <157918093154.1357254.7616059374996162336.stgit@toke.dk> References: <157918093154.1357254.7616059374996162336.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 89fb7cd30f1a..c0512b830805 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 @@ -57,13 +58,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"