Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Program size issue on 4.19 with IPv4-only and all advanced features #17490

Closed
pchaigno opened this issue Sep 28, 2021 · 0 comments · Fixed by #17573
Closed

Program size issue on 4.19 with IPv4-only and all advanced features #17490

pchaigno opened this issue Sep 28, 2021 · 0 comments · Fixed by #17573
Assignees
Labels
kind/bug This is a bug in the Cilium logic. kind/complexity-issue Relates to BPF complexity or program size issues sig/datapath Impacts bpf/ or low-level forwarding details, including map management and monitor messages. sig/loader Impacts the loading of BPF programs into the kernel.

Comments

@pchaigno
Copy link
Member

pchaigno commented Sep 28, 2021

#17470 extends K8sVerifier to also test IPv4-only and IPv6-only. In the process, a new program size issue was found for 4.19 and IPv4-only.

Reproduction steps:

$ docker run --privileged -v `pwd`/:/cilium -v /sys/fs/bpf:/sys/fs/bpf --workdir /cilium -it quay.io/cilium/test-verifier:0f6647c542b71e89f310e437570b6d05dd9351bb make -C bpf bpf_lxc.o KERNEL=419 MAX_LXC_OPTIONS="-DSKIP_DEBUG=1 -DENABLE_IPV4=1 -DENABLE_HOST_SERVICES_TCP=1 -DENABLE_HOST_SERVICES_UDP=1 -DENABLE_HOST_REDIRECT=1 -DENABLE_ROUTING=1 -DNO_REDIRECT=1 -DPOLICY_VERDICT_NOTIFY=1 -DALLOW_ICMP_FRAG_NEEDED=1 -DENABLE_IDENTITY_MARK=1 -DMONITOR_AGGREGATION=3 -DCT_REPORT_FLAGS=0x0002 -DENABLE_HOST_FIREWALL=1 -DHAVE_LPM_TRIE_MAP_TYPE=1 -DHAVE_LRU_HASH_MAP_TYPE=1 -DENABLE_MASQUERADE=1 -DENABLE_SRC_RANGE_CHECK=1 -DENABLE_NODEPORT=1 -DENABLE_NODEPORT_ACCELERATION=1 -DENABLE_SESSION_AFFINITY=1 -DENABLE_DSR_ICMP_ERRORS=1 -DENABLE_DSR=1 -DENABLE_DSR_HYBRID=1 -DENABLE_IPV4_FRAGMENTS=1 -DENCAP_IFINDEX=1 -DTUNNEL_MODE=1 -DENABLE_EGRESS_GATEWAY=1"
$ docker run --privileged -v `pwd`/:/cilium -v /sys/fs/bpf:/sys/fs/bpf --workdir /cilium -it quay.io/cilium/test-verifier:0f6647c542b71e89f310e437570b6d05dd9351bb env XDP_PROGS="" CG_PROGS="" TC_PROGS="bpf_lxc" ./test/bpf/verifier-test.sh
[...]
Prog section 'from-container' rejected: Argument list too long (7)!
 - Type:         3
 - Attach Type:  0
 - Instructions: 4180 (84 over limit)
 - License:      GPL

A quick fix for this would be to compile the IPvX-specific tail calls even when only one of IPv4/IPv6 is enabled.

@pchaigno pchaigno added kind/bug This is a bug in the Cilium logic. sig/loader Impacts the loading of BPF programs into the kernel. kind/complexity-issue Relates to BPF complexity or program size issues sig/datapath Impacts bpf/ or low-level forwarding details, including map management and monitor messages. labels Sep 28, 2021
@pchaigno pchaigno self-assigned this Oct 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug This is a bug in the Cilium logic. kind/complexity-issue Relates to BPF complexity or program size issues sig/datapath Impacts bpf/ or low-level forwarding details, including map management and monitor messages. sig/loader Impacts the loading of BPF programs into the kernel.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant