Skip to content

Conversation

dylandreimerink
Copy link
Member

@dylandreimerink dylandreimerink commented May 13, 2025

During some other work I discovered that the whole active connection tracking feature does not compile when enabled in combination with IPv6.

When both IPv6 and active connection tracking are enabled, we are unable to compile, resulting in the following error:

./lib/lb.h:1071:21: error: use of undeclared identifier 'ct_state'

This is because in lb6_local the name of the variable is state not ct_state. This issue seems to have been here since the introduction of the feature and was never caught due to a lack of testing.

Also adding to the complexity tests to add some compile coverage as regression test.

Fixed bug where datapath is unable to compile when active connection tracking and IPv6 are enabled at the same time.

@dylandreimerink dylandreimerink added the dont-merge/preview-only Only for preview or testing, don't merge it. label May 13, 2025
@maintainer-s-little-helper maintainer-s-little-helper bot added dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. labels May 13, 2025
@dylandreimerink dylandreimerink added the release-note/bug This PR fixes an issue in a previous release of Cilium. label May 13, 2025
@maintainer-s-little-helper maintainer-s-little-helper bot removed the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label May 13, 2025
@dylandreimerink
Copy link
Member Author

/ci-verifier

During some other work I discovered that the whole active connection
tracking feature does not compile when enabled. Adding to the complexity
tests to add some compile coverage as regression test. Will fix the
actual issue in a subsequent commit.

Signed-off-by: Dylan Reimerink <dylan.reimerink@isovalent.com>
When both IPv6 and active connection tracking are enabled, we are unable
to compile, resulting in the following error:

```
./lib/lb.h:1071:21: error: use of undeclared identifier 'ct_state'
```

This is because in `lb6_local` the name of the variable is `state` not
`ct_state`. This issue seems to have been here since the introduction
of the feature and was never caught due to a lack of testing.

Signed-off-by: Dylan Reimerink <dylan.reimerink@isovalent.com>
@dylandreimerink dylandreimerink force-pushed the pr/dylandreimerink/fix-active-connection-tracking branch from 42f14ae to ee5cb29 Compare May 13, 2025 10:14
@dylandreimerink dylandreimerink changed the title bpf/complexity-tests: Add active connection tracking to complexity tests bpf/lib/lb.h: Fix active connection tracking + IPv6 May 13, 2025
@dylandreimerink dylandreimerink added needs-backport/1.16 This PR / issue needs backporting to the v1.16 branch needs-backport/1.17 This PR / issue needs backporting to the v1.17 branch and removed dont-merge/preview-only Only for preview or testing, don't merge it. labels May 13, 2025
@dylandreimerink dylandreimerink marked this pull request as ready for review May 13, 2025 10:28
@dylandreimerink dylandreimerink requested a review from a team as a code owner May 13, 2025 10:28
@dylandreimerink
Copy link
Member Author

/test

@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 May 14, 2025
@dylandreimerink dylandreimerink added this pull request to the merge queue May 14, 2025
Merged via the queue into main with commit 7c27078 May 14, 2025
416 of 444 checks passed
@dylandreimerink dylandreimerink deleted the pr/dylandreimerink/fix-active-connection-tracking branch May 14, 2025 17:23
@nbusseneau nbusseneau mentioned this pull request May 15, 2025
5 tasks
@nbusseneau nbusseneau added backport-pending/1.16 The backport for Cilium 1.16.x for this PR is in progress. and removed needs-backport/1.16 This PR / issue needs backporting to the v1.16 branch labels May 15, 2025
@nbusseneau nbusseneau mentioned this pull request May 15, 2025
9 tasks
@nbusseneau nbusseneau added backport-pending/1.17 The backport for Cilium 1.17.x for this PR is in progress. and removed needs-backport/1.17 This PR / issue needs backporting to the v1.17 branch labels May 15, 2025
@github-actions github-actions bot removed the backport-pending/1.16 The backport for Cilium 1.16.x for this PR is in progress. label May 19, 2025
@github-actions github-actions bot added backport-done/1.16 The backport for Cilium 1.16.x for this PR is done. backport-done/1.17 The backport for Cilium 1.17.x for this PR is done. and removed backport-pending/1.17 The backport for Cilium 1.17.x for this PR is in progress. labels May 19, 2025
@@ -42,3 +42,4 @@
-DENABLE_EGRESS_GATEWAY=1
-DSERVICE_NO_BACKEND_RESPONSE=1
-DTRACE_NOTIFY=1
-DENABLE_ACTIVE_CONNECTION_TRACKING=1
Copy link
Member

Choose a reason for hiding this comment

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

During some other work I discovered that the whole active connection
tracking feature does not compile when enabled. Adding to the complexity
tests to add some compile coverage as regression test.

Note complexity tests are different from compile tests. Compile tests are contained in bpf/Makefile, rather cheap, and covering various arbitrary combinations of options. These are complexity tests are should attempt to maximize complexity. Hence, this macro should also be added to bpf/Makefile and it should probably be in every single complexity test file given it seems likely to only increase complexity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-done/1.16 The backport for Cilium 1.16.x for this PR is done. backport-done/1.17 The backport for Cilium 1.17.x for this PR is done. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/bug This PR fixes an issue in a previous release of Cilium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants