docs: Update info about GoVPP
[vpp.git] / src / vnet / srv6 / sr.h
index c84534c..7d8aa73 100644 (file)
@@ -90,6 +90,7 @@ typedef struct
 /* SR policy types */
 #define SR_POLICY_TYPE_DEFAULT 0
 #define SR_POLICY_TYPE_SPRAY 1
+#define SR_POLICY_TYPE_TEF     2
 /**
  * @brief SR Policy
  */
@@ -101,7 +102,7 @@ typedef struct
 
   u8 type;                                     /**< Type (default is 0) */
   /* SR Policy specific DPO                                       */
-  /* IF Type = DEFAULT Then Load Balancer DPO among SID lists     */
+  /* IF Type = DEFAULT Then Load-Balancer DPO among SID lists     */
   /* IF Type = SPRAY then Spray DPO with all SID lists            */
   dpo_id_t bsid_dpo;                   /**< SR Policy specific DPO - BSID */
   dpo_id_t ip4_dpo;                    /**< SR Policy specific DPO - IPv6 */
@@ -111,6 +112,8 @@ typedef struct
 
   u8 is_encap;                         /**< Mode (0 is SRH insert, 1 Encaps) */
 
+  ip6_address_t encap_src;
+
   u16 plugin;
   void *plugin_mem;
 } ip6_sr_policy_t;
@@ -128,7 +131,7 @@ typedef struct
 
   char end_psp;                                        /**< Combined with End.PSP? */
 
-  u16 behavior;                                        /**< Behavior associated to this localsid */
+  u8 behavior; /**< Behavior associated to this localsid */
 
   union
   {
@@ -344,11 +347,12 @@ sr_policy_register_function (vlib_main_t * vm, u8 * fn_name,
                             sr_p_plugin_callback_t * removal_fn);
 
 extern int sr_policy_add (ip6_address_t *bsid, ip6_address_t *segments,
-                         u32 weight, u8 type, u32 fib_table, u8 is_encap,
-                         u16 plugin, void *plugin_mem);
-extern int sr_policy_mod (ip6_address_t * bsid, u32 index, u32 fib_table,
-                         u8 operation, ip6_address_t * segments,
-                         u32 sl_index, u32 weight);
+                         ip6_address_t *encap_src, u32 weight, u8 type,
+                         u32 fib_table, u8 is_encap, u16 plugin,
+                         void *plugin_mem);
+extern int sr_policy_mod (ip6_address_t *bsid, u32 index, u32 fib_table,
+                         u8 operation, ip6_address_t *segments,
+                         ip6_address_t *encap_src, u32 sl_index, u32 weight);
 extern int sr_policy_del (ip6_address_t * bsid, u32 index);
 
 extern int