aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Expand)AuthorFilesLines
2019-04-08Remove lbdpdk perf testsPeter Mikus8-1244/+0
2019-04-03Remove obsolete FDS testsJan Gelety3-683/+0
2019-04-07FIX: Qemu set affinity bugPeter Mikus1-39/+30
2019-04-06FIX: Operational issuesPeter Mikus46-200/+87
2019-04-05Fixes for Taishan testbedjuraj.linkes49-6051/+36
2019-04-05Add vpp-api-python for honeycomb testsMichal Cmarada2-9/+9
2019-04-04Trending: Remove NF tests from alertsTibor Frank1-15/+0
2019-04-04Trending: AlertsTibor Frank5-84/+385
2019-04-03Change 2 node Denverton testbed descriptionYulong Pei1-4/+5
2019-04-02Update draft-vpolak-mkonstan-bmwg-mlrsearch-00->01.Maciek Konstantynowicz1-72/+74
2019-04-02Trending: Remove invalid builds (3n-skx 356-372)Tibor Frank1-1/+69
2019-04-01CSIT-1412: Create trending graphs for svc densityTibor Frank8-55/+576
2019-04-01CSIT-1337: Migrate L2Util library from VAT to PAPIJan Gelety6-180/+339
2019-03-27FIX: change socket location for vhost-user interfaceJan Gelety37-74/+74
2019-03-28Add ipsec crypto test for Denverton platformYulong Pei45-41/+4003
2019-03-28Re-enabling Honeycomb two IPs same subnet testsMichal Cmarada1-35/+29
2019-03-28Report: Configure 1901.1.13Tibor Frank3-2/+5
2019-03-28Fix Tap failing testsMichal Cmarada9-50/+85
2019-03-27CSIT-1460: Add VPP-stats to PAPI ProviderTibor Frank4-231/+380
2019-03-26Fix virl ubuntu image + update ubuntu vpp buildsJan Gelety11-114/+129
2019-03-26Report: Update vpp perf tests release notesJan Gelety1-2/+2
2019-03-26FIX: Do not restart VPP immediately after VPP installationJan Gelety4-1/+4
2019-03-25Trending: Set the last build for dpdk-3n-skxTibor Frank1-21/+21
2019-03-25Trending: Set the last build for dpdk-3n-skxTibor Frank1-3/+3
2019-03-25Trending: Fix vpp-refTibor Frank1-1/+1
2019-03-25Trending: Reduce the amount of downloaded dataTibor Frank1-18/+18
2019-03-25Trending: Fix vpp-refTibor Frank1-1/+2
2019-03-21Remove main.py as it is confusingPeter Mikus1-233/+0
2019-03-21Update and reorder tox.ini TODOsVratko Polak1-3/+3
2019-03-21Convert functional tests to statefull QemuUtilsPeter Mikus20-78/+33
2019-03-21Report: Add note about nr of test runsTibor Frank1-0/+7
2019-03-20CSIT-1386 KernelVM - Part IIPeter Mikus47-110/+5546
2019-03-20ietf draft: nfv service density rev. -00Maciek Konstantynowicz1-0/+874
2019-03-20Add tox checker for lengths of new lines onlyVratko Polak3-12/+67
2019-03-19Update of VPP_STABLE_VERJan Gelety3-3/+3
2019-03-19Report: Remove VNFTibor Frank8-19/+194
2019-03-19Report: Configure 1901.1Tibor Frank3-3/+3
2019-03-18CSIT-1386 KernelVM - Part IPeter Mikus183-903/+484
2019-03-18PAPI Executor: Add more desciptive error messageTibor Frank1-1/+6
2019-03-17Prepare image for KernelVM on machines.Peter Mikus2-2/+21
2019-03-16FIX: Ansible warnings of deprecationPeter Mikus7-56/+50
2019-03-15Report: Fix the information about 2-Node Atom DenvertonTibor Frank2-3/+3
2019-03-15PAPI: Add verification of the responseTibor Frank2-39/+143
2019-03-14Adding pip and apt packages - ubuntu16.04Jan Gelety5-2/+396
2019-03-14Papi: Back to python2, add aenumTibor Frank2-1/+2
2019-03-14CSIT-1461: Edit VPP Release notesTibor Frank1-12/+9
2019-03-14Report: Add Denverton static contentTibor Frank15-29/+53
2019-03-14Report: Add Denverton dataTibor Frank1-1/+1
2019-03-14Trending: Reduce the amount of downloaded dataTibor Frank2-36/+36
2019-03-14Add PAPI dependenciesPeter Mikus12-102/+57
/span>; struct snat_main_s; typedef u32 snat_icmp_match_function_t (struct snat_main_s *sm, vlib_node_runtime_t *node, u32 thread_index, vlib_buffer_t *b0, snat_session_key_t *p_key, snat_session_key_t *p_value, u8 *p_dont_translate, void *d); typedef u32 (snat_get_worker_function_t) (ip4_header_t * ip, u32 rx_fib_index); typedef struct snat_main_s { /* Main lookup tables */ clib_bihash_8_8_t out2in; clib_bihash_8_8_t in2out; /* Find-a-user => src address lookup */ clib_bihash_8_8_t user_hash; /* Non-translated packets worker lookup => src address + VRF */ clib_bihash_8_8_t worker_by_in; /* Translated packets worker lookup => IP address + port number */ clib_bihash_8_8_t worker_by_out; snat_icmp_match_function_t * icmp_match_in2out_cb; snat_icmp_match_function_t * icmp_match_out2in_cb; u32 num_workers; u32 first_worker_index; u32 next_worker; u32 * workers; snat_get_worker_function_t * worker_in2out_cb; snat_get_worker_function_t * worker_out2in_cb; /* Per thread data */ snat_main_per_thread_data_t * per_thread_data; /* Find a static mapping by local */ clib_bihash_8_8_t static_mapping_by_local; /* Find a static mapping by external */ clib_bihash_8_8_t static_mapping_by_external; /* Static mapping pool */ snat_static_mapping_t * static_mappings; /* Interface pool */ snat_interface_t * interfaces; /* Vector of outside addresses */ snat_address_t * addresses; /* sw_if_indices whose intfc addresses should be auto-added */ u32 * auto_add_sw_if_indices; /* vector of interface address static mappings to resolve. */ snat_static_map_resolve_t *to_resolve; /* Randomize port allocation order */ u32 random_seed; /* Worker handoff index */ u32 fq_in2out_index; u32 fq_out2in_index; /* in2out and out2in node index */ u32 in2out_node_index; u32 out2in_node_index; /* Deterministic NAT */ snat_det_map_t * det_maps; /* Config parameters */ u8 static_mapping_only; u8 static_mapping_connection_tracking; u8 deterministic; u32 translation_buckets; u32 translation_memory_size; u32 user_buckets; u32 user_memory_size; u32 max_translations_per_user; u32 outside_vrf_id; u32 outside_fib_index; u32 inside_vrf_id; u32 inside_fib_index; /* tenant VRF aware address pool activation flag */ u8 vrf_mode; /* API message ID base */ u16 msg_id_base; /* convenience */ vlib_main_t * vlib_main; vnet_main_t * vnet_main; ip4_main_t * ip4_main; ip_lookup_main_t * ip4_lookup_main; api_main_t * api_main; } snat_main_t; extern snat_main_t snat_main; extern vlib_node_registration_t snat_in2out_node; extern vlib_node_registration_t snat_out2in_node; extern vlib_node_registration_t snat_in2out_fast_node; extern vlib_node_registration_t snat_out2in_fast_node; extern vlib_node_registration_t snat_in2out_worker_handoff_node; extern vlib_node_registration_t snat_out2in_worker_handoff_node; extern vlib_node_registration_t snat_det_in2out_node; extern vlib_node_registration_t snat_det_out2in_node; void snat_free_outside_address_and_port (snat_main_t * sm, snat_session_key_t * k, u32 address_index); int snat_alloc_outside_address_and_port (snat_main_t * sm, u32 fib_index, snat_session_key_t * k, u32 * address_indexp); int snat_static_mapping_match (snat_main_t * sm, snat_session_key_t match, snat_session_key_t * mapping, u8 by_external); void snat_add_del_addr_to_fib (ip4_address_t * addr, u8 p_len, u32 sw_if_index, int is_add); format_function_t format_snat_user; typedef struct { u32 cached_sw_if_index; u32 cached_ip4_address; } snat_runtime_t; /** \brief Check if SNAT session is created from static mapping. @param s SNAT session @return 1 if SNAT session is created from static mapping otherwise 0 */ #define snat_is_session_static(s) s->flags & SNAT_SESSION_FLAG_STATIC_MAPPING /* * Why is this here? Because we don't need to touch this layer to * simply reply to an icmp. We need to change id to a unique * value to NAT an echo request/reply. */ typedef struct { u16 identifier; u16 sequence; } icmp_echo_header_t; always_inline snat_protocol_t ip_proto_to_snat_proto (u8 ip_proto) { snat_protocol_t snat_proto = ~0; snat_proto = (ip_proto == IP_PROTOCOL_UDP) ? SNAT_PROTOCOL_UDP : snat_proto; snat_proto = (ip_proto == IP_PROTOCOL_TCP) ? SNAT_PROTOCOL_TCP : snat_proto; snat_proto = (ip_proto == IP_PROTOCOL_ICMP) ? SNAT_PROTOCOL_ICMP : snat_proto; return snat_proto; } always_inline u8 snat_proto_to_ip_proto (snat_protocol_t snat_proto) { u8 ip_proto = ~0; ip_proto = (snat_proto == SNAT_PROTOCOL_UDP) ? IP_PROTOCOL_UDP : ip_proto; ip_proto = (snat_proto == SNAT_PROTOCOL_TCP) ? IP_PROTOCOL_TCP : ip_proto; ip_proto = (snat_proto == SNAT_PROTOCOL_ICMP) ? IP_PROTOCOL_ICMP : ip_proto; return ip_proto; } typedef struct { u16 src_port, dst_port; } tcp_udp_header_t; u32 icmp_match_in2out_fast(snat_main_t *sm, vlib_node_runtime_t *node, u32 thread_index, vlib_buffer_t *b0, snat_session_key_t *p_key, snat_session_key_t *p_value, u8 *p_dont_translate, void *d); u32 icmp_match_in2out_slow(snat_main_t *sm, vlib_node_runtime_t *node, u32 thread_index, vlib_buffer_t *b0, snat_session_key_t *p_key, snat_session_key_t *p_value, u8 *p_dont_translate, void *d); u32 icmp_match_out2in_fast(snat_main_t *sm, vlib_node_runtime_t *node, u32 thread_index, vlib_buffer_t *b0, snat_session_key_t *p_key, snat_session_key_t *p_value, u8 *p_dont_translate, void *d); u32 icmp_match_out2in_slow(snat_main_t *sm, vlib_node_runtime_t *node, u32 thread_index, vlib_buffer_t *b0, snat_session_key_t *p_key, snat_session_key_t *p_value, u8 *p_dont_translate, void *d); static_always_inline u8 icmp_is_error_message (icmp46_header_t * icmp) { switch(icmp->type) { case ICMP4_destination_unreachable: case ICMP4_time_exceeded: case ICMP4_parameter_problem: case ICMP4_source_quench: case ICMP4_redirect: case ICMP4_alternate_host_address: return 1; } return 0; } #endif /* __included_snat_h__ */