-
Notifications
You must be signed in to change notification settings - Fork 23
Srv6 improvements and fixes #237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
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
Simplify the SRv6 smoke test by removing unused IP(6) addresses: - fd00:101::*/192.168.62.* are not involved in SRv6 forwarding - client uses only IPv4, public netns only needs 192.168.60.1 Keeps the test minimal and focused. Signed-off-by: Maxime Leroy <[email protected]>
Align the SRv6 test with other smoke tests by using a loop to create namespaces, move interfaces into these ones and bring them up. Signed-off-by: Maxime Leroy <[email protected]>
0a0c1a2 to
0d08260
Compare
rjarry
requested changes
Jun 17, 2025
0d08260 to
e5df42d
Compare
rjarry
requested changes
Jun 17, 2025
7706aad to
9ad6445
Compare
Avoid using uninitialized ext_len if the call fails. Fixes: 7d88a14 ("srv6: add srv6 module") Signed-off-by: Maxime Leroy <[email protected]>
Add static decap_outer() that pulls the outer IPv6 header plus every extension header and, when the IPv6 header hasn’t yet been removed (ext_len != 0). Drop the duplicate loops from decap/encap paths. Signed-off-by: Maxime Leroy <[email protected]>
Add ip6_input_register_nexthop_type method same that ip6_output_register_nexthop_type but for input. Signed-off-by: Maxime Leroy <[email protected]>
ip6_input_local_add_proto() used to redirect EVERY packet whose
Next-Header was 4 (IPv4-in-IPv6), 41 (IPv6-in-IPv6) or 43 (Routing) to
the SRv6 node. That broke ordinary IPv6 tunnels, which is not supported
today by grout.
Introduce GR_NH_SR6_LOCAL nexthop:
- ip6_input sends a packet to the SRv6 local node *only* when the
FIB lookup returns this nexthop type.
- Drop the three protocol hooks and delete the now-redundant
sr6_local_srh node.
- Update control plane to set GR_NH_SR6_LOCAL on srv6 nexthop.
Signed-off-by: Maxime Leroy <[email protected]>
Move the Segment Routing (SR) header and IPv6 header pointers into the ip6_info structure. By embedding these pointers in ip6_info, the code becomes cleaner and more consistent. Signed-off-by: Maxime Leroy <[email protected]>
9ad6445 to
561d357
Compare
Add an union field allowing modules to store private addresses attached to nexthop objects. This will be used for srv6 local. Signed-off-by: Maxime Leroy <[email protected]> Signed-off-by: Robin Jarry <[email protected]>
Store `struct srv6_localsid_data` in `nh->priv` instead of a separate rte_hash. Control-plane code now fills the structure at add-time, and the datapath fetches it directly from the nexthop, removing one hash lookup per packet. Signed-off-by: Maxime Leroy <[email protected]>
RFC 8986 defines three SRv6 flavours that decide how much of the outer header stack is removed: - PSP Penultimate Segment Pop -> penultimate node removes the SRH only - USP Ultimate Segment Pop -> last node removes the SRH only - USD Ultimate Segment Decap -> last node removes SRH and outer IPv6 The old code treated USP like USD: decap_outer() always stripped the outer IPv6 before rebuilding a fresh header, violating the USP rule. The following changes has been made: - decap_srv6(): removes only the SRH. - process_behav_end(): calls decap_srv6() for PSP (SL=1) and USP (SL=0). - End.DT* and USD paths remain in process_behav_decap(). Fixes: 7d88a14 ("srv6: add srv6 module") Signed-off-by: Maxime Leroy <[email protected]>
This patch introduces a pointer in the ip6_info structure (p_proto) to track the location of the next_header field that points to the SRH. This allows correctly updating the field regardless of whether it resides in the base header or in an intermediate extension header (e.g., Destination Options). Fixes: 7d88a14 ("srv6: add srv6 module") Signed-off-by: Maxime Leroy <[email protected]>
Use dest4.prefixlen instead of dest6.prefixlen when showing IPv4 entries. Fixes: 7d88a14 ("srv6: add srv6 module") Signed-off-by: Maxime Leroy <[email protected]>
This api is not used by cli. Let's removed this dead code. Signed-off-by: Maxime Leroy <[email protected]>
SRv6 policy (e.g. color-based selection) is a control-plane concept per RFC 9256. It should not be implemented in the dataplane, which only executes the selected SID list and behavior. If needed, color-to-policy resolution should be handled by FRR or another control plane component. ECMP across multiple SRv6 paths should be implemented generically at the nexthop level, not as SRv6-specific logic. To do that, sr policy and steer are merged together to sr route. Signed-off-by: Maxime Leroy <[email protected]>
561d357 to
7bea174
Compare
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.
Simplified code, and fixes some issues