aboutsummaryrefslogtreecommitdiffstats
path: root/tests/vpp/perf/ip4/10ge2p1x710-ethip4udp-ip4base-oacl10sl-10kflows-ndrpdr.robot
AgeCommit message (Expand)AuthorFilesLines
2021-12-13doc: fixing documentation structureViliam Luc1-22/+27
2021-05-26Perf: Add perfmon_plugin for telemetrypmikus1-2/+2
2020-10-29Support existing test types with ASTFVratko Polak1-1/+1
2020-08-20Framework: use 'stl' in trex stateless profile namesJan Gelety1-1/+1
2020-06-09Remove leading tc[nn] from test namesJuraj Linkeš1-12/+12
2020-04-06Improve pf layerPeter Mikus1-1/+3
2020-03-10Make RXQs/TXQs configurablePeter Mikus1-0/+3
2020-02-25FIX: check if t-rex is running at test setup of all perf testsJan Gelety1-2/+2
2020-01-10Support suite tags in autogenVratko Polak1-0/+1
2019-11-28Python3: resources and librariesJan Gelety1-9/+9
2019-10-25Introduce pre-initialize driver layerPeter Mikus1-6/+8
2019-10-19Tests: Introduce driver layerPeter Mikus1-1/+3
2019-08-21Add: 2-node ip4 oacl testsJan Gelety1-0/+1
2019-08-12Clean: Various librariesPeter Mikus1-2/+3
2019-06-25Align suite/test teardown/setupPeter Mikus1-8/+6
2019-06-21Align suite/test teardown/setupPeter Mikus1-2/+2
2019-04-08Upgrade autogen to NICs and search typesVratko Polak1-0/+144
n> h0 = (ip4_udp_lisp_gpe_header_t *) rw; /* Fixed portion of the (outer) ip4 header */ ip0 = &h0->ip4; ip0->ip_version_and_header_length = 0x45; ip0->ttl = 254; ip0->protocol = IP_PROTOCOL_UDP; /* we fix up the ip4 header length and checksum after-the-fact */ ip_address_copy_addr (&ip0->src_address, &lgt->key->lcl); ip_address_copy_addr (&ip0->dst_address, &lgt->key->rmt); ip0->checksum = ip4_header_checksum (ip0); /* UDP header, randomize src port on something, maybe? */ h0->udp.src_port = clib_host_to_net_u16 (4341); h0->udp.dst_port = clib_host_to_net_u16 (UDP_DST_PORT_lisp_gpe); /* LISP-gpe header */ lisp0 = &h0->lisp; } else { ip6_udp_lisp_gpe_header_t *h0; ip6_header_t *ip0; len = sizeof (*h0); vec_validate_aligned (rw, len - 1, CLIB_CACHE_LINE_BYTES); h0 = (ip6_udp_lisp_gpe_header_t *) rw; /* Fixed portion of the (outer) ip6 header */ ip0 = &h0->ip6; ip0->ip_version_traffic_class_and_flow_label = clib_host_to_net_u32 (0x6 << 28); ip0->hop_limit = 254; ip0->protocol = IP_PROTOCOL_UDP; /* we fix up the ip6 header length after-the-fact */ ip_address_copy_addr (&ip0->src_address, &lgt->key->lcl); ip_address_copy_addr (&ip0->dst_address, &lgt->key->rmt); /* UDP header, randomize src port on something, maybe? */ h0->udp.src_port = clib_host_to_net_u16 (4341); h0->udp.dst_port = clib_host_to_net_u16 (UDP_DST_PORT_lisp_gpe); /* LISP-gpe header */ lisp0 = &h0->lisp; } lisp0->flags = ladj->flags; if (GPE_ENCAP_VXLAN == encap_mode) /* unset P flag */ lisp0->flags &= ~LISP_GPE_FLAGS_P; lisp0->ver_res = 0; lisp0->res = 0; lisp0->next_protocol = payload_proto; lisp0->iid = clib_host_to_net_u32 (ladj->vni) >> 8; /* first 24 bits only */ return (rw); } static lisp_gpe_tunnel_t * lisp_gpe_tunnel_db_find (const lisp_gpe_tunnel_key_t * key) { uword *p; p = hash_get_mem (lisp_gpe_tunnel_db, (void *) key); if (NULL != p) { return (pool_elt_at_index (lisp_gpe_tunnel_pool, p[0])); } return (NULL); } lisp_gpe_tunnel_t * lisp_gpe_tunnel_get_i (index_t lgti) { return (pool_elt_at_index (lisp_gpe_tunnel_pool, lgti)); } index_t lisp_gpe_tunnel_find_or_create_and_lock (const locator_pair_t * pair, u32 rloc_fib_index) { lisp_gpe_tunnel_key_t key = { .lcl = pair->lcl_loc, .rmt = pair->rmt_loc, .fib_index = rloc_fib_index, }; lisp_gpe_tunnel_t *lgt; fib_prefix_t pfx; lgt = lisp_gpe_tunnel_db_find (&key); if (NULL == lgt) { pool_get (lisp_gpe_tunnel_pool, lgt); clib_memset (lgt, 0, sizeof (*lgt)); lgt->key = clib_mem_alloc (sizeof (*lgt->key)); clib_memset (lgt->key, 0, sizeof (*lgt->key)); lgt->key->rmt = pair->rmt_loc; lgt->key->lcl = pair->lcl_loc; lgt->key->fib_index = rloc_fib_index; /* * source the FIB entry for the RLOC so we can track its forwarding * chain */ ip_address_to_fib_prefix (&lgt->key->rmt, &pfx); lgt->fib_entry_index = fib_table_entry_special_add (rloc_fib_index, &pfx, FIB_SOURCE_RR, FIB_ENTRY_FLAG_NONE); hash_set_mem (lisp_gpe_tunnel_db, lgt->key, (lgt - lisp_gpe_tunnel_pool)); } lgt->locks++; return (lgt - lisp_gpe_tunnel_pool); } void lisp_gpe_tunnel_unlock (index_t lgti) { lisp_gpe_tunnel_t *lgt; lgt = lisp_gpe_tunnel_get_i (lgti); lgt->locks--; if (0 == lgt->locks) { hash_unset_mem (lisp_gpe_tunnel_db, lgt->key); clib_mem_free (lgt->key); pool_put (lisp_gpe_tunnel_pool, lgt); } } const lisp_gpe_tunnel_t * lisp_gpe_tunnel_get (index_t lgti) { return (lisp_gpe_tunnel_get_i (lgti)); } /** Format LISP-GPE tunnel. */ u8 * format_lisp_gpe_tunnel (u8 * s, va_list * args) { lisp_gpe_tunnel_t *lgt = va_arg (*args, lisp_gpe_tunnel_t *); s = format (s, "tunnel %d\n", lgt - lisp_gpe_tunnel_pool); s = format (s, " fib-index: %d, locks:%d \n", lgt->key->fib_index, lgt->locks); s = format (s, " lisp ver 0\n"); s = format (s, " locator-pair:\n"); s = format (s, " local: %U remote: %U\n", format_ip_address, &lgt->key->lcl, format_ip_address, &lgt->key->rmt); s = format (s, " RLOC FIB entry: %d\n", lgt->fib_entry_index); return s; } /** * CLI command to show LISP-GPE tunnels. */ static clib_error_t * show_lisp_gpe_tunnel_command_fn (vlib_main_t * vm, unformat_input_t * input, vlib_cli_command_t * cmd) { lisp_gpe_tunnel_t *lgt; index_t index; if (pool_elts (lisp_gpe_tunnel_pool) == 0) vlib_cli_output (vm, "No lisp-gpe tunnels configured..."); if (unformat (input, "%d", &index)) { lgt = lisp_gpe_tunnel_get_i (index); vlib_cli_output (vm, "%U", format_lisp_gpe_tunnel, lgt); } else { /* *INDENT-OFF* */ pool_foreach (lgt, lisp_gpe_tunnel_pool, ({ vlib_cli_output (vm, "%U", format_lisp_gpe_tunnel, lgt); })); /* *INDENT-ON* */ } return 0; } /* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_lisp_gpe_tunnel_command, static) = { .path = "show gpe tunnel", .function = show_lisp_gpe_tunnel_command_fn, }; /* *INDENT-ON* */ static clib_error_t * lisp_gpe_tunnel_module_init (vlib_main_t * vm) { lisp_gpe_tunnel_db = hash_create_mem (0, sizeof (lisp_gpe_tunnel_key_t), sizeof (uword)); return (NULL); } VLIB_INIT_FUNCTION (lisp_gpe_tunnel_module_init); /* * fd.io coding-style-patch-verification: ON * * Local Variables: * eval: (c-set-style "gnu") * End: */