• Ido Schimmel's avatar
    nexthop: Add nexthop notification data structures · 1c9cac65
    Ido Schimmel authored
    Add data structures that will be used for nexthop replace and delete
    notifications in the previously introduced nexthop notification chain.
    
    New data structures are added instead of passing the existing nexthop
    code structures directly for several reasons.
    
    First, the existing structures encode a lot of bookkeeping information
    which is irrelevant for listeners of the notification chain.
    
    Second, the existing structures can be changed without worrying about
    introducing regressions in listeners since they are not accessed
    directly by them.
    
    Third, listeners of the notification chain do not need to each parse the
    relatively complex nexthop code structures. They are passing the
    required information in a simplified way.
    
    Note that a single 'has_encap' bit is added instead of the actual
    encapsulation information since current listeners do not support such
    nexthops.
    
    Changes since RFC:
    * s/is_encap/has_encap/
    Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
    Reviewed-by: default avatarDavid Ahern <dsahern@gmail.com>
    Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
    1c9cac65
nexthop.h 9.74 KB