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

bgpd, zebra: Add support for SRv6 uSID Behaviors #12219

Merged

Commits on Oct 28, 2022

  1. lib: Add support for flags to the SRv6 locator

    In this commit, we introduce the ability to specify flags for an SRv6
    locator. Flags can be used to specify the properties of the locator.
    
    Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
    cscarpitta committed Oct 28, 2022
    Configuration menu
    Copy the full SHA
    9b7491e View commit details
    Browse the repository at this point in the history

Commits on Oct 29, 2022

  1. lib: Add SRV6_LOCATOR_USID flag to SRv6 locator

    In this commit, we add support for a new flag called
    `SRV6_LOCATOR_USID`. When the `SRV6_LOCATOR_USID` flag is set, the
    routing protocols will install SRv6 behaviors with the uSID in the
    dataplane.
    
    This flag is used to specify a locator as a uSID locator. When a locator
    is specified as a uSID locator, all the SRv6 SIDs allocated from the
    locator by the routing protocols (like BGP) are bound to the SRv6 uSID
    behaviors and use the SRv6 uSID codepoints in the BGP update message.
    
    We extend the SRv6 locator implementation to add support for a `usid`
    flag. When the `usid` flag is set, the bgpd will install SRv6 behaviors
    with the uSID in the dataplane and use the proper SRv6 Endpoint Behavior
    codepoint in the BGP advertisement.
    
    Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
    cscarpitta committed Oct 29, 2022
    Configuration menu
    Copy the full SHA
    02b1544 View commit details
    Browse the repository at this point in the history
  2. lib,zebra: Send SRv6 locator flags over the ZAPI

    In this commit, we extend the ZAPI to support encoding and decoding the
    locator flags contained in the messages exchanged between zebra and the
    routing daemons.
    
    Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
    cscarpitta committed Oct 29, 2022
    Configuration menu
    Copy the full SHA
    d537287 View commit details
    Browse the repository at this point in the history

Commits on Nov 8, 2022

  1. lib: Add support for SRv6 Behavior codepoints

    In this commit, we introduce a new enumeration to encode the SRv6
    Endpoint Behaviors codepoints defined in the IANA SRv6 Endpoint
    Behaviors Registry
    (https://www.iana.org/assignments/segment-routing/segment-routing.xhtml).
    
    Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
    cscarpitta committed Nov 8, 2022
    Configuration menu
    Copy the full SHA
    0494782 View commit details
    Browse the repository at this point in the history
  2. bgpd: Use SRv6 codepoints in the BGP Advertisement

    Currently bgpd uses the opaque codepoint (0xFFFF) in the BGP
    advertisement. In this commit, we update bgpd to use the SRv6 codepoints
    defined in the IANA SRv6 Endpoint Behaviors Registry
    (https://www.iana.org/assignments/segment-routing/segment-routing.xhtml)
    
    Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
    cscarpitta committed Nov 8, 2022
    Configuration menu
    Copy the full SHA
    05d9998 View commit details
    Browse the repository at this point in the history
  3. lib,zebra: Add SRv6 uSID info to VTY output

    In this commit, we extend to print the `SRV6_LOCATOR_USID` flag.
    The output appears as follows:
    
    ```
    {
      "locators":[
        {
          "name":"loc1",
          "prefix":"fc00:0:1::/48",
          "blockBitsLength":32,
          "nodeBitsLength":16,
          "functionBitsLength":16,
          "argumentBitsLength":0,
          "uSID":true,
          "statusUp":true,
          "chunks":[
            {
              "prefix":"fc00:0:1::/48",
              "proto":"bgp"
            }
          ]
        }
      ]
    }
    ```
    
    Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
    cscarpitta committed Nov 8, 2022
    Configuration menu
    Copy the full SHA
    a3ff3df View commit details
    Browse the repository at this point in the history
  4. zebra: Add helpers to notify locator add/delete

    In this commit, we add two helper functions
    `zebra_notify_srv6_locator_add` and `zebra_notify_srv6_locator_delete`.
    These functions are used to notify locator additions/deletions to
    zclients.
    
    Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
    cscarpitta committed Nov 8, 2022
    Configuration menu
    Copy the full SHA
    7e97542 View commit details
    Browse the repository at this point in the history
  5. zebra: Add behavior usid command to VTY

    Install a new command `behavior usid` into the `SRV6_LOC_NODE` CLI node.
    
    This command allows the user to set/unset the `SRV6_LOCATOR_USID` flag
    for an SRv6 locator. The `SRV6_LOCATOR_USID` flag indicates whether a
    locator is a uSID locator or not. When the flag is set, the routing
    daemons (e.g., bgpd) will install SRv6 behaviors with the uSID in the
    dataplane.
    
    Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
    cscarpitta committed Nov 8, 2022
    Configuration menu
    Copy the full SHA
    3a7e1f6 View commit details
    Browse the repository at this point in the history
  6. tests: Add topotest for SRv6 uSID Locator

    This test ensures that the command `behavior usid` works properly.
    
    When the `behavior usid` command is set, a flag is added to the locator
    to indicate that the locator is a uSID locator. This test verifies that
    the locator works correctly when you set / unset the `behavior usid`
    command.
    
    Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
    cscarpitta committed Nov 8, 2022
    Configuration menu
    Copy the full SHA
    c891f9c View commit details
    Browse the repository at this point in the history
  7. doc: Add documentation for behavior usid command

    Add the documentation for the `behavior usid` command to zebra.
    
    When the `behavior usid` command is set, a flag is added to the locator
    to indicate that the locator is a uSID locator. When a locator is
    specified as a uSID locator, the bgpd will install SRv6 behaviors with
    the uSID in the dataplane and use the SRv6 uSID codepoints in the BGP
    update message.
    
    Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
    cscarpitta committed Nov 8, 2022
    Configuration menu
    Copy the full SHA
    439d4c9 View commit details
    Browse the repository at this point in the history