Skip to content

ginkgo: remove Supports IPv4 Fragments#44271

Merged
julianwiedmann merged 2 commits intomainfrom
pr/smagnani96/ginkgo-3
Mar 4, 2026
Merged

ginkgo: remove Supports IPv4 Fragments#44271
julianwiedmann merged 2 commits intomainfrom
pr/smagnani96/ginkgo-3

Conversation

@smagnani96
Copy link
Copy Markdown
Contributor

Please refer to commit descriptions:

  1. add BPF unit test for n/s loadbalancing of fragments
  2. remove the related Ginkgo test

Related: #44168.

@smagnani96 smagnani96 self-assigned this Feb 9, 2026
@smagnani96 smagnani96 added kind/enhancement This would improve or streamline existing functionality. area/CI Continuous Integration testing issue or flake release-note/ci This PR makes changes to the CI. labels Feb 9, 2026
@smagnani96
Copy link
Copy Markdown
Contributor Author

/test

@smagnani96 smagnani96 force-pushed the pr/smagnani96/ginkgo-3 branch from e07c601 to a1751ee Compare February 10, 2026 19:31
@smagnani96 smagnani96 changed the base branch from main to pr/smagnani96/ginkgo-2 February 10, 2026 19:31
@smagnani96 smagnani96 force-pushed the pr/smagnani96/ginkgo-2 branch from b474c2b to 4ea0b13 Compare February 11, 2026 14:28
@smagnani96 smagnani96 force-pushed the pr/smagnani96/ginkgo-3 branch from a1751ee to a5d426d Compare February 11, 2026 14:30
@smagnani96 smagnani96 force-pushed the pr/smagnani96/ginkgo-2 branch 2 times, most recently from 8074fb5 to 545cee4 Compare February 11, 2026 22:40
@smagnani96 smagnani96 force-pushed the pr/smagnani96/ginkgo-3 branch from a5d426d to 015f846 Compare February 11, 2026 22:43
@smagnani96 smagnani96 force-pushed the pr/smagnani96/ginkgo-2 branch 2 times, most recently from 0eefe2c to 7b9a43d Compare February 16, 2026 18:06
@smagnani96 smagnani96 force-pushed the pr/smagnani96/ginkgo-3 branch from 015f846 to 10b93c5 Compare February 16, 2026 19:49
@smagnani96 smagnani96 force-pushed the pr/smagnani96/ginkgo-2 branch 4 times, most recently from ece09b6 to f79c43f Compare February 19, 2026 18:58
Base automatically changed from pr/smagnani96/ginkgo-2 to main February 20, 2026 12:42
This commit adds a BPF unit test for loadbalancing of fragmented packets
destined to a NodePort service.
This aims at replacing the Ginkgo "Supports IPv4 Fragments" test.

For IPv4, we declare the two fragments as follows:

1. Ether(14) + IP(20) + TCP(20) + Raw(1) = 55B
2. Ether(14) + IP(20) + Raw(1)           = 35B.

For IPv6:

1. Eth(14) + IPv6(40) + IPv6ExtHeader (8B) + TCP(20) + Raw(1) = 83B
2. Eth(14) + IPv6(40) + IPv6ExtHeader (8B) + Raw(1)           = 63B

The last fragment can contain a non-divisible-by-8 offset, given it will
not have the MF flag set, and it is handled correctly. If we were testing
3 fragments, the 2nd fragment would have the MF flag set and an offset of 8B,
so in that case we would need to adjust the payload.

The BPF tests are executed sequentially, therefore we don't need to manually
replicate the setup for each test, nor simulate the 1st fragment reception
during the test of the 2nd fragment. If the 1st test passed, we expect the
underlying datapath structures to be correctly populated (ip frags,
conntrack, etc.). The test ensure that both the 1st and 2nd fragments are
correctly handled, bpf metrics are updated as expected, and that the
conntrack map accounts for both the two fragments while computing statistics.

Signed-off-by: Simone Magnani <simone.magnani@isovalent.com>
Given the previous commits, we no longer need the `Supports IPv4 Fragments`
Ginkgo test. The N/S loadbalancing of fragments is now tested as a
BPF unit test.

Signed-off-by: Simone Magnani <simone.magnani@isovalent.com>
@smagnani96 smagnani96 force-pushed the pr/smagnani96/ginkgo-3 branch from a6ce19f to 74e82a6 Compare February 20, 2026 16:27
@smagnani96
Copy link
Copy Markdown
Contributor Author

/test

@smagnani96 smagnani96 marked this pull request as ready for review February 24, 2026 09:53
@smagnani96 smagnani96 requested review from a team as code owners February 24, 2026 09:53
@smagnani96 smagnani96 requested review from brlbil and nebril February 24, 2026 09:53
@julianwiedmann julianwiedmann self-requested a review February 25, 2026 15:12
Copy link
Copy Markdown
Member

@julianwiedmann julianwiedmann left a comment

Choose a reason for hiding this comment

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

Thank you!

To note - while we're now adding tests for the from-netdev N/S path, I believe the ginkgo tests that we are replacing here were testing the E/W path (ie the logic in bpf_sock and bpf_lxc). That's why they have all this consideration for whether SocketLB or kube-proxy are enabled.

So I think we should have a follow-up issue to add similar tests for the per-packet LB in bpf_lxc. Not sure whether we can easily test the kube-proxy parts ...

@julianwiedmann julianwiedmann added this pull request to the merge queue Mar 4, 2026
Merged via the queue into main with commit 378c4a2 Mar 4, 2026
355 checks passed
@julianwiedmann julianwiedmann deleted the pr/smagnani96/ginkgo-3 branch March 4, 2026 10:12
smagnani96 added a commit that referenced this pull request Mar 30, 2026
These tests were introduced in #44271,
where we migrated the Ginkgo test into BPF unit test.
However, as noted in the PR comments, the Ginkgo tests were mainly testing
the East/West scenario rather than the North/South.

This commits renames then the introduced tests to north/south, and refactors
a bit their infra to accommodate for east/west tests introduced in the
follow-up commit.

Signed-off-by: Simone Magnani <simone.magnani@isovalent.com>
@smagnani96 smagnani96 added the ci/hyperjump Relates to 2022 test improvement initiative. label Mar 30, 2026
@smagnani96
Copy link
Copy Markdown
Contributor Author

So I think we should have a follow-up issue to add similar tests for the per-packet LB in bpf_lxc. Not sure whether we can easily test the kube-proxy parts ...

Follow-up PR to tackle this #45055. Thanks Julian for the note 🙏🏼

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/CI Continuous Integration testing issue or flake ci/hyperjump Relates to 2022 test improvement initiative. kind/enhancement This would improve or streamline existing functionality. release-note/ci This PR makes changes to the CI.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants