aboutsummaryrefslogtreecommitdiffstats
path: root/src/vppinfra
AgeCommit message (Expand)AuthorFilesLines
2018-06-08Time range support for vppinfraDave Barach3-0/+781
2018-06-05VPP API: Memory traceOle Troan4-3/+27
2018-06-04Configure or deduce CLIB_LOG2_CACHE_LINE_BYTES (VPP-1064)Dave Barach1-1/+4
2018-06-02AVF input node reworkDamjan Marion1-0/+3
2018-05-30Fix clang compilation on aarch64: value size does not match register size.Sirshak Das1-1/+1
2018-05-30vppinfra: explicitely state for signed types that they are signedDamjan Marion2-9/+9
2018-05-29Add VLIB_NODE_FN() macro to simplify multiversioning of node functionsDamjan Marion1-2/+25
2018-05-28Change optimizaton level from tree-vectorize to O3Damjan Marion1-1/+1
2018-05-28Fix flowhash size computation for very large hash tablesPierre Pfister1-1/+1
2018-05-25bond: performance harvestingSteven2-0/+71
2018-05-25Vectorized bihash_{48,40,24,16}_8 key compareDamjan Marion6-24/+83
2018-05-22vppinfra: add clib_count_equal_uXX and clib_memset_uXX functionsDamjan Marion4-5/+339
2018-05-20vector functions cleanup and improvementsDamjan Marion7-93/+97
2018-05-19Disable vector code in vlib_buffer_enqueue_to_next if no msb mask functionDamjan Marion1-0/+2
2018-05-18Add vlib_buffer_enqueue_to_next inline functionDamjan Marion3-1/+22
2018-05-17Add buffer pointer-to-index and index-to-pointer array functionsDamjan Marion1-0/+22
2018-05-11Periodic scan and probe of IP neighbors to maintain neighbor poolsJohn Lo2-0/+6
2018-05-11VPP-1275 Fix memory leaks in IPsec CLIKlement Sekera1-1/+1
2018-05-10vppinfra: use count_trailing_zeros in sparse_vec_indexDamjan Marion3-68/+30
2018-05-10vppinfra: use popcnt instruction when availableDamjan Marion1-0/+8
2018-05-09dpdk: tx code reworkDamjan Marion1-0/+12
2018-05-05autodetect alignment during _vec_resizeDamjan Marion5-8/+12
2018-05-04Harmonize vec/pool_get_aligned object sizes and alignment requestsDave Barach2-0/+4
2018-04-30Remove historical README fileDave Barach1-43/+0
2018-04-25dpdk: complete rework of the dpdk-input nodeDamjan Marion4-5/+149
2018-04-18vppinfra: make set_mempolicy failure non-critical unless NUMA_FORCE is setDamjan Marion1-1/+2
2018-04-11Clean up temp dir in failure casesDave Barach1-0/+3
2018-03-22Add circular loggingDave Barach3-21/+85
2018-03-12Remove md5.[ch] from vppinfraDave Barach3-515/+0
2018-03-09Correct address calculation for VPP-1168Lee Roberts1-1/+1
2018-03-06glibc 2.27 fixMarco Varlese1-0/+2
2018-03-04vppinfra: fix clib_mem_vm_ext_alloc non-shared allocationsDamjan Marion2-3/+9
2018-02-26Added u8x16,u32x4,u64x2 variants of _zero_byte_mask(x) for ARM/NEON platform....Adrian Oanca1-0/+20
2018-02-24u8x16_compare_byte_mask - optimize to use 128bit registers as suggested by Ni...Adrian Oanca1-24/+9
2018-02-23Add prefetch inlines, update bi-hash doc tagsDave Barach2-12/+90
2018-02-22bihash table size perf/scale improvementsDave Barach3-41/+73
2018-02-21vppinfra: change default cache line size 64 bytesDamjan Marion1-10/+2
2018-02-21vppinfra: remove vector_iwmmxt.hDamjan Marion2-126/+0
2018-02-21add 'is_all_zero(x)' for NEONAdrian Oanca1-0/+24
2018-02-20vppinfra: autogerate vector typedefs and basic inline functionsDamjan Marion5-379/+83
2018-02-20Reset expired timer vector length after callbackDave Barach1-1/+4
2018-02-20vppinfra: CLIB_HAVE_VEC128 mandates SSE4.2Damjan Marion2-9/+3
2018-02-19Use neutral vector code for ethernet_frame_is_taggedDamjan Marion1-0/+25
2018-02-18fix format_hexdumpDamjan Marion1-1/+2
2018-02-14vppinfra: Remove empty fileMohsin Kazmi1-0/+0
2018-02-09GBP pluginNeale Ranns1-0/+0
2018-02-08add CLIB_HAVE_VEC128 with NEON intrinsics (VPP-1127)Gabriel Ganne2-8/+64
2018-02-08Minimize bihash memory consumptionDave Barach3-118/+207
2018-02-06vlib: epoll on worker threadsDamjan Marion1-0/+25
2018-02-06Provide page-aligned length to ftruncate.Igor Mikhailov (imichail)1-1/+1
_main(), sw_if_index); break; case VNET_API_ERROR_IF_ALREADY_EXISTS: error = clib_error_return(0, "IPIP tunnel already exists..."); goto done; case VNET_API_ERROR_NO_SUCH_FIB: error = clib_error_return(0, "outer fib ID %d doesn't exist\n", fib_index); goto done; case VNET_API_ERROR_NO_SUCH_ENTRY: error = clib_error_return(0, "IPIP tunnel doesn't exist"); goto done; case VNET_API_ERROR_INSTANCE_IN_USE: error = clib_error_return(0, "Instance is in use"); goto done; case VNET_API_ERROR_INVALID_DST_ADDRESS: error = clib_error_return(0, "destination IP address when mode is multi-point"); goto done; default: error = clib_error_return(0, "vnet_ipip_add_del_tunnel returned %d", rv); goto done; } done: unformat_free(line_input); return error; } static clib_error_t *delete_ipip_tunnel_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd) { unformat_input_t _line_input, *line_input = &_line_input; int rv; u32 num_m_args = 0; u32 sw_if_index = ~0; clib_error_t *error = NULL; /* Get a line of input. */ if (!unformat_user(input, unformat_line_input, line_input)) return 0; while (unformat_check_input(line_input) != UNFORMAT_END_OF_INPUT) { if (unformat(line_input, "sw_if_index %d", &sw_if_index)) num_m_args++; else { error = clib_error_return(0, "unknown input `%U'", format_unformat_error, line_input); goto done; } } if (num_m_args < 1) { error = clib_error_return(0, "mandatory argument(s) missing"); goto done; } rv = ipip_del_tunnel(sw_if_index); printf("RV %d\n", rv); done: unformat_free(line_input); return error; } /* *INDENT-OFF* */ VLIB_CLI_COMMAND(create_ipip_tunnel_command, static) = { .path = "create ipip tunnel", .short_help = "create ipip tunnel src <addr> dst <addr> [instance <n>] " "[outer-table-id <ID>]", .function = create_ipip_tunnel_command_fn, }; VLIB_CLI_COMMAND(delete_ipip_tunnel_command, static) = { .path = "delete ipip tunnel", .short_help = "delete ipip tunnel sw_if_index <sw_if_index>", .function = delete_ipip_tunnel_command_fn, }; /* *INDENT-ON* */ static u8 *format_ipip_tunnel(u8 *s, va_list *args) { ipip_tunnel_t *t = va_arg(*args, ipip_tunnel_t *); ip46_type_t type = (t->transport == IPIP_TRANSPORT_IP4) ? IP46_TYPE_IP4 : IP46_TYPE_IP6; u32 table_id; table_id = fib_table_get_table_id(t->fib_index, fib_proto_from_ip46(type)); switch (t->mode) { case IPIP_MODE_6RD: s = format(s, "[%d] 6rd src %U ip6-pfx %U/%d ", t->dev_instance, format_ip46_address, &t->tunnel_src, type, format_ip6_address, &t->sixrd.ip6_prefix, t->sixrd.ip6_prefix_len); break; case IPIP_MODE_P2P: s = format(s, "[%d] instance %d src %U dst %U ", t->dev_instance, t->user_instance, format_ip46_address, &t->tunnel_src, type, format_ip46_address, &t->tunnel_dst, type); break; case IPIP_MODE_P2MP: s = format(s, "[%d] instance %d p2mp src %U ", t->dev_instance, t->user_instance, format_ip46_address, &t->tunnel_src, type); break; } s = format(s, "table-ID %d sw-if-idx %d flags [%U] dscp %U", table_id, t->sw_if_index, format_tunnel_encap_decap_flags, t->flags, format_ip_dscp, t->dscp); return s; } static clib_error_t *show_ipip_tunnel_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd) { ipip_main_t *gm = &ipip_main; ipip_tunnel_t *t; u32 ti = ~0; if (pool_elts(gm->tunnels) == 0) vlib_cli_output(vm, "No IPIP tunnels configured..."); while (unformat_check_input(input) != UNFORMAT_END_OF_INPUT) { if (unformat(input, "%d", &ti)) ; else break; } if (ti == ~0) { /* *INDENT-OFF* */ pool_foreach(t, gm->tunnels, ({vlib_cli_output(vm, "%U", format_ipip_tunnel, t); })); /* *INDENT-ON* */ } else { t = pool_elt_at_index(gm->tunnels, ti); if (t) vlib_cli_output(vm, "%U", format_ipip_tunnel, t); } return 0; } /* *INDENT-OFF* */ VLIB_CLI_COMMAND(show_ipip_tunnel_command, static) = { .path = "show ipip tunnel", .function = show_ipip_tunnel_command_fn, }; /* *INDENT-ON* */ static u8 * format_ipip_tunnel_key (u8 *s, va_list *args) { ipip_tunnel_key_t *t = va_arg(*args, ipip_tunnel_key_t *); s = format (s, "src:%U dst:%U fib:%d transport:%d mode:%d", format_ip46_address, &t->src, IP46_TYPE_ANY, format_ip46_address, &t->dst, IP46_TYPE_ANY, t->fib_index, t->transport, t->mode); return (s); } static clib_error_t * ipip_tunnel_hash_show (vlib_main_t * vm, unformat_input_t * input, vlib_cli_command_t * cmd) { ipip_main_t *im = &ipip_main; ipip_tunnel_key_t *key; u32 index; /* *INDENT-OFF* */ hash_foreach(key, index, im->tunnel_by_key, ({ vlib_cli_output (vm, " %U -> %d", format_ipip_tunnel_key, key, index); })); /* *INDENT-ON* */ return NULL; } /** * show IPSEC tunnel protection hash tables */ /* *INDENT-OFF* */ VLIB_CLI_COMMAND (ipip_tunnel_hash_show_node, static) = { .path = "show ipip tunnel-hash", .function = ipip_tunnel_hash_show, .short_help = "show ipip tunnel-hash", }; /* *INDENT-ON* */ static clib_error_t *create_sixrd_tunnel_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd) { unformat_input_t _line_input, *line_input = &_line_input; ip4_address_t ip4_prefix; ip6_address_t ip6_prefix; ip4_address_t ip4_src; u32 ip6_prefix_len = 0, ip4_prefix_len = 0, sixrd_tunnel_index; u32 num_m_args = 0; /* Optional arguments */ u32 ip4_table_id = 0, ip4_fib_index; u32 ip6_table_id = 0, ip6_fib_index; clib_error_t *error = 0; bool security_check = false; int rv; /* Get a line of input. */ if (!unformat_user(input, unformat_line_input, line_input)) return 0; while (unformat_check_input(line_input) != UNFORMAT_END_OF_INPUT) { if (unformat(line_input, "security-check")) security_check = true; else if (unformat(line_input, "ip6-pfx %U/%d", unformat_ip6_address, &ip6_prefix, &ip6_prefix_len)) num_m_args++; else if (unformat(line_input, "ip4-pfx %U/%d", unformat_ip4_address, &ip4_prefix, &ip4_prefix_len)) num_m_args++; else if (unformat(line_input, "ip4-src %U", unformat_ip4_address, &ip4_src)) num_m_args++; else if (unformat(line_input, "ip4-table-id %d", &ip4_table_id)) ; else if (unformat(line_input, "ip6-table-id %d", &ip6_table_id)) ; else { error = clib_error_return(0, "unknown input `%U'", format_unformat_error, line_input); goto done; } } if (num_m_args < 3) { error = clib_error_return(0, "mandatory argument(s) missing"); goto done; } ip4_fib_index = fib_table_find(FIB_PROTOCOL_IP4, ip4_table_id); ip6_fib_index = fib_table_find(FIB_PROTOCOL_IP6, ip6_table_id); if (~0 == ip4_fib_index) { error = clib_error_return(0, "No such IP4 table %d", ip4_table_id); rv = VNET_API_ERROR_NO_SUCH_FIB; } else if (~0 == ip6_fib_index) { error = clib_error_return(0, "No such IP6 table %d", ip6_table_id); rv = VNET_API_ERROR_NO_SUCH_FIB; } else { rv = sixrd_add_tunnel(&ip6_prefix, ip6_prefix_len, &ip4_prefix, ip4_prefix_len, &ip4_src, security_check, ip4_fib_index, ip6_fib_index, &sixrd_tunnel_index); if (rv) error = clib_error_return(0, "adding tunnel failed %d", rv); } done: unformat_free(line_input); return error; } static clib_error_t *delete_sixrd_tunnel_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd) { unformat_input_t _line_input, *line_input = &_line_input; u32 num_m_args = 0; /* Optional arguments */ clib_error_t *error = 0; u32 sw_if_index = ~0; /* Get a line of input. */ if (!unformat_user(input, unformat_line_input, line_input)) return 0; while (unformat_check_input(line_input) != UNFORMAT_END_OF_INPUT) { if (unformat(line_input, "sw_if_index %d", &sw_if_index)) num_m_args++; else { error = clib_error_return(0, "unknown input `%U'", format_unformat_error, line_input); goto done; } } if (num_m_args < 1) { error = clib_error_return(0, "mandatory argument(s) missing"); goto done; } int rv = sixrd_del_tunnel(sw_if_index); printf("RV %d\n", rv); done: unformat_free(line_input); return error; } /* *INDENT-OFF* */ VLIB_CLI_COMMAND(create_sixrd_tunnel_command, static) = { .path = "create 6rd tunnel", .short_help = "create 6rd tunnel ip6-pfx <ip6-pfx> ip4-pfx <ip4-pfx> " "ip4-src <ip4-addr> ip4-table-id <ID> ip6-table-id <ID> " "[security-check]", .function = create_sixrd_tunnel_command_fn, }; VLIB_CLI_COMMAND(delete_sixrd_tunnel_command, static) = { .path = "delete 6rd tunnel", .short_help = "delete 6rd tunnel sw_if_index <sw_if_index>", .function = delete_sixrd_tunnel_command_fn, }; /* *INDENT-ON* */