2019-03-26 22:15:44

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: manual merge of the bpf-next tree with the net tree

Hi all,

Today's linux-next merge of the bpf-next tree got a conflict in:

tools/lib/bpf/Makefile

between commit:

1d382264d911 ("bpf, libbpf: fix version info and add it to shared object")

from the net tree and commit:

60e4786e229d ("tools/bpf: generate pkg-config file for libbpf")

from the bpf-next tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

--
Cheers,
Stephen Rothwell

diff --cc tools/lib/bpf/Makefile
index 5bf8e52c41fc,96e9571b0a2e..000000000000
--- a/tools/lib/bpf/Makefile
+++ b/tools/lib/bpf/Makefile
@@@ -79,6 -79,9 +79,8 @@@ export prefix libdir src ob
libdir_SQ = $(subst ','\'',$(libdir))
libdir_relative_SQ = $(subst ','\'',$(libdir_relative))

-LIB_FILE = libbpf.a libbpf.so
+ PC_FILE = libbpf.pc
+
VERSION = $(BPF_VERSION)
PATCHLEVEL = $(BPF_PATCHLEVEL)
EXTRAVERSION = $(BPF_EXTRAVERSION)
@@@ -129,18 -129,17 +131,19 @@@ all
export srctree OUTPUT CC LD CFLAGS V
include $(srctree)/tools/build/Makefile.include

-BPF_IN := $(OUTPUT)libbpf-in.o
-LIB_FILE := $(addprefix $(OUTPUT),$(LIB_FILE))
-PC_FILE := $(addprefix $(OUTPUT),$(PC_FILE))
-VERSION_SCRIPT := libbpf.map
+BPF_IN := $(OUTPUT)libbpf-in.o
+VERSION_SCRIPT := libbpf.map
+
+LIB_TARGET := $(addprefix $(OUTPUT),$(LIB_TARGET))
+LIB_FILE := $(addprefix $(OUTPUT),$(LIB_FILE))
++PC_FILE := $(addprefix $(OUTPUT),$(PC_FILE))

GLOBAL_SYM_COUNT = $(shell readelf -s --wide $(BPF_IN) | \
awk '/GLOBAL/ && /DEFAULT/ && !/UND/ {s++} END{print s}')
VERSIONED_SYM_COUNT = $(shell readelf -s --wide $(OUTPUT)libbpf.so | \
grep -Eo '[^ ]+@LIBBPF_' | cut -d@ -f1 | sort -u | wc -l)

- CMD_TARGETS = $(LIB_TARGET)
-CMD_TARGETS = $(LIB_FILE) $(PC_FILE)
++CMD_TARGETS = $(LIB_TARGET) $(PC_FILE)

CXX_TEST_TARGET = $(OUTPUT)test_libbpf

@@@ -233,7 -232,7 +247,7 @@@ config-clean

clean:
$(call QUIET_CLEAN, libbpf) $(RM) $(TARGETS) $(CXX_TEST_TARGET) \
- *.o *~ *.a *.so *.so.$(VERSION) .*.d .*.cmd LIBBPF-CFLAGS
- *.o *~ *.a *.so .*.d .*.cmd *.pc LIBBPF-CFLAGS
++ *.o *~ *.a *.so *.so.$(VERSION) .*.d .*.cmd *.pc LIBBPF-CFLAGS
$(call QUIET_CLEAN, core-gen) $(RM) $(OUTPUT)FEATURE-DUMP.libbpf



Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2019-03-27 01:58:34

by Alexei Starovoitov

[permalink] [raw]
Subject: Re: linux-next: manual merge of the bpf-next tree with the net tree

On Wed, Mar 27, 2019 at 09:14:37AM +1100, Stephen Rothwell wrote:
> Hi all,
>
> Today's linux-next merge of the bpf-next tree got a conflict in:
>
> tools/lib/bpf/Makefile
>
> between commit:
>
> 1d382264d911 ("bpf, libbpf: fix version info and add it to shared object")
>
> from the net tree and commit:
>
> 60e4786e229d ("tools/bpf: generate pkg-config file for libbpf")
>
> from the bpf-next tree.
>
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging. You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.

