[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20220405103214.3526290-1-alexandr.lobakin@intel.com>
Date: Tue, 5 Apr 2022 12:32:14 +0200
From: Alexander Lobakin <alexandr.lobakin@...el.com>
To: Andrii Nakryiko <andrii.nakryiko@...il.com>
Cc: Alexander Lobakin <alexandr.lobakin@...el.com>,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Andrii Nakryiko <andrii@...nel.org>,
Martin KaFai Lau <kafai@...com>,
Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
John Fastabend <john.fastabend@...il.com>,
KP Singh <kpsingh@...nel.org>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Jesper Dangaard Brouer <hawk@...nel.org>,
Lorenzo Bianconi <lorenzo@...nel.org>,
Maciej Fijalkowski <maciej.fijalkowski@...el.com>,
Networking <netdev@...r.kernel.org>, bpf <bpf@...r.kernel.org>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH bpf-next] samples: bpf: fix linking xdp_router_ipv4 after migration
From: Andrii Nakryiko <andrii.nakryiko@...il.com>
Date: Mon, 4 Apr 2022 14:45:43 -0700
> On Mon, Apr 4, 2022 at 4:57 AM Alexander Lobakin
> <alexandr.lobakin@...el.com> wrote:
> >
> > Users of the xdp_sample_user infra should be explicitly linked
> > with the standard math library (`-lm`). Otherwise, the following
> > happens:
> >
> > /usr/bin/ld: xdp_sample_user.c:(.text+0x59fc): undefined reference to `ceil'
> > /usr/bin/ld: xdp_sample_user.c:(.text+0x5a0d): undefined reference to `ceil'
> > /usr/bin/ld: xdp_sample_user.c:(.text+0x5adc): undefined reference to `floor'
> > /usr/bin/ld: xdp_sample_user.c:(.text+0x5b01): undefined reference to `ceil'
> > /usr/bin/ld: xdp_sample_user.c:(.text+0x5c1e): undefined reference to `floor'
> > /usr/bin/ld: xdp_sample_user.c:(.text+0x5c43): undefined reference to `ceil
> > [...]
>
> I actually don't get these, but applied to bpf-next anyway.
Depends on the compiler/linker I guess. They appear on `make LLVM=1`
on my setup.
Thanks!
>
> >
> > That happened previously, so there's a block of linkage flags in the
> > Makefile. xdp_router_ipv4 has been transferred to this infra quite
> > recently, but hasn't been added to it. Fix.
> >
> > Fixes: 85bf1f51691c ("samples: bpf: Convert xdp_router_ipv4 to XDP samples helper")
> > Signed-off-by: Alexander Lobakin <alexandr.lobakin@...el.com>
> > ---
> > samples/bpf/Makefile | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile
> > index b4fa0e69aa14..342a41a10356 100644
> > --- a/samples/bpf/Makefile
> > +++ b/samples/bpf/Makefile
> > @@ -219,6 +219,7 @@ TPROGLDLIBS_xdp_redirect += -lm
> > TPROGLDLIBS_xdp_redirect_cpu += -lm
> > TPROGLDLIBS_xdp_redirect_map += -lm
> > TPROGLDLIBS_xdp_redirect_map_multi += -lm
> > +TPROGLDLIBS_xdp_router_ipv4 += -lm
> > TPROGLDLIBS_tracex4 += -lrt
> > TPROGLDLIBS_trace_output += -lrt
> > TPROGLDLIBS_map_perf_test += -lrt
> > --
> > 2.35.1
Al
Powered by blists - more mailing lists