mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pu Lehui <pulehui@huawei.com>
To: Andrii Nakryiko <andrii.nakryiko@gmail.com>
Cc: bpf <bpf@vger.kernel.org>, Networking <netdev@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>,
	Alexei Starovoitov <ast@kernel.org>,
	"Daniel Borkmann" <daniel@iogearbox.net>,
	Andrii Nakryiko <andrii@kernel.org>,
	"Quentin Monnet" <quentin@isovalent.com>,
	Martin KaFai Lau <kafai@fb.com>, Song Liu <songliubraving@fb.com>,
	Yonghong Song <yhs@fb.com>,
	John Fastabend <john.fastabend@gmail.com>,
	KP Singh <kpsingh@kernel.org>,
	"Jean-Philippe Brucker" <jean-philippe@linaro.org>
Subject: Re: [PATCH bpf-next 2/3] tools: runqslower: build and use lightweight bootstrap version of bpftool
Date: Thu, 14 Jul 2022 10:02:01 +0800	[thread overview]
Message-ID: <02f6f676-c6a9-9bac-19f1-a8fb0d236059@huawei.com> (raw)
In-Reply-To: <CAEf4BzYQM0RpsgUZgZpcMuDRSD2o96HzWzSeU5=GC0YfmjiXug@mail.gmail.com>



On 2022/7/14 2:52, Andrii Nakryiko wrote:
> On Mon, Jul 11, 2022 at 7:37 PM Pu Lehui <pulehui@huawei.com> wrote:
>>
>> tools/runqslower use bpftool for vmlinux.h, skeleton, and static linking
>> only. So we can use lightweight bootstrap version of bpftool to handle
>> these, and it will be faster.
>>
>> Signed-off-by: Pu Lehui <pulehui@huawei.com>
>> Suggested-by: Andrii Nakryiko <andrii@kernel.org>
>> ---
>>   tools/bpf/runqslower/Makefile | 10 ++++++++--
>>   1 file changed, 8 insertions(+), 2 deletions(-)
>>
>> diff --git a/tools/bpf/runqslower/Makefile b/tools/bpf/runqslower/Makefile
>> index da6de16a3dfb..8900c74f29e2 100644
>> --- a/tools/bpf/runqslower/Makefile
>> +++ b/tools/bpf/runqslower/Makefile
>> @@ -4,7 +4,7 @@ include ../../scripts/Makefile.include
>>   OUTPUT ?= $(abspath .output)/
>>
>>   BPFTOOL_OUTPUT := $(OUTPUT)bpftool/
>> -DEFAULT_BPFTOOL := $(BPFTOOL_OUTPUT)bpftool
>> +DEFAULT_BPFTOOL := $(BPFTOOL_OUTPUT)bootstrap/bpftool
>>   BPFTOOL ?= $(DEFAULT_BPFTOOL)
>>   LIBBPF_SRC := $(abspath ../../lib/bpf)
>>   BPFOBJ_OUTPUT := $(OUTPUT)libbpf/
>> @@ -86,6 +86,12 @@ $(BPFOBJ): $(wildcard $(LIBBPF_SRC)/*.[ch] $(LIBBPF_SRC)/Makefile) | $(BPFOBJ_OU
>>          $(Q)$(MAKE) $(submake_extras) -C $(LIBBPF_SRC) OUTPUT=$(BPFOBJ_OUTPUT) \
>>                      DESTDIR=$(BPFOBJ_OUTPUT) prefix= $(abspath $@) install_headers
>>
>> +ifeq ($(CROSS_COMPILE),)
>>   $(DEFAULT_BPFTOOL): $(BPFOBJ) | $(BPFTOOL_OUTPUT)
>>          $(Q)$(MAKE) $(submake_extras) -C ../bpftool OUTPUT=$(BPFTOOL_OUTPUT)   \
>> -                   ARCH= CROSS_COMPILE= CC=$(HOSTCC) LD=$(HOSTLD)
>> +                   LIBBPF_BOOTSTRAP_OUTPUT=$(BPFOBJ_OUTPUT)                   \
>> +                   LIBBPF_BOOTSTRAP_DESTDIR=$(BPF_DESTDIR) bootstrap
>> +else
>> +$(DEFAULT_BPFTOOL): | $(BPFTOOL_OUTPUT)
>> +       $(Q)$(MAKE) $(submake_extras) -C ../bpftool OUTPUT=$(BPFTOOL_OUTPUT) bootstrap
>> +endif
> 
> Same comment as on the other patch, this CROSS_COMPILE if/else seems a
> bit fragile, let's keep only the second cleaner part, maybe?
> 

I will make it simple.

> 
>> --
>> 2.25.1
>>
> .
> 

  reply	other threads:[~2022-07-14  2:02 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-12  3:08 [PATCH bpf-next 0/3] Use lightweigt " Pu Lehui
2022-07-12  3:08 ` [PATCH bpf-next 1/3] samples: bpf: Fix cross-compiling error by using bootstrap bpftool Pu Lehui
2022-07-12 10:11   ` Quentin Monnet
2022-07-12 11:32     ` Pu Lehui
2022-07-13 18:50       ` Andrii Nakryiko
2022-07-12  3:08 ` [PATCH bpf-next 2/3] tools: runqslower: build and use lightweight bootstrap version of bpftool Pu Lehui
2022-07-13 18:52   ` Andrii Nakryiko
2022-07-14  2:02     ` Pu Lehui [this message]
2022-07-12  3:08 ` [PATCH bpf-next 3/3] bpf: iterators: " Pu Lehui
2022-07-13 18:55   ` Andrii Nakryiko
2022-07-13 19:03     ` Quentin Monnet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=02f6f676-c6a9-9bac-19f1-a8fb0d236059@huawei.com \
    --to=pulehui@huawei.com \
    --cc=andrii.nakryiko@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=jean-philippe@linaro.org \
    --cc=john.fastabend@gmail.com \
    --cc=kafai@fb.com \
    --cc=kpsingh@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=quentin@isovalent.com \
    --cc=songliubraving@fb.com \
    --cc=yhs@fb.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®