aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/srv6/sr.h
diff options
context:
space:
mode:
authorTetsuya Murakami <tetsuya.mrk@gmail.com>2020-03-23 16:10:28 -0700
committerNeale Ranns <nranns@cisco.com>2020-04-07 08:21:43 +0000
commitec9cb966875e1782a1d3c39be7488a56e7dc785a (patch)
tree1183ae081f0734c4dd5f302f2ec57b92488daf8f /src/vnet/srv6/sr.h
parent032a5e3da0f4350390d97d6011160fe0d34a8d6e (diff)
sr: Support uSID function.
1. Add uSID function in VNET SRv6 2. Add test case for uSID Type: feature Signed-off-by: Tetsuya Murakami <tetsuya.mrk@gmail.com> Change-Id: I354fc687192ed713ceb81fccc9f7b69b6777f6f6 Signed-off-by: Tetsuya Murakami <tetsuya.mrk@gmail.com>
Diffstat (limited to 'src/vnet/srv6/sr.h')
-rwxr-xr-xsrc/vnet/srv6/sr.h22
1 files changed, 20 insertions, 2 deletions
diff --git a/src/vnet/srv6/sr.h b/src/vnet/srv6/sr.h
index f804b190135..41adef30818 100755
--- a/src/vnet/srv6/sr.h
+++ b/src/vnet/srv6/sr.h
@@ -43,7 +43,9 @@
#define SR_BEHAVIOR_DX4 7
#define SR_BEHAVIOR_DT6 8
#define SR_BEHAVIOR_DT4 9
-#define SR_BEHAVIOR_LAST 10 /* Must always be the last one */
+#define SR_BEHAVIOR_END_UN_PERF 10
+#define SR_BEHAVIOR_END_UN 11
+#define SR_BEHAVIOR_LAST 12 /* Must always be the last one */
#define SR_STEER_L2 2
#define SR_STEER_IPV4 4
@@ -139,6 +141,15 @@ typedef struct
u32 nh_adj; /**< Next_adj for xconnect usage only */
+ ip6_address_t usid_block;
+ ip6_address_t usid_block_mask;
+
+ u8 usid_index;
+ u8 usid_len;
+
+ u8 usid_next_index;
+ u8 usid_next_len;
+
void *plugin_mem; /**< Memory to be used by the plugin callback functions */
} ip6_sr_localsid_t;
@@ -231,6 +242,13 @@ typedef struct
u32 sr_policy; /**< SR Policy index */
} ip6_sr_steering_policy_t;
+typedef struct
+{
+ ip6_address_t address;
+ u16 pref_len;
+ u8 padding[2];
+} sr_localsid_key_t;
+
/**
* @brief Segment Routing main datastructure
*/
@@ -334,7 +352,7 @@ extern int
sr_cli_localsid (char is_del, ip6_address_t * localsid_addr,
u16 localsid_prefix_len, char end_psp, u8 behavior,
u32 sw_if_index, u32 vlan_index, u32 fib_table,
- ip46_address_t * nh_addr, void *ls_plugin_mem);
+ ip46_address_t * nh_addr, int usid_len, void *ls_plugin_mem);
extern int
sr_steering_policy (int is_del, ip6_address_t * bsid, u32 sr_policy_index,