Thread (12 messages) flat view 12 messages, 3 authors, 2018-05-09

Re: [PATCH bpf-next v3 3/6] bpf: Add IPv6 Segment Routing helpers

From: Mathieu Xhonneux <hidden>
Date: 2018-05-07 22:21:13

I'm not sure what would be the best approach here. These errors appear
when CONFIG_IPV6=m and CONFIG_IPV6_SEG6_LWTUNNEL=y (which is bool and
depends on IPv6, hence it is also modularized in this case), then
IS_ENABLED(CONFIG_IPV6_SEG6_LWTUNNEL) returns true, even though the
seg6_* symbols are not available when linking vmlinux. If I'm correct,
since net/core/filter.c is always built-in, all functions it uses must
also be built-in.

I didn't find any other dependency from net/core/filter.c using a
feature which can be modularized, hence the only solution I see here
is to create a new bool CONFIG variable, e.g. CONFIG_IPV6_SEG6_BPF,
which would require CONFIG_IPV6=y and CONFIG_IPV6_SEG6_LWTUNNEL=y. I
could then replace my #if IS_ENABLED(CONFIG_IPV6_SEG6_LWTUNNEL)
conditions by #if IS_ENABLED(CONFIG_IPV6_SEG6_BPF) in
net/core/filter.c.

Any comment on this ?

Thanks.

2018-05-07 0:29 GMT+01:00 kbuild test robot [off-list ref]:
Hi Mathieu,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on bpf-next/master]

url:    https://github.com/0day-ci/linux/commits/Mathieu-Xhonneux/ipv6-sr-introduce-seg6local-End-BPF-action/20180506-233046
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: s390-allmodconfig (attached as .config)
compiler: s390x-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=s390

All errors (new ones prefixed by >>):

   net/core/filter.o: In function `bpf_push_seg6_encap':
   filter.c:(.text+0xaf4c): undefined reference to `seg6_validate_srh'
   filter.c:(.text+0xaf8a): undefined reference to `seg6_do_srh_inline'
   filter.c:(.text+0xafc4): undefined reference to `seg6_do_srh_encap'
   filter.c:(.text+0xb016): undefined reference to `seg6_lookup_nexthop'
   net/core/filter.o: In function `bpf_lwt_seg6_store_bytes':
quoted
quoted
(.text+0xb106): undefined reference to `seg6_bpf_srh_states'
   net/core/filter.o: In function `bpf_lwt_seg6_action':
   (.text+0xb2b0): undefined reference to `seg6_bpf_srh_states'
quoted
quoted
(.text+0xb334): undefined reference to `seg6_validate_srh'
(.text+0xb394): undefined reference to `seg6_lookup_nexthop'
   (.text+0xb3c4): undefined reference to `seg6_lookup_nexthop'
   net/core/filter.o: In function `bpf_lwt_seg6_adjust_srh':
   (.text+0xb492): undefined reference to `seg6_bpf_srh_states'

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help