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

bpf: nat: fix build error in snat_v6_prepare_state() #26510

Merged
merged 1 commit into from Jun 27, 2023

Conversation

julianwiedmann
Copy link
Member

@julianwiedmann julianwiedmann commented Jun 27, 2023

Without ENABLE_MASQUERADE_IPV6, the remote_ep variable isn't used. Fix up the build.

In file included from bpf_lxc.c:56:
./cilium/bpf/lib/nat.h:1694:31: error: variable 'remote_ep' set but not used [-Werror,-Wunused-but-set-variable]
        struct remote_endpoint_info *remote_ep;
                                     ^
1 error generated.

Without ENABLE_MASQUERADE_IPV6, the `remote_ep` variable isn't used. Fix up
the build.

In file included from bpf_lxc.c:56:
./cilium/bpf/lib/nat.h:1694:31: error: variable 'remote_ep' set but not used [-Werror,-Wunused-but-set-variable]
        struct remote_endpoint_info *remote_ep;
                                     ^
1 error generated.

Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
@julianwiedmann julianwiedmann added kind/bug This is a bug in the Cilium logic. sig/datapath Impacts bpf/ or low-level forwarding details, including map management and monitor messages. release-note/misc This PR makes changes that have no direct user impact. feature/ipv6 Relates to IPv6 protocol support release-blocker/1.14 This issue will prevent the release of the next version of Cilium. labels Jun 27, 2023
@julianwiedmann julianwiedmann requested a review from a team as a code owner June 27, 2023 13:37
@julianwiedmann
Copy link
Member Author

/test

Copy link
Member

@qmonnet qmonnet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thank you!

Out of curiosity, where did you observe the warning? I'm surprised it didn't show up when I compiled locally or when this went through the CI 🤔

@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Jun 27, 2023
@qmonnet qmonnet merged commit 83950d9 into cilium:main Jun 27, 2023
66 checks passed
@julianwiedmann
Copy link
Member Author

Looks good, thank you!

Out of curiosity, where did you observe the warning? I'm surprised it didn't show up when I compiled locally or when this went through the CI 🤔

A local make -C bpf build_all was sufficient. And yes, I would also have expected that we run this in CI :)

@julianwiedmann julianwiedmann deleted the 1.14-bpf-snat-ipv6 branch June 27, 2023 18:34
@qmonnet
Copy link
Member

qmonnet commented Jun 28, 2023

I did that, and checked again after I saw your PR, but got no error 😮. This is weird.

@qmonnet
Copy link
Member

qmonnet commented Jun 28, 2023

@julianwiedmann Ah got it, this has to do with the clang version. I compiled on a machine with an old clang 10.0, when this warning was added to LLVM 13. Which also explains why CI didn't complain I guess.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/ipv6 Relates to IPv6 protocol support kind/bug This is a bug in the Cilium logic. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-blocker/1.14 This issue will prevent the release of the next version of Cilium. release-note/misc This PR makes changes that have no direct user impact. sig/datapath Impacts bpf/ or low-level forwarding details, including map management and monitor messages.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants