Skip to content
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

srv6: T6984: add locator format configuration #4263

Merged
merged 1 commit into from
Jan 2, 2025

Conversation

jvoss
Copy link
Contributor

@jvoss jvoss commented Dec 28, 2024

Change Summary

Add the format configuration option to segment-routing SRv6 locators

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes)
  • Migration from an old Vyatta component to vyos-1x, please link to related PR inside obsoleted component
  • Other (please describe):

Related Task(s)

Related PR(s)

Component(s) name

segment-routing, srv6

Proposed changes

Add a new configuration option to specify the format of the SRv6 locator. This option in FRR is useful when using uSIDs with 32-bit block and 16-bit node (3216) allocations.

VyOS configuration example:

protocols {
  segment-routing {
    srv6 {
       locator MAIN {
           behavior-usid
           block-len 32
           format usid-f3216      <<< new option
           func-bits 16
           node-len 16
           prefix fdff:0:1::/48
       }
    }
  }
}

Resulting FRR configuration:

!
segment-routing
 srv6
  locators
   locator MAIN
    prefix fdff:0:1::/48 block-len 32 node-len 16 func-bits 16
    behavior usid
    format usid-f3216
    exit
    !
  exit
  !
exit
!

How to test

  1. Apply the configuration example shown above
  2. Verify the rendered configuration (/run/frr/config/vyos.frr.conf) includes the format option as shown in the FRR configuration above
  3. Verify the FRR running configuration contains the same format option (vtysh -c "show run")

Smoketest result

vyos@vyos:~$ /usr/libexec/vyos/tests/smoke/cli/test_protocols_segment-routing.py
test_srv6 (__main__.TestProtocolsSegmentRouting.test_srv6) ... ok
test_srv6_sysctl (__main__.TestProtocolsSegmentRouting.test_srv6_sysctl) ... ok

----------------------------------------------------------------------
Ran 2 tests in 44.963s

OK

Checklist:

  • I have read the CONTRIBUTING document
  • I have linked this PR to one or more Phabricator Task(s)
  • I have run the components SMOKETESTS if applicable
  • My commit headlines contain a valid Task id
  • My change requires a change to the documentation
  • I have updated the documentation accordingly

Copy link

github-actions bot commented Dec 28, 2024

👍
No issues in PR Title / Commit Title

Copy link
Member

@dmbaturin dmbaturin left a comment

Choose a reason for hiding this comment

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

Looks good but I'd remove some superfluous words from help strings.

interface-definitions/protocols_segment-routing.xml.in Outdated Show resolved Hide resolved
interface-definitions/protocols_segment-routing.xml.in Outdated Show resolved Hide resolved
interface-definitions/protocols_segment-routing.xml.in Outdated Show resolved Hide resolved
@jvoss
Copy link
Contributor Author

jvoss commented Dec 28, 2024

Looks good but I'd remove some superfluous words from help strings.

No problem. They were verbatim copies from the help strings in FRR.

fyi - manually squashed these suggestions into a single commit since GitHub did not let me batch them.

@jvoss jvoss force-pushed the srv6_locator_format branch from da47de0 to 4cc9631 Compare December 28, 2024 20:12
@jvoss jvoss requested a review from dmbaturin December 28, 2024 20:14
Copy link
Member

@c-po c-po left a comment

Choose a reason for hiding this comment

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

Can you please extend the smoketests to aso cover the format CLI option?

@jvoss jvoss force-pushed the srv6_locator_format branch from 4cc9631 to dd67ce6 Compare December 29, 2024 15:21
@jvoss
Copy link
Contributor Author

jvoss commented Dec 29, 2024

Can you please extend the smoketests to aso cover the format CLI option?

Done (see updated PR summary for smoketest results).
Note that ruff required additional changes tosmoketest/scripts/cli/test_protocols_segment-routing.py

@jvoss jvoss requested a review from c-po December 29, 2024 15:23
@jvoss jvoss force-pushed the srv6_locator_format branch from dd67ce6 to 60d7f44 Compare December 29, 2024 15:34
@jvoss jvoss force-pushed the srv6_locator_format branch from 60d7f44 to be3aa25 Compare December 30, 2024 13:52
@jvoss jvoss requested a review from c-po December 30, 2024 13:53
@jvoss jvoss force-pushed the srv6_locator_format branch from be3aa25 to a8c1de5 Compare December 30, 2024 21:39
@jvoss
Copy link
Contributor Author

jvoss commented Dec 30, 2024

FYI - rebased on current (ec80c75) to resolve merge conflict.

@jvoss jvoss force-pushed the srv6_locator_format branch from a8c1de5 to d451c17 Compare December 30, 2024 23:19
@jvoss jvoss force-pushed the srv6_locator_format branch from d451c17 to 252e60e Compare December 30, 2024 23:21
Copy link

CI integration ❌ failed!

Details

CI logs

  • CLI Smoketests (no interfaces) ❌ failed
  • CLI Smoketests (interfaces only) ❌ failed
  • Config tests 👍 passed
  • RAID1 tests 👍 passed
  • TPM tests 👍 passed

@dmbaturin dmbaturin merged commit a779cfd into vyos:current Jan 2, 2025
12 of 14 checks passed
@jvoss jvoss deleted the srv6_locator_format branch January 2, 2025 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

3 participants