summaryrefslogtreecommitdiffstats
path: root/src/svm
AgeCommit message (Expand)AuthorFilesLines
2017-08-29session: segment manager improvementsFlorin Coras3-25/+60
2017-08-25tcp: retransmit and multi-buffer segment fixes and improvementsFlorin Coras1-7/+7
2017-08-25jvpp: introducing callback api and future api tests for all plugins (VPP-591)Matej Perina1-1/+1
2017-08-18API: More gracefully fail when opening shared memory segment fails.Ole Troan2-6/+9
2017-08-14jvpp: make shm_prefix configurable (VPP-591)Jan Srnicek1-1/+2
2017-08-10Improve the svm fifo allocatorDave Barach4-17/+127
2017-08-10TCP proxy prototypeDave Barach3-2/+14
2017-07-31ssvm->name must be a vector containing a c-string.Dave Wallace2-3/+5
2017-07-30Make tcp active open data structures thread safeFlorin Coras1-0/+6
2017-07-17Fix unlinking of /dev/shm files.Dave Wallace4-14/+52
2017-07-15Fixes and improved tcp/session debuggingFlorin Coras2-40/+151
2017-07-11Horizontal (nSessions) scaling draftDave Barach6-59/+158
2017-07-01Refactor API message handling codeKlement Sekera2-101/+134
2017-06-22Improve svm fifo and tcp tx path performance (VPP-846)Florin Coras1-5/+90
2017-06-19Overall tcp performance improvements (VPP-846)Florin Coras3-75/+110
2017-06-09Implement sack based tcp loss recovery (RFC 6675)Florin Coras1-2/+3
2017-06-01Improve fifo allocator performanceDave Barach4-36/+168
2017-05-20Improve session debuggingFlorin Coras1-4/+5
2017-05-17VPP-846: tcp perf / scale / hardeningDave Barach1-2/+2
2017-05-09Fix remaining 32-bit compile issuesDamjan Marion2-7/+8
2017-05-03A sprinkling of const in vlibmemory/api.h and friendsNeale Ranns3-9/+9
2017-05-01TCP ooo reception fixesFlorin Coras2-75/+70
2017-04-24Session layer improvementsFlorin Coras5-61/+82
2017-04-19Add more svm fifo unit testsFlorin Coras1-54/+46
2017-04-18Fix fifo ooo bugs and improve testingDave Barach2-38/+109
2017-04-13Session layer refactoringFlorin Coras3-52/+60
2017-04-02TCP cc/window management fixes and debuggingFlorin Coras2-19/+26
2017-03-27TCP/session improvementsFlorin Coras3-20/+47
2017-03-04Cleanup URI code and TCP bugfixingFlorin Coras1-3/+3
2017-03-01VPP-598: tcp stack initial commitDave Barach7-7/+1395
2016-12-28Reorganize source tree to use single autotools instanceDamjan Marion11-0/+4006
gt; #include <vnet/ip/ip.h> uword unformat_sw_if_index (unformat_input_t * input, va_list * args) { vat_main_t *vam = va_arg (*args, vat_main_t *); u32 *result = va_arg (*args, u32 *); u8 *if_name; uword *p; if (!unformat (input, "%s", &if_name)) return 0; p = hash_get_mem (vam->sw_if_index_by_interface_name, if_name); if (p == 0) return 0; *result = p[0]; return 1; } /* Parse an IP4 address %d.%d.%d.%d. */ uword unformat_ip4_address (unformat_input_t * input, va_list * args) { u8 *result = va_arg (*args, u8 *); unsigned a[4]; if (!unformat (input, "%d.%d.%d.%d", &a[0], &a[1], &a[2], &a[3])) return 0; if (a[0] >= 256 || a[1] >= 256 || a[2] >= 256 || a[3] >= 256) return 0; result[0] = a[0]; result[1] = a[1]; result[2] = a[2]; result[3] = a[3]; return 1; } uword unformat_ethernet_address (unformat_input_t * input, va_list * args) { u8 *result = va_arg (*args, u8 *); u32 i, a[6]; if (!unformat (input, "%_%x:%x:%x:%x:%x:%x%_", &a[0], &a[1], &a[2], &a[3], &a[4], &a[5])) return 0; /* Check range. */ for (i = 0; i < 6; i++) if (a[i] >= (1 << 8)) return 0; for (i = 0; i < 6; i++) result[i] = a[i]; return 1; } /* Returns ethernet type as an int in host byte order. */ uword unformat_ethernet_type_host_byte_order (unformat_input_t * input, va_list * args) { u16 *result = va_arg (*args, u16 *); int type; /* Numeric type. */ if (unformat (input, "0x%x", &type) || unformat (input, "%d", &type)) { if (type >= (1 << 16)) return 0; *result = type; return 1; } return 0; } /* Parse an IP6 address. */ uword unformat_ip6_address (unformat_input_t * input, va_list * args) { ip6_address_t *result = va_arg (*args, ip6_address_t *); u16 hex_quads[8]; uword hex_quad, n_hex_quads, hex_digit, n_hex_digits; uword c, n_colon, double_colon_index; n_hex_quads = hex_quad = n_hex_digits = n_colon = 0; double_colon_index = ARRAY_LEN (hex_quads); while ((c = unformat_get_input (input)) != UNFORMAT_END_OF_INPUT) { hex_digit = 16; if (c >= '0' && c <= '9') hex_digit = c - '0'; else if (c >= 'a' && c <= 'f') hex_digit = c + 10 - 'a'; else if (c >= 'A' && c <= 'F') hex_digit = c + 10 - 'A'; else if (c == ':' && n_colon < 2) n_colon++; else { unformat_put_input (input); break; } /* Too many hex quads. */ if (n_hex_quads >= ARRAY_LEN (hex_quads)) return 0; if (hex_digit < 16) { hex_quad = (hex_quad << 4) | hex_digit; /* Hex quad must fit in 16 bits. */ if (n_hex_digits >= 4) return 0; n_colon = 0; n_hex_digits++; } /* Save position of :: */ if (n_colon == 2) { /* More than one :: ? */ if (double_colon_index < ARRAY_LEN (hex_quads)) return 0; double_colon_index = n_hex_quads; } if (n_colon > 0 && n_hex_digits > 0) { hex_quads[n_hex_quads++] = hex_quad; hex_quad = 0; n_hex_digits = 0; } } if (n_hex_digits > 0) hex_quads[n_hex_quads++] = hex_quad; { word i; /* Expand :: to appropriate number of zero hex quads. */ if (double_colon_index < ARRAY_LEN (hex_quads)) { word n_zero = ARRAY_LEN (hex_quads) - n_hex_quads; for (i = n_hex_quads - 1; i >= (signed) double_colon_index; i--) hex_quads[n_zero + i] = hex_quads[i]; for (i = 0; i < n_zero; i++) hex_quads[double_colon_index + i] = 0; n_hex_quads = ARRAY_LEN (hex_quads); } /* Too few hex quads given. */ if (n_hex_quads < ARRAY_LEN (hex_quads)) return 0; for (i = 0; i < ARRAY_LEN (hex_quads); i++) result->as_u16[i] = clib_host_to_net_u16 (hex_quads[i]); return 1; } } u8 * format_ip4_address (u8 * s, va_list * args) { u8 *a = va_arg (*args, u8 *); return format (s, "%d.%d.%d.%d", a[0], a[1], a[2], a[3]); } u8 * format_ip6_address (u8 * s, va_list * args) { ip6_address_t *a = va_arg (*args, ip6_address_t *); u32 i, i_max_n_zero, max_n_zeros, i_first_zero, n_zeros, last_double_colon; i_max_n_zero = ARRAY_LEN (a->as_u16); max_n_zeros = 0; i_first_zero = i_max_n_zero; n_zeros = 0; for (i = 0; i < ARRAY_LEN (a->as_u16); i++) { u32 is_zero = a->as_u16[i] == 0; if (is_zero && i_first_zero >= ARRAY_LEN (a->as_u16)) { i_first_zero = i; n_zeros = 0; } n_zeros += is_zero; if ((!is_zero && n_zeros > max_n_zeros) || (i + 1 >= ARRAY_LEN (a->as_u16) && n_zeros > max_n_zeros)) { i_max_n_zero = i_first_zero; max_n_zeros = n_zeros; i_first_zero = ARRAY_LEN (a->as_u16); n_zeros = 0; } } last_double_colon = 0; for (i = 0; i < ARRAY_LEN (a->as_u16); i++) { if (i == i_max_n_zero && max_n_zeros > 1) { s = format (s, "::"); i += max_n_zeros - 1; last_double_colon = 1; } else { s = format (s, "%s%x", (last_double_colon || i == 0) ? "" : ":", clib_net_to_host_u16 (a->as_u16[i])); last_double_colon = 0; } } return s; } /* Format an IP46 address. */ u8 * format_ip46_address (u8 * s, va_list * args) { ip46_address_t *ip46 = va_arg (*args, ip46_address_t *); ip46_type_t type = va_arg (*args, ip46_type_t); int is_ip4 = 1; switch (type) { case IP46_TYPE_ANY: is_ip4 = ip46_address_is_ip4 (ip46); break; case IP46_TYPE_IP4: is_ip4 = 1; break; case IP46_TYPE_IP6: is_ip4 = 0; break; } return is_ip4 ? format (s, "%U", format_ip4_address, &ip46->ip4) : format (s, "%U", format_ip6_address, &ip46->ip6); } u8 * format_ethernet_address (u8 * s, va_list * args) { u8 *a = va_arg (*args, u8 *); return format (s, "%02x:%02x:%02x:%02x:%02x:%02x", a[0], a[1], a[2], a[3], a[4], a[5]); } void vat_plugin_api_reference (void) { } /* * fd.io coding-style-patch-verification: ON * * Local Variables: * eval: (c-set-style "gnu") * End: */