Skip to content

Conversation

@enhaut
Copy link
Member

@enhaut enhaut commented May 17, 2025

Description

This MR includes:

  • forwarding recipes for measuring overall forwarding performance
    • for regular kernel path
    • for xdp-forward which utilizes XDP_REDIRECT
  • InterfaceStatsMonitor which samples netlink stats of specified interface. However, these might be affected by driver's implementation details. E.g. mlx5 does not update standard statistics when XDP program is loaded.

For forwarding recipes, test environment is separated to generator namespace (default), forwarder ns (which is default NS of forwarding machine) and receiver ns (on generator machine). There is no direct route from generator ns to reciever ns, test adds static route from generator to receiver via forwarder.

Test scheme:
test case drawio
Scheme is bit outdated as I rebased & reused SimpleNetnsRouterRecipe from #410 . The difference is, that this recipe requires 2 physical NICs on each host, and "receiver ns" is at host1 not on host 2 as in SimpleNetnsRouterRecipe. host2 is used as a forwarder/router only.

Tests

ForwardingRecipe and XDPForwardingRecipe tested in J:12021989

This requires reworked pkgten from #400

@enhaut enhaut marked this pull request as draft May 17, 2025 13:58
@enhaut
Copy link
Member Author

enhaut commented May 17, 2025

Marking as a draft, it requires changes from #400 to be merged first

@enhaut enhaut force-pushed the xdp_forward branch 2 times, most recently from 3ce0e47 to 7c708be Compare September 1, 2025 07:58
@enhaut enhaut force-pushed the xdp_forward branch 2 times, most recently from de247d2 to 0610259 Compare November 9, 2025 16:03
@enhaut enhaut marked this pull request as ready for review November 9, 2025 16:05
@enhaut enhaut force-pushed the xdp_forward branch 2 times, most recently from 6b9e20c to 0e0102a Compare November 9, 2025 22:24
Implemented `InterfaceStatsMonitor` that periodically
samples specified stats (by `stats` parameter) and
saves them to `._res_data`.
@enhaut enhaut requested a review from olichtne November 12, 2025 07:29
@enhaut enhaut force-pushed the xdp_forward branch 3 times, most recently from 6c38868 to 730bad2 Compare November 26, 2025 09:47
@jtluka
Copy link
Collaborator

jtluka commented Nov 26, 2025

Code wise looks ok.

@jtluka
Copy link
Collaborator

jtluka commented Nov 26, 2025

From the Beaker job.

The test wide description contains duplicated IPs:

    Testwide configuration for recipe ForwardingRecipe description:
    Configured host1.ens2f0np0.ips = [Ip4Address(192.168.229.1/24), Ip6Address(fe80::a288:c2ff:fec3:47ce/64), Ip6Address(fd00:0:b129::1/64)]
    Configured host2.ens2f0np0.ips = [Ip4Address(192.168.229.2/24), Ip6Address(fd00:0:b129::2/64), Ip6Address(fe80::a288:c2ff:fec3:46be/64)]
    Configured host2.ens2f1np1.ips = [Ip4Address(192.168.102.1/24), Ip6Address(fc00:1::1/64), Ip6Address(fe80::a288:c2ff:fec3:46bf/64)]
    Configured host1.ens2f1np1.ips = [Ip4Address(192.168.102.2/24), Ip6Address(fc00:1::2/64)]
    Configured host1.ens2f0np0.ips = [Ip4Address(192.168.229.1/24), Ip6Address(fe80::a288:c2ff:fec3:47ce/64), Ip6Address(fd00:0:b129::1/64)]
    Configured host2.ens2f0np0.ips = [Ip4Address(192.168.229.2/24), Ip6Address(fd00:0:b129::2/64), Ip6Address(fe80::a288:c2ff:fec3:46be/64)]
    Configured host2.ens2f1np1.ips = [Ip4Address(192.168.102.1/24), Ip6Address(fc00:1::1/64), Ip6Address(fe80::a288:c2ff:fec3:46bf/64)]
    Configured host1.ens2f1np1.ips = [Ip4Address(192.168.102.2/24), Ip6Address(fc00:1::2/64)]

@enhaut enhaut force-pushed the xdp_forward branch 4 times, most recently from a23626f to b263b3b Compare December 1, 2025 09:03
@enhaut
Copy link
Member Author

enhaut commented Dec 1, 2025

The test wide description contains duplicated IPs:

Thanks, @jtluka , fixed.

Tests for latest version in J:12009513

@enhaut enhaut requested a review from olichtne December 1, 2025 09:10
Added ForwardingRecipe that measures performance
of whole forwarding stack. This can be extended in
a way it'll test specific devices/other forwarding
planes.
This is just forwarding test but instead of utilizing
kernel forwarding plane, it uses `xdp-forward` instead.
Previous version haven't removed static routes to `netns`
network (set in `test_wide_configuration`) on generator
machine.
Using "aliases" for used NICs so they can be overriden
in child recipes when inheriting from `SimpleNetnsRouterRecipe`.
Forwarding recipes requires 2 hosts with 2 NICs each which
is currently unsupported by ContainerMapper
Copy link
Collaborator

@olichtne olichtne left a comment

Choose a reason for hiding this comment

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

just some final discussion comments, on monday we can have a final discussion and merge this in IMO

@olichtne olichtne merged commit b818c30 into LNST-project:master Dec 8, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants