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

Flexalgo mpls frrbot2 #2

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open

Flexalgo mpls frrbot2 #2

wants to merge 21 commits into from

Commits on Sep 12, 2022

  1. isisd: update struct isis_spftree with algorithm id

    The spftree has a new property called algorithm
    which is id used to identify the algorithm that
    separates it in the same IGP network. This is
    used in Flex-Algo. In other cases than Flex-Algo,
    the algorithm id is always zero.
    
    Signed-off-by: Hiroki Shirokura <hiroki.shirokura@linecorp.com>
    Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
    slankdev authored and louis-6wind committed Sep 12, 2022
    Configuration menu
    Copy the full SHA
    0e2bd95 View commit details
    Browse the repository at this point in the history
  2. isisd: update struct sr_prefix_cfg with algorithm id

    The information in prefix-sid has a new property
    called algorithm id.  This is used to identify
    the algorithm that separates it in the same IGP
    network. This is used in Flex-Algo.In all other
    cases, the algorithm id is basically 0.
    
    Signed-off-by: Hiroki Shirokura <hiroki.shirokura@linecorp.com>
    Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
    slankdev authored and louis-6wind committed Sep 12, 2022
    Configuration menu
    Copy the full SHA
    0cb4464 View commit details
    Browse the repository at this point in the history
  3. isisd: update struct isis_sr_psid_info with algorithm id

    The information in prefix-sid has a new property
    called algorithm id.  This is used to identify
    the algorithm that separates it in the same IGP
    network. This is used in Flex-Algo.In all other
    cases, the algorithm id is basically 0.
    
    Signed-off-by: Hiroki Shirokura <hiroki.shirokura@linecorp.com>
    Signed-off-by: Eric Kinzie <ekinzie@labn.net>
    Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
    slankdev authored and louis-6wind committed Sep 12, 2022
    Configuration menu
    Copy the full SHA
    3e41a89 View commit details
    Browse the repository at this point in the history
  4. isisd: update SR_ALGORITHM_COUNT to 256

    Before this commit, SR_ALGORITHM_COUNT was set to 2,
    and each was hardcoded with router capability tlv.
    When Flex-Algo is supported, SR-Algorithm may be
    variably supported up to 256.
    
    Signed-off-by: Hiroki Shirokura <hiroki.shirokura@linecorp.com>
    Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
    slankdev authored and louis-6wind committed Sep 12, 2022
    Configuration menu
    Copy the full SHA
    7a0f8a9 View commit details
    Browse the repository at this point in the history
  5. isisd: update isis_tlvs_add_*_reach() with multi algorithm

    isis_tlvs_add_extended_ip_reach adds IS-IS Extended
    IP reachability to the LSP. In this case, if the
    pcfg argument is not NULL, you can add IGP
    Prefix-SID as its sub tlv.
    
    Before this commit, only one Prefix-SID can be added.
    After this commit, the argument is not a single
    pointer but an array of pointers, and multiple
    Prefix-SIDs can be added.
    
    This feature is necessary because Flex-Algo
    requires multiple Prefix-SIDs for each Algorithm.
    
    Signed-off-by: Hiroki Shirokura <hiroki.shirokura@linecorp.com>
    Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
    slankdev authored and louis-6wind committed Sep 12, 2022
    Configuration menu
    Copy the full SHA
    f7666d8 View commit details
    Browse the repository at this point in the history
  6. isisd: update struct isis_sr_psid_info with nh context

    Prefix-SID nexthops and backup nexthops are stored respectively in
    isis_route_info->nexthops and isis_route_info->backup->nexthops.
    
    With Flex-Algo, there are multiple Prefix-SIDs for a single prefix in
    different algorithms. Each of these Prefix-SIDs performs SPF calculation
    with a separate contract and sets a nexthops, so it is necessary to
    store a different set nexthops for each Prefix-SID.
    
    Add a nexthops and backup nethops list into the Prefix-SID
    isis_sr_psid_info struct and use these lists instead of the  when needed
    
    After this commit, the nexthops for each Prefix-SID is not
    taken from route_info, but the nexthop set inside the
    Prefix-SID is taken. This works for backup nexthops as well.
    
    Signed-off-by: Hiroki Shirokura <hiroki.shirokura@linecorp.com>
    Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
    slankdev authored and louis-6wind committed Sep 12, 2022
    Configuration menu
    Copy the full SHA
    493a407 View commit details
    Browse the repository at this point in the history
  7. isisd: update struct isis_route_info has multiple sr info by algorithm

    Before this commit, there was only one sr psid info
    included in route_info.
    
    In fact, in RFC8667, Algorithm ID, which is a property of
    Prefix-SID, has 8 bits of information. That is, each Prefix
    can hold up to 256 Prefix-SIDs. This commit implements it.
    The previously implemented single Prefix-SID will be
    continued as Algorithm 0.
    
    Signed-off-by: Hiroki Shirokura <hiroki.shirokura@linecorp.com>
    Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
    slankdev authored and louis-6wind committed Sep 12, 2022
    Configuration menu
    Copy the full SHA
    09243bb View commit details
    Browse the repository at this point in the history
  8. isisd: refactor enum tail comma

    Many of the enum definitions defined in isis_tlvs.h
    are often extended at the end. The c/c++ allows
    commas at the end of a list. This commit simplifies
    the patching of later extensions.
    
    Signed-off-by: Hiroki Shirokura <hiroki.shirokura@linecorp.com>
    Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
    slankdev authored and louis-6wind committed Sep 12, 2022
    Configuration menu
    Copy the full SHA
    a007dee View commit details
    Browse the repository at this point in the history
  9. lib,ospfd,isisd: refactor igp-agnostic sr misc functions

    SR Algorithms are independent of specific IGPs
    such as IS-IS and OSPF. This commit adds lib/sr to
    aggregate IGP agnostic functions and constants.
    
    Signed-off-by: Hiroki Shirokura <hiroki.shirokura@linecorp.com>
    Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
    Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
    slankdev authored and louis-6wind committed Sep 12, 2022
    Configuration menu
    Copy the full SHA
    2da73c5 View commit details
    Browse the repository at this point in the history
  10. isisd: add TLV_SIZE_MISMATCH for tlvs length mismatch

    Basically in frrouting source code principle,
    the log string should not be a complicated abstraction
    or streamlined for grep.
    
    But for log format for the "TLV size does not match ..."
    can be unified, which makes development easier.
    
    > $ grep "TLV size does not match expected size for" isisd/isis_tlvs.c
    >    "TLV size does not match expected size for Administrative Group!\n");
    >    "TLV size does not match expected size for Local IPv6 address!\n");
    >    ...(snip)...
    >    "TLV size does not match expected size for Adjacency SID!\n");
    >          "TLV size does not match expected size for Adjacency SID!\n");
    >          "TLV size does not match expected size for Adjacency SID!\n");
    >    "TLV size does not match expected size for LAN-Adjacency SID!\n");
    >          "TLV size does not match expected size for LAN-Adjacency SID!\n");
    >          "TLV size does not match expected size for LAN-Adjacency SID!\n");
    >
    > $ grep "TLV size does not match expected size for" isisd/isis_tlvs.c | wc -l
    > 25
    
    Signed-off-by: Hiroki Shirokura <hiroki.shirokura@linecorp.com>
    Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
    slankdev authored and louis-6wind committed Sep 12, 2022
    Configuration menu
    Copy the full SHA
    c163387 View commit details
    Browse the repository at this point in the history
  11. lib: extend length of SR algorithm array in ls_node

    IS-IS Extensions for Segment Routing (RFC8667) defines a variable length
    SR-Algorithm Sub-TLV (of the router capability TLV) that includes a list
    of supported SR algorithms.  Each algorithm number is one octet.  Only
    two algorithms were defined at the time 8667 was written: SPF (0) and
    Strict SPF (1).
    
    draft-ietf-lsr-flex-algo-18 reserves the range of algorithm numbers from
    128 to 255 for Flex-Algo definitions.  As a result, the SR-Algorithm
    Sub-TLV may now, in practice, hold more than two algorithm identifiers.
    
    The internal "struct ls_node", defined in link_state.h, has storage
    space for only two algorithm IDs.
    
    Extend this array to 256 entries. Adjust ls_node comparison logic, etc.,
    to accommodate the longer array.
    
    Note that the Router Capability TLV allows a maximum of 250 octets for
    sub-TLVs and that this is not sufficient to hold a list of all possible
    algorithm IDs.  These changes do not account for that limitation.
    
    Signed-off-by: Eric Kinzie <ekinzie@labn.net>
    Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
    eklabn authored and louis-6wind committed Sep 12, 2022
    Configuration menu
    Copy the full SHA
    1ac95a7 View commit details
    Browse the repository at this point in the history
  12. isisd,yang: add algorithm-prefix-sid configuration tree

    Add the ability to configure a Segment-Routing prefix SID for a given
    algorithm. For example:
    
    > segment-routing prefix 10.10.10.10/32 algorithm 128 index 100
    
    Signed-off-by: Hiroki Shirokura <hiroki.shirokura@linecorp.com>
    Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
    slankdev authored and louis-6wind committed Sep 12, 2022
    Configuration menu
    Copy the full SHA
    941515b View commit details
    Browse the repository at this point in the history
  13. isisd: add cli to configure algorithm-prefix-sid

    Add the ability to configure a Segment-Routing prefix SID for a given
    algorithm. For example:
    
    > segment-routing prefix 10.10.10.10/32 algorithm 128 index 100
    
    Signed-off-by: Hiroki Shirokura <hiroki.shirokura@linecorp.com>
    Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
    slankdev authored and louis-6wind committed Sep 12, 2022
    Configuration menu
    Copy the full SHA
    7bbe087 View commit details
    Browse the repository at this point in the history
  14. lib: add copy function for bitfield_t

    Add a function to copy a bitfield_t structure.
    
    Signed-off-by: Hiroki Shirokura <hiroki.shirokura@linecorp.com>
    Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
    slankdev authored and louis-6wind committed Sep 12, 2022
    Configuration menu
    Copy the full SHA
    34aac02 View commit details
    Browse the repository at this point in the history
  15. lib: add library for igp flexible-algorithm

    Add a library to deal with Flexible Algorithm that will be common to
    IS-IS and OSPF. The functions enables to deal with:
    
    - Affinity-maps
    - Extended Admin Group (RFC7308)
    - Flex-Algo structures that contains the flex-algo configurations
    
    Signed-off-by: Hiroki Shirokura <hiroki.shirokura@linecorp.com>
    Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
    slankdev authored and louis-6wind committed Sep 12, 2022
    Configuration menu
    Copy the full SHA
    237398e View commit details
    Browse the repository at this point in the history
  16. lib,vtysh,isisd,yang: algo cli/yang/callbacks

    Define the IS-IS flex-algo structure in yang, the CLI configuration
    commands and the skeletons of frontend and backend functions that are
    called by the CLI code.
    
    Signed-off-by: Hiroki Shirokura <hiroki.shirokura@linecorp.com>
    Signed-off-by: Eric Kinzie <ekinzie@labn.net>
    Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
    slankdev authored and louis-6wind committed Sep 12, 2022
    Configuration menu
    Copy the full SHA
    05376a6 View commit details
    Browse the repository at this point in the history
  17. lib: add a function to print flex-algo metric-type

    Add a function to returns a human readable string of the metric types
    that are defined in yang.
    
    Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
    louis-6wind committed Sep 12, 2022
    Configuration menu
    Copy the full SHA
    7fe58a5 View commit details
    Browse the repository at this point in the history
  18. isisd: dummy frrbot

    Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
    louis-6wind committed Sep 12, 2022
    Configuration menu
    Copy the full SHA
    5fd879a View commit details
    Browse the repository at this point in the history
  19. isisd: add isis flex-algo base interface

    Adds basic functionality to Flex-Algo for IS-IS wrapping lib/flex_algo.
    The configuration interface will be added in the next commit.
    
    Signed-off-by: Hiroki Shirokura <hiroki.shirokura@linecorp.com>
    Signed-off-by: Eric Kinzie <ekinzie@labn.net>
    Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
    slankdev authored and louis-6wind committed Sep 12, 2022
    Configuration menu
    Copy the full SHA
    c79cc7c View commit details
    Browse the repository at this point in the history
  20. isisd: dummy frrbot

    Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
    louis-6wind committed Sep 12, 2022
    Configuration menu
    Copy the full SHA
    74804c3 View commit details
    Browse the repository at this point in the history
  21. isisd: add isis flex-algo configuration backend

    Add the backend functions for the flex-algo configuration.
    
    Signed-off-by: Hiroki Shirokura <hiroki.shirokura@linecorp.com>
    Signed-off-by: Eric Kinzie <ekinzie@labn.net>
    Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
    slankdev authored and louis-6wind committed Sep 12, 2022
    Configuration menu
    Copy the full SHA
    cdcdf50 View commit details
    Browse the repository at this point in the history