bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: KP Singh <kpsingh@chromium.org>
To: Alexei Starovoitov <alexei.starovoitov@gmail.com>
Cc: linux-kernel@vger.kernel.org, bpf@vger.kernel.org,
	Florent Revest <revest@google.com>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Martin KaFai Lau <kafai@fb.com>, Song Liu <songliubraving@fb.com>,
	Yonghong Song <yhs@fb.com>, Florent Revest <revest@chromium.org>,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: Re: [PATCH] samples/bpf: Fix broken samples.
Date: Wed, 2 Oct 2019 20:52:33 +0200	[thread overview]
Message-ID: <20191002185233.GA3650@chromium.org> (raw)
In-Reply-To: <20191002184506.iauttcpgyzcplope@ast-mbp.dhcp.thefacebook.com>

On 02-Okt 11:45, Alexei Starovoitov wrote:
> On Wed, Oct 02, 2019 at 07:46:32PM +0200, KP Singh wrote:
> > From: KP Singh <kpsingh@google.com>
> > 
> > Rename asm_goto_workaround.h to asm_workaround.h and add a
> > workaround for the newly added "asm_inline" in:
> > 
> >   commit eb111869301e ("compiler-types.h: add asm_inline definition")
> > 
> > Add missing include for <linux/perf_event.h> which was removed from
> > perf-sys.h in:
> > 
> >   commit 91854f9a077e ("perf tools: Move everything related to
> > 	               sys_perf_event_open() to perf-sys.h")
> > 

I see this is already fixed in a patch that was sent yesterday and has
been Acked.

  https://lore.kernel.org/bpf/20191001112249.27341-1-bjorn.topel@gmail.com/

I will drop this change from my patch.

> > Co-developed-by: Florent Revest <revest@google.com>
> > Signed-off-by: Florent Revest <revest@google.com>
> > Signed-off-by: KP Singh <kpsingh@google.com>
> > ---
> >  samples/bpf/Makefile                            |  2 +-
> >  .../{asm_goto_workaround.h => asm_workaround.h} | 17 ++++++++++++++---
> >  samples/bpf/task_fd_query_user.c                |  1 +
> >  3 files changed, 16 insertions(+), 4 deletions(-)
> >  rename samples/bpf/{asm_goto_workaround.h => asm_workaround.h} (46%)
> > 
> > diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile
> > index 42b571cde177..ab2b4d7ecb4b 100644
> > --- a/samples/bpf/Makefile
> > +++ b/samples/bpf/Makefile
> > @@ -289,7 +289,7 @@ $(obj)/%.o: $(src)/%.c
> >  		-Wno-gnu-variable-sized-type-not-at-end \
> >  		-Wno-address-of-packed-member -Wno-tautological-compare \
> >  		-Wno-unknown-warning-option $(CLANG_ARCH_ARGS) \
> > -		-I$(srctree)/samples/bpf/ -include asm_goto_workaround.h \
> > +		-I$(srctree)/samples/bpf/ -include asm_workaround.h \
> >  		-O2 -emit-llvm -c $< -o -| $(LLC) -march=bpf $(LLC_FLAGS) -filetype=obj -o $@
> >  ifeq ($(DWARF2BTF),y)
> >  	$(BTF_PAHOLE) -J $@
> > diff --git a/samples/bpf/asm_goto_workaround.h b/samples/bpf/asm_workaround.h
> > similarity index 46%
> > rename from samples/bpf/asm_goto_workaround.h
> > rename to samples/bpf/asm_workaround.h
> > index 7409722727ca..7c99ea6ae98c 100644
> > --- a/samples/bpf/asm_goto_workaround.h
> > +++ b/samples/bpf/asm_workaround.h
> > @@ -1,9 +1,10 @@
> >  /* SPDX-License-Identifier: GPL-2.0 */
> >  /* Copyright (c) 2019 Facebook */
> > -#ifndef __ASM_GOTO_WORKAROUND_H
> > -#define __ASM_GOTO_WORKAROUND_H
> > +#ifndef __ASM_WORKAROUND_H
> > +#define __ASM_WORKAROUND_H
> 
> I don't think rename is necessary.
> This file already has a hack for volatile().
> Just add asm_inline hack to it.

Thanks, will send an update the patch to reflect this.

- KP

> 

      reply	other threads:[~2019-10-02 18:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-02 17:46 [PATCH] samples/bpf: Fix broken samples KP Singh
2019-10-02 18:45 ` Alexei Starovoitov
2019-10-02 18:52   ` KP Singh [this message]

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=20191002185233.GA3650@chromium.org \
    --to=kpsingh@chromium.org \
    --cc=acme@redhat.com \
    --cc=alexei.starovoitov@gmail.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=kafai@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=revest@chromium.org \
    --cc=revest@google.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;
as well as URLs for NNTP newsgroup(s).