]> git.puffer.fish Git - mirror/frr.git/commitdiff
fpm: Add SRv6 Local SIDs to `fpm.proto`
authorCarmine Scarpitta <cscarpit@cisco.com>
Tue, 13 Feb 2024 09:29:34 +0000 (10:29 +0100)
committerCarmine Scarpitta <cscarpit@cisco.com>
Sun, 18 Feb 2024 17:31:13 +0000 (18:31 +0100)
Add several protobuf messages to support the installation and removal
of SRv6 Local SIDs via FPM protobuf.

This is a preliminary commit to support sending SRv6 Local SIDs and VPN
SIDs via protobuf.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
fpm/fpm.proto

index 9f0917feae53b0bd96b4588bdf5f4399fa347825..2557bd8744f2fbc758b2432a3e224ec7d79ace23 100644 (file)
@@ -6,6 +6,9 @@
 //
 // @author Avneesh Sachdev <avneesh@sproute.com>
 //
+// Portions:
+//   Copyright (C) 2024 Carmine Scarpitta (for SRv6)
+//
 // Permission to use, copy, modify, and/or distribute this software
 // for any purpose with or without fee is hereby granted, provided
 // that the above copyright notice and this permission notice appear
@@ -74,6 +77,136 @@ message AddRoute {
   repeated Nexthop nexthops = 9;
 }
 
+/* SID Format - as per RFC 8986 section #3.1 */
+message SRv6SIDFormat
+{
+       /* Locator block length */
+       required uint32 locator_block_length = 1;
+       /* Locator node length */
+       required uint32 locator_node_length = 2;
+       /* Function length */
+       required uint32 function_length = 3;
+       /* Argument length */
+       required uint32 argument_length = 4;
+}
+
+/* SRv6 Local SID */
+message SRv6LocalSID
+{
+       /* SRv6 SID value */
+       required qpb.Ipv6Address sid = 1;
+
+       /* SID Format - as per RFC 8986 section #3.1 */
+       optional SRv6SIDFormat sid_format = 2;
+
+       /* SRv6 Endpoint Behavior associated with the SID */
+       oneof end_behavior
+       {
+               /* Endpoint */
+               End end = 3;
+               /* Endpoint with L3 cross-connect */
+               EndX end_x = 4;
+               /* Endpoint with specific IPv6 table lookup */
+               EndT end_t = 5;
+               /* Endpoint with decapsulation and IPv6 cross-connect */
+               EndDX6 end_dx6 = 7;
+               /* Endpoint with decapsulation and IPv4 cross-connect */
+               EndDX4 end_dx4 = 8;
+               /* Endpoint with decapsulation and specific IPv6 table lookup */
+               EndDT6 end_dt6 = 9;
+               /* Endpoint with decapsulation and specific IPv4 table lookup */
+               EndDT4 end_dt4 = 10;
+               /* Endpoint with decapsulation and specific IP table lookup */
+               EndDT46 end_dt46 = 11;
+               /* Endpoint behavior with NEXT-CSID, PSP and USD flavors */
+               UN un = 12;
+               /* End.X behavior with NEXT-CSID, PSP and USD flavors */
+               UA ua = 13;
+               /* End.DT6 behavior with NEXT-CSID flavor */
+               UDT6 udt6 = 14;
+               /* End.DT4 behavior with NEXT-CSID flavor */
+               UDT4 udt4 = 15;
+               /* End.DT46 behavior with NEXT-CSID flavor */
+               UDT46 udt46 = 16;
+       }
+
+       /* Endpoint */
+       message End
+       {
+       }
+
+       /* Endpoint with L3 cross-connect */
+       message EndX
+       {
+               required Nexthop nexthop = 1;
+       }
+
+       /* Endpoint with specific IPv6 table lookup */
+       message EndT
+       {
+               required uint32 vrf_id = 1;
+       }
+
+       /* Endpoint with decapsulation and IPv6 cross-connect */
+       message EndDX6
+       {
+               required Nexthop nexthop = 1;
+       }
+
+       /* Endpoint with decapsulation and IPv4 cross-connect */
+       message EndDX4
+       {
+               required Nexthop nexthop = 1;
+       }
+
+       /* Endpoint with decapsulation and specific IPv6 table lookup */
+       message EndDT6
+       {
+               required uint32 vrf_id = 1;
+       }
+
+       /* Endpoint with decapsulation and specific IPv4 table lookup */
+       message EndDT4
+       {
+               required uint32 vrf_id = 1;
+       }
+
+       /* Endpoint with decapsulation and specific IP table lookup */
+       message EndDT46
+       {
+               required uint32 vrf_id = 1;
+       }
+
+       /* Endpoint behavior with NEXT-CSID, PSP and USD flavors */
+       message UN
+       {
+       }
+
+       /* End.X behavior with NEXT-CSID, PSP and USD flavors */
+       message UA
+       {
+               required Nexthop nexthop = 1;
+       }
+
+       /* End.DT6 behavior with NEXT-CSID flavor */
+       message UDT6
+       {
+               required uint32 vrf_id = 1;
+       }
+
+       /* End.DT4 behavior with NEXT-CSID flavor */
+       message UDT4
+       {
+               required uint32 vrf_id = 1;
+       }
+
+       /* End.DT46 behavior with NEXT-CSID flavor */
+       message UDT46
+       {
+               required uint32 vrf_id = 1;
+       }
+}
+
 //
 // Any message from the FPM.
 //
@@ -82,10 +215,17 @@ message Message {
     UNKNOWN_MSG = 0;
     ADD_ROUTE = 1;
     DELETE_ROUTE = 2;
+    /* Install an SRv6 Local SID */
+    ADD_SRV6_LOCALSID = 3;
+    /* Remove an SRv6 Local SID */
+    DELETE_SRV6_LOCALSID = 4;
   };
 
   optional Type type = 1;
 
   optional AddRoute add_route = 2;
   optional DeleteRoute delete_route = 3;
+
+  /* SRv6 Local SID */
+  optional SRv6LocalSID srv6_localsid = 4;
 }