diff options
author | Filip Tehlar <ftehlar@cisco.com> | 2017-07-27 08:09:14 +0200 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2017-08-07 14:53:56 +0000 |
commit | 7048ff1e3af7a3979a9134cbbb8157df8e1a8a53 (patch) | |
tree | 1ceae1bac11b6e0fab2193ce18174e2dee411a08 /src/vnet/lisp-cp/control.h | |
parent | 94384e4d3a4143578d5140c386188fd389754ebf (diff) |
LISP: Map-server fallback feature
Change-Id: I1356296e1a85b5d532f45ba70572b2184ac3f6fb
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Diffstat (limited to 'src/vnet/lisp-cp/control.h')
-rw-r--r-- | src/vnet/lisp-cp/control.h | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/src/vnet/lisp-cp/control.h b/src/vnet/lisp-cp/control.h index d030e588821..7b0380fbc0a 100644 --- a/src/vnet/lisp-cp/control.h +++ b/src/vnet/lisp-cp/control.h @@ -25,18 +25,22 @@ #define PENDING_MREQ_EXPIRATION_TIME 3.0 /* seconds */ #define PENDING_MREQ_QUEUE_LEN 5 -#define PENDING_MREG_EXPIRATION_TIME 3.0 /* seconds */ #define RLOC_PROBING_INTERVAL 60.0 /* when map-registration is enabled "quick registration" takes place first. In this mode ETR sends map-register messages at an increased frequency until specified message count is reached */ -#define QUICK_MAP_REGISTER_MSG_COUNT 3 +#define QUICK_MAP_REGISTER_MSG_COUNT 5 #define QUICK_MAP_REGISTER_INTERVAL 3.0 /* normal map-register period */ #define MAP_REGISTER_INTERVAL 60.0 +/* how many tries until next map-server election */ +#define MAX_EXPIRED_MAP_REGISTERS_DEFAULT 3 + +#define PENDING_MREG_EXPIRATION_TIME 3.0 /* seconds */ + /* 24 hours */ #define MAP_REGISTER_DEFAULT_TTL 86400 @@ -53,6 +57,11 @@ typedef struct typedef struct { + f64 time_to_expire; +} pending_map_register_t; + +typedef struct +{ gid_address_t leid; gid_address_t reid; u8 is_src_dst; @@ -180,6 +189,9 @@ typedef struct /* pool of pending map requests */ pending_map_request_t *pending_map_requests_pool; + /* pool of pending map registers */ + pending_map_register_t *pending_map_registers_pool; + /* hash map of sent map register messages */ uword *map_register_messages_by_nonce; @@ -194,8 +206,10 @@ typedef struct * since the vector may be modified during request resend/retry procedure * and break things :-) */ ip_address_t active_map_resolver; + ip_address_t active_map_server; u8 do_map_resolver_election; + u8 do_map_server_election; /* map-request locator set index */ u32 mreq_itr_rlocs; @@ -241,6 +255,10 @@ typedef struct /* TTL used for all mappings when registering */ u32 map_register_ttl; + /* control variables for map server election */ + u32 max_expired_map_registers; + u32 expired_map_registers; + /* commodity */ ip4_main_t *im4; ip6_main_t *im6; @@ -367,6 +385,8 @@ lisp_api_l2_arp_entry_t *vnet_lisp_l2_arp_entries_get_by_bd (u32 bd); int vnet_lisp_nsh_set_locator_set (u8 * locator_set_name, u8 is_add); int vnet_lisp_map_register_set_ttl (u32 ttl); u32 vnet_lisp_map_register_get_ttl (void); +int vnet_lisp_map_register_fallback_threshold_set (u32 value); +u32 vnet_lisp_map_register_fallback_threshold_get (void); map_records_arg_t *parse_map_reply (vlib_buffer_t * b); |