srv6: add per-nexthop encap source address#642
Open
rjarry wants to merge 7 commits into
Open
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (14)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (10)
📝 WalkthroughWalkthroughAdds optional per-nexthop SRv6 encapsulation source handling across public and private nexthop data, CLI parsing and display, control-plane conversion, datapath header construction, and FRR route installation. Updates FRR version options, packages, and CI coverage. Adds smoke tests that configure explicit encapsulation sources and verify captured outer IPv6 source addresses. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Update the FRR 10.5 wrap file to the latest bugfix release. Signed-off-by: Robin Jarry <rjarry@redhat.com>
Add a wrap file for FRR 10.7.0-rc1 and add it to the meson build options and CI test matrix. Signed-off-by: Robin Jarry <rjarry@redhat.com>
FRR 10.6 has been stable for a few months now. Make it the default build target instead of 10.5. Signed-off-by: Robin Jarry <rjarry@redhat.com>
Allow SRv6 output nexthops to carry an explicit encapsulation source address. When set, the datapath uses it directly as the outer IPv6 source instead of the global tunnel source or the interface preferred address. An internal SR_ENCAP_F_SRC flag avoids a 16-byte address comparison in the datapath hot path. Signed-off-by: Robin Jarry <rjarry@redhat.com>
FRR 10.8 added a per-nexthop encap source address to nexthop_add_srv6_seg6(). Forward the encap_src field from grout SRv6 output nexthops to FRR, and copy it back when importing nexthops from FRR. Signed-off-by: Robin Jarry <rjarry@redhat.com>
Add a test case that creates an SRv6 output nexthop with an explicit source address and verifies the encapsulated packets use it as the outer IPv6 source with tcpdump. Signed-off-by: Robin Jarry <rjarry@redhat.com>
Test that FRR 10.8 per-nexthop encap source addresses are synced through the dplane plugin. The test configures an SRv6 route with encap-source in FRR and verifies grout encapsulates packets with the correct outer IPv6 source address. Requires FRR >= 10.8, skipped on older versions. Signed-off-by: Robin Jarry <rjarry@redhat.com>
rjarry
force-pushed
the
srv6-nh-encap-src
branch
from
July 11, 2026 16:04
e2e1fc7 to
c903ada
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
FRR 10.8 added a per-nexthop encapsulation source address to nexthop_add_srv6_seg6(). This series adds per-nexthop encap_src support to grout's SRv6 output nexthops and plumbs it through the FRR dplane plugin.
When an SRv6 output nexthop has an explicit encap_src set, the datapath uses it directly as the outer IPv6 source instead of the global tunnel source or the interface preferred address. An internal flags field avoids a 16-byte comparison in the hot path.
The series also updates FRR build support: bumps 10.5 to 10.5.4, adds 10.7 (rc1), and changes the default build version to 10.6.
Summary
encap-srcsupport end-to-end (CLI → control plane API structs → FRR dplane plugin → datapath encapsulation).encap_srcas the outer IPv6 header source; whenencap_srcis unspecified, fall back to the configured tunnel source / interface preferred address.encap_srcfield plusSR_ENCAP_F_SRCpresence flag, and insrv6_output_process()use the flaggedencap_srcdirectly to avoid doing a 16-byte IPv6 comparison in the datapath hot path.encap_src, settingSR_ENCAP_F_SRConly when it’s not the unspecified IPv6 address.rte_ipv6_addr_is_unspec()helper inapi/gr_net_compat.hto detect unspecified IPv6 addresses by checking all 16 bytes.SRCparameter and to showENCAP_SRConly whenencap_srcis not unspecified.encap_srctonexthop_add_srv6_seg6()for FRR>= 10.8.0, and populate the plugin-sideencap_srcfrom the FRR seglist source when buildingGR_NH_T_SR6_OUTPUT.GR_API_VERSIONfrom3to4.encap-sourcebehavior:smoke/srv6_test.shandsmoke/srv6_encapsrc_frr_test.sh(skips when installed FRR <10.8.0).frr_versionto10.6, add10.7(rc1) support, bump10.5wrap to10.5.4, and adjust CI build matrix to use10.7for thegcc-14aarch64 configuration.