Skip to content

srv6: add per-nexthop encap source address#642

Merged
maxime-leroy merged 4 commits into
DPDK:mainfrom
rjarry:srv6-nh-encap-src
Jul 20, 2026
Merged

srv6: add per-nexthop encap source address#642
maxime-leroy merged 4 commits into
DPDK:mainfrom
rjarry:srv6-nh-encap-src

Conversation

@rjarry

@rjarry rjarry commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

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

  • Add per-nexthop SRv6 encap-src support end-to-end (CLI → control plane API structs → FRR dplane plugin → datapath encapsulation).
  • Propagate an explicit encap_src as the outer IPv6 header source; when encap_src is unspecified, fall back to the configured tunnel source / interface preferred address.
  • Extend SRv6 nexthop output state with an encap_src field plus SR_ENCAP_F_SRC presence flag, and in srv6_output_process() use the flagged encap_src directly to avoid doing a 16-byte IPv6 comparison in the datapath hot path.
  • Update SRv6 nexthop equality/import/export logic to include encap_src, setting SR_ENCAP_F_SRC only when it’s not the unspecified IPv6 address.
  • Add rte_ipv6_addr_is_unspec() helper in api/gr_net_compat.h to detect unspecified IPv6 addresses by checking all 16 bytes.
  • Update CLI parsing and display for SRv6 nexthops/seglists to accept an optional SRC parameter and to show ENCAP_SRC only when encap_src is not unspecified.
  • Extend FRR dplane SRv6 SR output nexthop handling to propagate encap_src to nexthop_add_srv6_seg6() for FRR >= 10.8.0, and populate the plugin-side encap_src from the FRR seglist source when building GR_NH_T_SR6_OUTPUT.
  • Bump API handshake version GR_API_VERSION from 3 to 4.
  • Add smoke tests validating per-nexthop encap-source behavior: smoke/srv6_test.sh and smoke/srv6_encapsrc_frr_test.sh (skips when installed FRR < 10.8.0).
  • Update FRR build/compat support: default frr_version to 10.6, add 10.7 (rc1) support, bump 10.5 wrap to 10.5.4, and adjust CI build matrix to use 10.7 for the gcc-14 aarch64 configuration.

@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@grout-bot, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 54 seconds

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 5dbb6dc9-d830-4102-bfa5-9aa54bf50978

📥 Commits

Reviewing files that changed from the base of the PR and between c903ada and fda8215.

📒 Files selected for processing (11)
  • api/gr_api.h
  • api/gr_net_compat.h
  • frr/rt_grout.c
  • modules/srv6/api/gr_srv6.h
  • modules/srv6/cli/route.c
  • modules/srv6/control/route.c
  • modules/srv6/control/srv6.h
  • modules/srv6/datapath/srv6_output.c
  • smoke/_init_frr.sh
  • smoke/srv6_encapsrc_frr_test.sh
  • smoke/srv6_test.sh
📝 Walkthrough

Walkthrough

Adds 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@rjarry
rjarry force-pushed the srv6-nh-encap-src branch from e2e1fc7 to c903ada Compare July 11, 2026 16:04
@rjarry rjarry mentioned this pull request Jul 20, 2026
@rjarry
rjarry force-pushed the srv6-nh-encap-src branch from c903ada to 7cb7cff Compare July 20, 2026 10:36
Comment thread smoke/srv6_encapsrc_frr_test.sh Outdated
@rjarry
rjarry force-pushed the srv6-nh-encap-src branch from 7cb7cff to def05f4 Compare July 20, 2026 14:27
rjarry added 4 commits July 20, 2026 14:56
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>
Reviewed-by: Maxime Leroy <maxime@leroys.fr>
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>
Reviewed-by: Maxime Leroy <maxime@leroys.fr>
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>
Reviewed-by: Maxime Leroy <maxime@leroys.fr>
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>
Reviewed-by: Maxime Leroy <maxime@leroys.fr>
@grout-bot
grout-bot force-pushed the srv6-nh-encap-src branch from def05f4 to fda8215 Compare July 20, 2026 14:56
@maxime-leroy
maxime-leroy merged commit 2c5da07 into DPDK:main Jul 20, 2026
5 checks passed
@rjarry
rjarry deleted the srv6-nh-encap-src branch July 21, 2026 07:22
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.

2 participants