argh. that's a heavy conflict.
Since that patch was at the top of the bpf-next I removed it for now
and will re-apply when bpf-next gets merged cleanly into net-next and
we bring back net changes into bpf-next. Sorry Luca.


2019-03-27 09:26:58

by Luca Boccassi

[permalink] [raw]
Subject: Re: linux-next: manual merge of the bpf-next tree with the net tree

On Tue, 2019-03-26 at 18:56 -0700, Alexei Starovoitov wrote:
> On Wed, Mar 27, 2019 at 09:14:37AM +1100, Stephen Rothwell wrote:
> > Hi all,
> >
> > Today's linux-next merge of the bpf-next tree got a conflict in:
> >
> > tools/lib/bpf/Makefile
> >
> > between commit:
> >
> > 1d382264d911 ("bpf, libbpf: fix version info and add it to shared
> > object")
> >
> > from the net tree and commit:
> >
> > 60e4786e229d ("tools/bpf: generate pkg-config file for libbpf")
> >
> > from the bpf-next tree.
> >
> > I fixed it up (see below) and can carry the fix as necessary. This
> > is now fixed as far as linux-next is concerned, but any non trivial
> > conflicts should be mentioned to your upstream maintainer when your
> > tree
> > is submitted for merging. You may also want to consider
> > cooperating
> > with the maintainer of the conflicting tree to minimise any
> > particularly
> > complex conflicts.
>
> argh. that's a heavy conflict.
> Since that patch was at the top of the bpf-next I removed it for now
> and will re-apply when bpf-next gets merged cleanly into net-next and
> we bring back net changes into bpf-next. Sorry Luca.

No worries - for the next time, should I have based the patch on net-
next rather than bpf-next?

--
Kind regards,
Luca Boccassi

2019-03-27 15:16:09

by Alexei Starovoitov

[permalink] [raw]
Subject: Re: linux-next: manual merge of the bpf-next tree with the net tree

On Wed, Mar 27, 2019 at 09:26:02AM +0000, Luca Boccassi wrote:
> On Tue, 2019-03-26 at 18:56 -0700, Alexei Starovoitov wrote:
> > On Wed, Mar 27, 2019 at 09:14:37AM +1100, Stephen Rothwell wrote:
> > > Hi all,
> > >
> > > Today's linux-next merge of the bpf-next tree got a conflict in:
> > >
> > > tools/lib/bpf/Makefile
> > >
> > > between commit:
> > >
> > > 1d382264d911 ("bpf, libbpf: fix version info and add it to shared
> > > object")
> > >
> > > from the net tree and commit:
> > >
> > > 60e4786e229d ("tools/bpf: generate pkg-config file for libbpf")
> > >
> > > from the bpf-next tree.
> > >
> > > I fixed it up (see below) and can carry the fix as necessary. This
> > > is now fixed as far as linux-next is concerned, but any non trivial
> > > conflicts should be mentioned to your upstream maintainer when your
> > > tree
> > > is submitted for merging. You may also want to consider
> > > cooperating
> > > with the maintainer of the conflicting tree to minimise any
> > > particularly
> > > complex conflicts.
> >
> > argh. that's a heavy conflict.
> > Since that patch was at the top of the bpf-next I removed it for now
> > and will re-apply when bpf-next gets merged cleanly into net-next and
> > we bring back net changes into bpf-next. Sorry Luca.
>
> No worries - for the next time, should I have based the patch on net-
> next rather than bpf-next?

new bpf related features -> bpf-next tree
bpf bugfixes -> bpf tree

Linus hasn't pulled Dave's PR yet: https://patchwork.ozlabs.org/patch/1066321/
We need these fixes to land his tree first,
then get propagated into net-next and then bpf-next will get them as well.
Sorry for this unfortunate delay.
This lib/bpf/Makefile conflict is not the only one we're waiting for.
There are verifier and other libbpf fixes in there.