-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
bgpd, zebra: Add support for SRv6 uSID Behaviors #12219
Merged
ton31337
merged 10 commits into
FRRouting:master
from
cscarpitta:feature/srv6-usid-behavior-support
Nov 14, 2022
+686
−3
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
9b7491e
lib: Add support for flags to the SRv6 locator
cscarpitta 02b1544
lib: Add `SRV6_LOCATOR_USID` flag to SRv6 locator
cscarpitta d537287
lib,zebra: Send SRv6 locator flags over the ZAPI
cscarpitta 0494782
lib: Add support for SRv6 Behavior codepoints
cscarpitta 05d9998
bgpd: Use SRv6 codepoints in the BGP Advertisement
cscarpitta a3ff3df
lib,zebra: Add SRv6 uSID info to VTY output
cscarpitta 7e97542
zebra: Add helpers to notify locator add/delete
cscarpitta 3a7e1f6
zebra: Add `behavior usid` command to VTY
cscarpitta c891f9c
tests: Add topotest for SRv6 uSID Locator
cscarpitta 439d4c9
doc: Add documentation for behavior usid command
cscarpitta File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Empty file.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[] |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[ | ||
{ | ||
"name": "loc1", | ||
"chunks": [ | ||
"fc00:0:1::/48" | ||
] | ||
} | ||
] |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[] |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[] |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[ | ||
] |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[ | ||
] |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[ | ||
] |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[ | ||
] |
20 changes: 20 additions & 0 deletions
20
tests/topotests/srv6_locator_usid/expected_locators_1.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"locators":[ | ||
{ | ||
"name": "loc1", | ||
"prefix": "fc00:0:1::/48", | ||
"blockBitsLength": 32, | ||
"nodeBitsLength": 16, | ||
"functionBitsLength": 16, | ||
"argumentBitsLength": 0, | ||
"behavior": "usid", | ||
"statusUp": true, | ||
"chunks": [ | ||
{ | ||
"prefix": "fc00:0:1::/48", | ||
"proto": "system" | ||
} | ||
] | ||
} | ||
] | ||
} |
20 changes: 20 additions & 0 deletions
20
tests/topotests/srv6_locator_usid/expected_locators_2.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"locators":[ | ||
{ | ||
"name": "loc1", | ||
"prefix": "fc00:0:1::/48", | ||
"blockBitsLength": 32, | ||
"nodeBitsLength": 16, | ||
"functionBitsLength": 16, | ||
"argumentBitsLength": 0, | ||
"behavior": "usid", | ||
"statusUp": true, | ||
"chunks": [ | ||
{ | ||
"prefix": "fc00:0:1::/48", | ||
"proto": "sharp" | ||
} | ||
] | ||
} | ||
] | ||
} |
20 changes: 20 additions & 0 deletions
20
tests/topotests/srv6_locator_usid/expected_locators_3.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"locators":[ | ||
{ | ||
"name": "loc1", | ||
"prefix": "fc00:0:1::/48", | ||
"blockBitsLength": 32, | ||
"nodeBitsLength": 16, | ||
"functionBitsLength": 16, | ||
"argumentBitsLength": 0, | ||
"behavior": "usid", | ||
"statusUp": true, | ||
"chunks": [ | ||
{ | ||
"prefix": "fc00:0:1::/48", | ||
"proto": "system" | ||
} | ||
] | ||
} | ||
] | ||
} |
35 changes: 35 additions & 0 deletions
35
tests/topotests/srv6_locator_usid/expected_locators_4.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"locators":[ | ||
{ | ||
"name": "loc1", | ||
"prefix": "fc00:0:1::/48", | ||
"blockBitsLength": 32, | ||
"nodeBitsLength": 16, | ||
"functionBitsLength": 16, | ||
"argumentBitsLength": 0, | ||
"behavior": "usid", | ||
"statusUp": true, | ||
"chunks": [ | ||
{ | ||
"prefix": "fc00:0:1::/48", | ||
"proto": "system" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "loc2", | ||
"prefix": "fc00:0:2::/48", | ||
"blockBitsLength": 32, | ||
"nodeBitsLength": 16, | ||
"functionBitsLength": 16, | ||
"argumentBitsLength": 0, | ||
"statusUp": true, | ||
"chunks": [ | ||
{ | ||
"prefix": "fc00:0:2::/48", | ||
"proto": "system" | ||
} | ||
] | ||
} | ||
] | ||
} |
36 changes: 36 additions & 0 deletions
36
tests/topotests/srv6_locator_usid/expected_locators_5.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
"locators":[ | ||
{ | ||
"name": "loc1", | ||
"prefix": "fc00:0:1::/48", | ||
"blockBitsLength": 32, | ||
"nodeBitsLength": 16, | ||
"functionBitsLength": 16, | ||
"argumentBitsLength": 0, | ||
"behavior": "usid", | ||
"statusUp": true, | ||
"chunks": [ | ||
{ | ||
"prefix": "fc00:0:1::/48", | ||
"proto": "system" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "loc2", | ||
"prefix": "fc00:0:2::/48", | ||
"blockBitsLength": 32, | ||
"nodeBitsLength": 16, | ||
"functionBitsLength": 16, | ||
"argumentBitsLength": 0, | ||
"behavior": "usid", | ||
"statusUp": true, | ||
"chunks": [ | ||
{ | ||
"prefix": "fc00:0:2::/48", | ||
"proto": "system" | ||
} | ||
] | ||
} | ||
] | ||
} |
35 changes: 35 additions & 0 deletions
35
tests/topotests/srv6_locator_usid/expected_locators_6.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"locators":[ | ||
{ | ||
"name": "loc1", | ||
"prefix": "fc00:0:1::/48", | ||
"blockBitsLength": 32, | ||
"nodeBitsLength": 16, | ||
"functionBitsLength": 16, | ||
"argumentBitsLength": 0, | ||
"behavior": "usid", | ||
"statusUp": true, | ||
"chunks": [ | ||
{ | ||
"prefix": "fc00:0:1::/48", | ||
"proto": "system" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "loc2", | ||
"prefix": "fc00:0:2::/48", | ||
"blockBitsLength": 32, | ||
"nodeBitsLength": 16, | ||
"functionBitsLength": 16, | ||
"argumentBitsLength": 0, | ||
"statusUp": true, | ||
"chunks": [ | ||
{ | ||
"prefix": "fc00:0:2::/48", | ||
"proto": "system" | ||
} | ||
] | ||
} | ||
] | ||
} |
19 changes: 19 additions & 0 deletions
19
tests/topotests/srv6_locator_usid/expected_locators_7.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"locators":[ | ||
{ | ||
"name": "loc2", | ||
"prefix": "fc00:0:2::/48", | ||
"statusUp": true, | ||
"blockBitsLength": 32, | ||
"nodeBitsLength": 16, | ||
"functionBitsLength": 16, | ||
"argumentBitsLength": 0, | ||
"chunks":[ | ||
{ | ||
"prefix": "fc00:0:2::/48", | ||
"proto": "system" | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"locators":[ | ||
] | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
ip link add dummy0 type dummy | ||
ip link set dummy0 up |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
hostname r1 | ||
! | ||
log stdout notifications | ||
log monitor notifications | ||
log commands | ||
log file sharpd.log debugging | ||
! |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest telling explicitly for the operator what is the behavior used, instead of just
usid
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here the behavior defines the type of the locator which is
usid
. Based on the type of the locator, the other processes (e.g., bgpd) will use the proper behavior (e.g., uDT4 for L3VPNv4) and use the corresponding IANA codepoint.