|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
69 .path =
"show lisp adjacencies",
70 .short_help =
"show lisp adjacencies",
94 else if (
unformat (line_input,
"del"))
115 is_add ?
"add" :
"delete");
125 .path =
"lisp map-server",
126 .short_help =
"lisp map-server add|del <ip>",
142 u8 *locator_set_name = 0;
143 u32 locator_set_index = 0, map_index = 0;
162 else if (
unformat (line_input,
"del"))
168 else if (
unformat (line_input,
"secret-key %_%v%_", &
key))
173 else if (
unformat (line_input,
"locator-set %_%v%_", &locator_set_name))
183 locator_set_index = p[0];
200 if (
key && (0 == key_id))
208 a->locator_set_index = locator_set_index;
217 is_add ?
"add" :
"delete");
221 if (locator_set_name)
232 .path =
"lisp eid-table",
233 .short_help =
"lisp eid-table add/del [vni <vni>] eid <eid> "
234 "locator-set <locator-set> [key <secret-key> key-id sha1|sha256 ]",
244 u8 is_add = 1, is_l2 = 0;
259 else if (
unformat (line_input,
"vrf %d", &dp_id))
261 else if (
unformat (line_input,
"bd %d", &dp_id))
279 .path =
"lisp eid-table map",
280 .short_help =
"lisp eid-table map [del] vni <vni> vrf <vrf> | bd <bdi>",
300 u8 is_add = 1, del_all = 0;
301 locator_t rloc, *rlocs = 0, *curr_rloc = 0;
316 if (
unformat (line_input,
"del-all"))
318 else if (
unformat (line_input,
"del"))
320 else if (
unformat (line_input,
"add"))
328 else if (
unformat (line_input,
"p %d w %d", &p, &w))
333 (
"No RLOC configured for setting priority/weight!");
336 curr_rloc->priority = p;
337 curr_rloc->weight = w;
349 curr_rloc = &rlocs[
vec_len (rlocs) - 1];
351 else if (
unformat (line_input,
"action %U",
413 clib_warning (
"failed to %s remote mapping!", is_add ?
"add" :
"delete");
423 .path =
"lisp remote-mapping",
424 .short_help =
"lisp remote-mapping add|del [del-all] vni <vni> "
425 "eid <est-eid> [action <no-action|natively-forward|"
426 "send-map-request|drop>] rloc <dst-locator> p <prio> "
427 "w <weight> [rloc <dst-locator> ... ]",
447 u8 reid_set = 0, leid_set = 0;
464 else if (
unformat (line_input,
"add"))
466 else if (
unformat (line_input,
"reid %U",
482 else if (
unformat (line_input,
"leid %U",
500 if (!reid_set || !leid_set)
511 clib_warning (
"remote and local EIDs are of different types!");
521 clib_warning (
"failed to %s adjacency!", is_add ?
"add" :
"delete");
530 .path =
"lisp adjacency",
531 .short_help =
"lisp adjacency add|del vni <vni> reid <remote-eid> "
564 if (_MR_MODE_MAX == mr_mode)
580 .path =
"lisp map-request mode",
581 .short_help =
"lisp map-request mode dst-only|src-dst",
595 return format (0,
"dst-only");
597 return format (0,
"src-dst");
614 .path =
"show lisp map-request mode",
615 .short_help =
"show lisp map-request mode",
637 .path =
"show lisp map-resolvers",
638 .short_help =
"show lisp map-resolvers",
649 u8 locator_name_set = 0;
650 u8 *locator_set_name = 0;
662 if (
unformat (line_input,
"ls %_%v%_", &locator_set_name))
663 locator_name_set = 1;
664 else if (
unformat (line_input,
"disable"))
673 if (!locator_name_set)
683 is_add ?
"add" :
"delete");
687 if (locator_set_name)
697 .short_help =
"lisp pitr [disable] ls <locator-set-name>",
710 u8 status = lcm->
flags & LISP_FLAG_PITR_MODE;
722 tmp_str =
format (0,
"N/A");
735 tmp_str =
format (0,
"N/A");
749 .path =
"show lisp pitr",
750 .short_help =
"Show pitr",
796 s =
format (s,
"%55s%v\n",
"", loc);
826 else if (
unformat (line_input,
"local"))
828 else if (
unformat (line_input,
"remote"))
839 "EID",
"type",
"locators",
"ttl",
"authoritative");
851 if (filter && !((1 == filter && ls->
local) ||
852 (2 == filter && !ls->
local)))
871 if (filter && !((1 == filter && ls->
local) ||
872 (2 == filter && !ls->
local)))
889 .path =
"show lisp eid-table",
890 .short_help =
"show lisp eid-table [local|remote|eid <eid>]",
911 .path =
"lisp enable",
912 .short_help =
"lisp enable",
932 .path =
"lisp disable",
933 .short_help =
"lisp disable",
954 if (
unformat (line_input,
"enable"))
959 else if (
unformat (line_input,
"disable"))
985 .path =
"lisp map-register",
986 .short_help =
"lisp map-register [enable|disable]",
1007 if (
unformat (line_input,
"enable"))
1012 else if (
unformat (line_input,
"disable"))
1038 .path =
"lisp rloc-probe",
1039 .short_help =
"lisp rloc-probe [enable|disable]",
1056 msg =
format (msg,
"feature: %U\ngpe: %U\n",
1065 .path =
"show lisp status",
1066 .short_help =
"show lisp status",
1079 uword *vni_table = 0;
1094 else if (
unformat (line_input,
"l3"))
1130 .path =
"show lisp eid-table map",
1131 .short_help =
"show lisp eid-table map l2|l3",
1147 u8 *locator_set_name = 0;
1162 if (
unformat (line_input,
"add %_%v%_", &locator_set_name))
1164 else if (
unformat (line_input,
"del %_%v%_", &locator_set_name))
1166 else if (
unformat (line_input,
"iface %U p %d w %d",
1183 a->name = locator_set_name;
1184 a->locators = locators;
1192 is_add ?
"add" :
"delete");
1197 if (locator_set_name)
1206 .path =
"lisp locator-set",
1207 .short_help =
"lisp locator-set add/del <name> [iface <iface-name> "
1208 "p <priority> w <weight>]",
1223 u8 *locator_set_name = 0;
1224 u8 locator_set_name_set = 0;
1240 else if (
unformat (line_input,
"del"))
1242 else if (
unformat (line_input,
"locator-set %_%v%_", &locator_set_name))
1243 locator_set_name_set = 1;
1244 else if (
unformat (line_input,
"iface %U p %d w %d",
1259 if (!locator_set_name_set)
1265 a->name = locator_set_name;
1266 a->locators = locators;
1282 .path =
"lisp locator",
1283 .short_help =
"lisp locator add/del locator-set <name> iface <iface-name> "
1284 "p <priority> w <weight>",
1300 "Priority",
"Weight");
1319 msg =
format (msg,
"%16s",
" ");
1340 .path =
"show lisp locator-set",
1341 .short_help =
"Shows locator-sets",
1353 u8 is_add = 1, addr_set = 0;
1367 else if (
unformat (line_input,
"del"))
1385 a->address = ip_addr;
1390 is_add ?
"add" :
"delete");
1401 .path =
"lisp map-resolver",
1402 .short_help =
"lisp map-resolver add/del <ip_address>",
1415 u8 *locator_set_name = 0;
1428 else if (
unformat (line_input,
"add %_%v%_", &locator_set_name))
1439 a->locator_set_name = locator_set_name;
1444 is_add ?
"add" :
"delete");
1456 .path =
"lisp map-request itr-rlocs",
1457 .short_help =
"lisp map-request itr-rlocs add/del <locator_set_name>",
1486 .path =
"show lisp map-request itr-rlocs",
1487 .short_help =
"Shows map-request itr-rlocs",
1510 else if (
unformat (line_input,
"disable"))
1528 is_add ?
"add" :
"delete");
1539 .path =
"lisp use-petr",
1540 .short_help =
"lisp use-petr [disable] <petr-ip>",
1553 u8 use_petr = lcm->
flags & LISP_FLAG_USE_PETR;
1564 tmp_str =
format (0,
"N/A");
1577 tmp_str =
format (0,
"N/A");
1591 .path =
"show lisp petr",
1592 .short_help =
"Show petr",
static clib_error_t * lisp_eid_table_map_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
vlib_cli_command_t lisp_add_del_map_resolver_command
(constructor) VLIB_CLI_COMMAND (lisp_add_del_map_resolver_command)
void ip_set(ip46_address_t *dst, void *src, u8 is_ip4)
uword unformat_ip_prefix(unformat_input_t *input, va_list *args)
vlib_cli_command_t lisp_cp_disable_command
(constructor) VLIB_CLI_COMMAND (lisp_cp_disable_command)
int vnet_lisp_use_petr(ip_address_t *ip, u8 is_add)
Configure Proxy-ETR.
static clib_error_t * lisp_show_mreq_itr_rlocs_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
#define gid_address_ip_version(_a)
static clib_error_t * lisp_add_del_locator_in_set_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
lisp_msmr_t * map_resolvers
static clib_error_t * lisp_cp_show_locator_sets_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
static clib_error_t * lisp_add_del_adjacency_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Handler for add/del adjacency CLI.
static u8 * format_eid_entry(u8 *s, va_list *args)
static clib_error_t * lisp_pitr_set_locator_set_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
#define clib_error_return(e, args...)
vlib_cli_command_t lisp_map_request_mode_command
(constructor) VLIB_CLI_COMMAND (lisp_map_request_mode_command)
static clib_error_t * lisp_add_del_locator_set_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
#define gid_address_ippref(_a)
int vnet_lisp_add_del_adjacency(vnet_lisp_add_del_adjacency_args_t *a)
Adds adjacency or removes forwarding entry associated to remote mapping.
vl_api_tunnel_mode_t mode
vlib_cli_command_t lisp_add_del_local_eid_command
(constructor) VLIB_CLI_COMMAND (lisp_add_del_local_eid_command)
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
static clib_error_t * lisp_show_map_resolvers_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
static clib_error_t * lisp_show_map_request_mode_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
#define ip_prefix_len(_a)
static clib_error_t * lisp_show_pitr_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
int vnet_lisp_pitr_set_locator_set(u8 *locator_set_name, u8 is_add)
#define gid_address_ip(_a)
vlib_cli_command_t lisp_show_pitr_command
(constructor) VLIB_CLI_COMMAND (lisp_show_pitr_command)
uword unformat_hmac_key_id(unformat_input_t *input, va_list *args)
static clib_error_t * lisp_map_register_enable_disable_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
u32 petr_map_index
Proxy ETR map index used for 'use-petr'.
u8 vnet_lisp_get_map_request_mode(void)
int vnet_lisp_eid_table_map(u32 vni, u32 dp_id, u8 is_l2, u8 is_add)
static clib_error_t * lisp_enable_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
#define hash_foreach_pair(p, v, body)
Iterate over hash pairs.
vlib_cli_command_t lisp_cp_enable_command
(constructor) VLIB_CLI_COMMAND (lisp_cp_enable_command)
#define pool_foreach(VAR, POOL)
Iterate through pool.
uword unformat_ip_address(unformat_input_t *input, va_list *args)
vlib_cli_command_t lisp_add_del_adjacency_command
(constructor) VLIB_CLI_COMMAND (lisp_add_del_adjacency_command)
u8 ip_address_max_len(u8 version)
clib_error_t * vnet_lisp_enable_disable(u8 is_enable)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
int vnet_lisp_add_mapping(vnet_lisp_add_del_mapping_args_t *a, locator_t *rlocs, u32 *res_map_index, u8 *is_updated)
Adds/updates mapping.
static clib_error_t * lisp_disable_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
int vnet_lisp_add_del_local_mapping(vnet_lisp_add_del_mapping_args_t *a, u32 *map_index_result)
Add/update/delete mapping to/in/from map-cache.
locator_set_t * locator_set_pool
int vnet_lisp_set_map_request_mode(u8 mode)
static clib_error_t * lisp_show_eid_table_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
static clib_error_t * lisp_show_adjacencies_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
static lisp_cp_main_t * vnet_lisp_cp_get_main()
gid_dictionary_t mapping_index_by_gid
#define gid_address_vni(_a)
static clib_error_t * lisp_show_status_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
vlib_cli_command_t lisp_cp_show_locator_sets_command
(constructor) VLIB_CLI_COMMAND (lisp_cp_show_locator_sets_command)
u8 * format_ip_address(u8 *s, va_list *args)
vlib_cli_command_t lisp_show_map_request_command
(constructor) VLIB_CLI_COMMAND (lisp_show_map_request_command)
vlib_cli_command_t lisp_use_petr_set_locator_set_command
(constructor) VLIB_CLI_COMMAND (lisp_use_petr_set_locator_set_command)
lisp_gpe_main_t lisp_gpe_main
LISP-GPE global state.
vlib_cli_command_t lisp_cp_add_del_locator_set_command
(constructor) VLIB_CLI_COMMAND (lisp_cp_add_del_locator_set_command)
sll srl srl sll sra u16x4 i
int vnet_lisp_add_del_map_server(ip_address_t *addr, u8 is_add)
uword * locator_set_index_by_name
#define VLIB_CLI_COMMAND(x,...)
vlib_cli_command_t lisp_cp_show_eid_table_command
(constructor) VLIB_CLI_COMMAND (lisp_cp_show_eid_table_command)
int vnet_lisp_clear_all_remote_adjacencies(void)
static clib_error_t * lisp_add_del_remote_mapping_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Handler for add/del remote mapping CLI.
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
uword unformat_gid_address(unformat_input_t *input, va_list *args)
vlib_cli_command_t lisp_eid_table_map_command
(constructor) VLIB_CLI_COMMAND (lisp_eid_table_map_command)
static clib_error_t * lisp_add_del_map_resolver_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
int vnet_lisp_add_del_mreq_itr_rlocs(vnet_lisp_add_del_mreq_itr_rloc_args_t *a)
#define vec_free(V)
Free vector's memory (no header).
vlib_cli_command_t lisp_show_petr_command
(constructor) VLIB_CLI_COMMAND (lisp_show_petr_command)
vlib_cli_command_t lisp_show_eid_table_map_command
(constructor) VLIB_CLI_COMMAND (lisp_show_eid_table_map_command)
void gid_address_copy(gid_address_t *dst, gid_address_t *src)
#define hash_get_mem(h, key)
static clib_error_t * lisp_add_del_map_server_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
vlib_cli_command_t lisp_show_map_request_mode_command
(constructor) VLIB_CLI_COMMAND (lisp_show_map_request_mode_command)
format_function_t format_vnet_sw_if_index_name
unformat_function_t unformat_vnet_sw_interface
description fragment has unexpected format
lisp_adjacency_t * vnet_lisp_adjacencies_get_by_vni(u32 vni)
Returns vector of adjacencies.
static clib_error_t * lisp_use_petr_set_locator_set_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
u8 * format_vnet_lisp_gpe_status(u8 *s, va_list *args)
Format LISP-GPE status.
vlib_cli_command_t lisp_add_del_remote_mapping_command
(constructor) VLIB_CLI_COMMAND (lisp_add_del_remote_mapping_command)
int vnet_lisp_add_del_locator_set(vnet_lisp_add_del_locator_set_args_t *a, u32 *ls_result)
vlib_cli_command_t lisp_show_status_command
(constructor) VLIB_CLI_COMMAND (lisp_show_status_command)
#define vec_foreach(var, vec)
Vector iterator.
static clib_error_t * lisp_show_petr_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
vlib_cli_command_t lisp_show_adjacencies_command
(constructor) VLIB_CLI_COMMAND (lisp_show_adjacencies_command)
int vnet_lisp_rloc_probe_enable_disable(u8 is_enable)
int vnet_lisp_del_mapping(gid_address_t *eid, u32 *res_map_index)
Removes a mapping.
int vnet_lisp_map_register_enable_disable(u8 is_enable)
static clib_error_t * lisp_add_del_local_eid_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
static u8 * format_lisp_status(u8 *s, va_list *args)
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
vlib_cli_command_t lisp_map_register_enable_disable_command
(constructor) VLIB_CLI_COMMAND (lisp_map_register_enable_disable_command)
vlib_cli_command_t lisp_cp_add_del_locator_in_set_command
(constructor) VLIB_CLI_COMMAND (lisp_cp_add_del_locator_in_set_command)
static clib_error_t * lisp_rloc_probe_enable_disable_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
u64 gid_dictionary_lookup(gid_dictionary_t *db, gid_address_t *key)
#define gid_address_type(_a)
void gid_address_free(gid_address_t *a)
static clib_error_t * lisp_map_request_mode_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
#define ip_prefix_version(_a)
#define vec_terminate_c_string(V)
(If necessary) NULL terminate a vector containing a c-string.
u8 * format_gid_address(u8 *s, va_list *args)
uword unformat_negative_mapping_action(unformat_input_t *input, va_list *args)
#define clib_warning(format, args...)
struct _gid_address_t gid_address_t
vlib_cli_command_t lisp_pitr_set_locator_set_command
(constructor) VLIB_CLI_COMMAND (lisp_pitr_set_locator_set_command)
vlib_cli_command_t lisp_show_map_resolvers_command
(constructor) VLIB_CLI_COMMAND (lisp_show_map_resolvers_command)
vlib_cli_command_t lisp_rloc_probe_enable_disable_command
(constructor) VLIB_CLI_COMMAND (lisp_rloc_probe_enable_disable_command)
static clib_error_t * lisp_show_eid_table_map_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
vl_api_mac_event_action_t action
static u8 * format_lisp_map_request_mode(u8 *s, va_list *args)
int vnet_lisp_add_del_map_resolver(vnet_lisp_add_del_map_resolver_args_t *a)
uword unformat_mac_address(unformat_input_t *input, va_list *args)
vlib_cli_command_t lisp_add_del_map_request_command
(constructor) VLIB_CLI_COMMAND (lisp_add_del_map_request_command)
vl_api_fib_path_type_t type
#define gid_address_mac(_a)
static clib_error_t * lisp_add_del_mreq_itr_rlocs_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
int vnet_lisp_add_del_locator(vnet_lisp_add_del_locator_set_args_t *a, locator_set_t *ls, u32 *ls_result)
vlib_cli_command_t lisp_add_del_map_server_command
(constructor) VLIB_CLI_COMMAND (lisp_add_del_map_server_command)