diff options
author | Takeru Hayasaka <hayatake396@gmail.com> | 2022-12-30 16:41:44 +0900 |
---|---|---|
committer | Damjan Marion <dmarion@0xa5.net> | 2023-02-10 16:17:27 +0000 |
commit | c4c205b091934d96a173f4c0d75ef7e888298ac7 (patch) | |
tree | 31d86fe8f778a0caea8b636f0717972c3caef81a /src/vnet/srv6/sr.h | |
parent | 7550dd268f80334cbb9127feefe35319b9c7e572 (diff) |
sr: support define src ipv6 per encap policy
Can to define src ip of outer IPv6 Hdr for each encap policy.
Along with that, I decided to develop it as API version V2.
This is useful in the SRv6 MUP case.
For example, it will be possible to handle multiple UPF destinations.
Type: feature
Change-Id: I44ff7b54e8868619069621ab53e194e2c7a17435
Signed-off-by: Takeru Hayasaka <hayatake396@gmail.com>
Diffstat (limited to 'src/vnet/srv6/sr.h')
-rw-r--r-- | src/vnet/srv6/sr.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/vnet/srv6/sr.h b/src/vnet/srv6/sr.h index 02cceade682..7d8aa732a65 100644 --- a/src/vnet/srv6/sr.h +++ b/src/vnet/srv6/sr.h @@ -112,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; @@ -345,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 |