aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/srv6/sr.h
diff options
context:
space:
mode:
authorAhmed Abdelsalam <ahabdels@cisco.com>2024-11-12 08:56:45 -0600
committerDamjan Marion <dmarion@0xa5.net>2024-11-12 17:14:50 +0000
commitc68c9708387c1d7a7ed6b59b7c2162950fcbc122 (patch)
tree9132871c0632235d79f57df8f0e4542d18fb0254 /src/vnet/srv6/sr.h
parent27a901ece39c371eba0f11806d9fe54b0e8dc95c (diff)
sr : enable SRv6 uSID in the SRv6 API
Type: improvement Change-Id: I026b1a8fd1df0e6ac1dba8df78b12cde95aae419 Signed-off-by: Ahmed Abdelsalam <ahabdels@cisco.com>
Diffstat (limited to 'src/vnet/srv6/sr.h')
-rw-r--r--src/vnet/srv6/sr.h23
1 files changed, 18 insertions, 5 deletions
diff --git a/src/vnet/srv6/sr.h b/src/vnet/srv6/sr.h
index ba114f2de6c..40edbbaf437 100644
--- a/src/vnet/srv6/sr.h
+++ b/src/vnet/srv6/sr.h
@@ -43,10 +43,22 @@
#define SR_BEHAVIOR_DX4 7
#define SR_BEHAVIOR_DT6 8
#define SR_BEHAVIOR_DT4 9
-#define SR_BEHAVIOR_END_UN_PERF 10
-#define SR_BEHAVIOR_END_UN 11
-#define SR_BEHAVIOR_UA 12
-#define SR_BEHAVIOR_LAST 13 /* Must always be the last one */
+/**
+ * SR_BEHAVIOR_LAST
+ * Not used anymore. Kept not to break the API.
+ * We use SR_BEHAVIOR_CURRENT_LAST going forward
+ * */
+#define SR_BEHAVIOR_LAST 10
+#define SR_BEHAVIOR_END_UN_PERF 11
+#define SR_BEHAVIOR_END_UN 12
+#define SR_BEHAVIOR_UA 13
+
+/**
+ * SR_BEHAVIOR_CURRENT_LAST
+ * MUST be updated everytime we add new behaviors.
+ * MUST be set to value of last added behavior + 1.
+ * */
+#define SR_BEHAVIOR_CURRENT_LAST 14
#define SR_STEER_L2 2
#define SR_STEER_IPV4 4
@@ -165,7 +177,8 @@ typedef int (sr_plugin_callback_t) (ip6_sr_localsid_t * localsid);
*/
typedef struct
{
- u16 sr_localsid_function_number; /**< SR LocalSID plugin function (>SR_BEHAVIOR_LAST) */
+ u16 sr_localsid_function_number; /**< SR LocalSID plugin function
+ (>SR_BEHAVIOR_CURRENT_LAST) */
u8 *function_name; /**< Function name. (key). */