aboutsummaryrefslogtreecommitdiffstats
path: root/tests/vpp
AgeCommit message (Expand)AuthorFilesLines
2019-06-20perf ipsec: test renamingMaciek Konstantynowicz54-918/+918
2019-06-18CSIT-1459: Migrate IP libraries from VAT to PAPIJan Gelety46-964/+1076
2019-06-19Add scale ipsec tunnel testsPeter Mikus36-218/+1300
2019-06-14FIX: IPsec Functional teardownPeter Mikus4-6/+6
2019-06-10vpp_device: TAPPeter Mikus8-700/+19
2019-06-10vpp_device: IPsecPeter Mikus33-6489/+486
2019-06-09CSIT-1521 Convert NestedVM testcase into KernelVMPeter Mikus24-1121/+239
2019-06-05Even more Crypto combinationsPeter Mikus44-304/+2058
2019-05-31CSIT-1468: InterfaceUtil migration from VAT to PAPIJan Gelety7-4/+13
2019-05-23FIX: IPsec typoPeter Mikus4-4/+4
2019-05-23CSIT-1507: Rework IPsec base testcasesPeter Mikus17-162/+1404
2019-05-23CSIT-1506: Rework IPsec base testcasesPeter Mikus16-140/+1391
2019-05-20FIX2: VTS cpu listJan Gelety3-3/+3
2019-05-20FIX: VTS cpu listJan Gelety3-9/+9
2019-05-16Tests: Add IPSEC SW scale testsTibor Frank4-0/+648
2019-05-15Fix teardown keyword for wrk testVratko Polak1-1/+1
2019-05-13Remove CFSRR1 VM testsPeter Mikus6-870/+0
2019-05-09Remove old VPP Restart sequencePeter Mikus3-3/+3
2019-05-09Add new higher density NF testsPeter Mikus12-0/+1584
2019-05-06CSIT-1493 VPP restart handling codePeter Mikus3-3/+0
2019-04-26NF density tests with dtc=0.5 and dtcr=2Peter Mikus136-3452/+9083
2019-04-24FIX: Crypto testsPeter Mikus6-12/+18
2019-04-23FIX: TAP tests fix 2Jan Gelety3-5/+5
2019-04-23FIX: Create TAP interface after API changeJan Gelety1-8/+6
2019-04-23FIX: VTS pinning issue.Peter Mikus3-6/+6
2019-04-16Add 2n AVF testsPeter Mikus3-0/+350
2019-04-15Remove obsolete QEMU installationPeter Mikus1-3/+0
2019-04-12Convert existing nf_density testpmd-mac into KernelVMPeter Mikus19-114/+57
2019-04-08Upgrade autogen to NICs and search typesVratko Polak841-84215/+7992
2019-04-08Remove lbdpdk perf testsPeter Mikus8-1244/+0
2019-04-03Remove obsolete FDS testsJan Gelety2-666/+0
2019-04-06FIX: Operational issuesPeter Mikus43-152/+49
2019-04-05Fixes for Taishan testbedjuraj.linkes44-6021/+0
2019-04-01CSIT-1337: Migrate L2Util library from VAT to PAPIJan Gelety1-0/+5
2019-03-27FIX: change socket location for vhost-user interfaceJan Gelety36-72/+72
2019-03-28Add ipsec crypto test for Denverton platformYulong Pei42-18/+3964
2019-03-26Fix virl ubuntu image + update ubuntu vpp buildsJan Gelety4-0/+10
2019-03-26FIX: Do not restart VPP immediately after VPP installationJan Gelety3-0/+3
2019-03-21Convert functional tests to statefull QemuUtilsPeter Mikus17-37/+21
2019-03-20CSIT-1386 KernelVM - Part IIPeter Mikus38-0/+5053
2019-03-18CSIT-1386 KernelVM - Part IPeter Mikus176-216/+25
2019-03-07FIX: Use correct MRR tagJan Gelety1-1/+1
2019-03-06CSIT-1451: PapiHistoryTibor Frank2-4/+4
2019-03-06add vxlan perf test cases for Intel-X553 of Denverton platformYulong Pei2-0/+262
2019-03-01Add ARM Taishan testbed33 perftestStanislav Chlebec44-0/+6021
2019-02-26FIX: ipsec + vpp stable version updateJan Gelety8-19/+50
2019-02-19Adapt autogen for SFd testsVratko Polak78-33/+24
2019-02-09Remove VHOST 256qsize tests.Peter Mikus31-4325/+0
2019-02-08CSIT-845 Capture VPP core-dump from vpp crash on DUTsPeter Mikus2-11/+14
2019-02-06FIX: Set ipsec backend to dpdk backend when aes-gcm cipher usedJan Gelety12-0/+60
class="n">ndh->icmp.type != ICMP6_neighbor_solicitation && ndh->icmp.type != ICMP6_neighbor_advertisement) return 0; if (PREDICT_FALSE ((node->flags & VLIB_NODE_FLAG_TRACE) && (p0->flags & VLIB_BUFFER_IS_TRACED))) { u8 *t0 = vlib_add_trace (vm, node, p0, sizeof (icmp6_input_trace_t)); clib_memcpy (t0, ip, sizeof (icmp6_input_trace_t)); } /* Check if anyone want ND events for L2 BDs */ if (PREDICT_FALSE (!ip6_address_is_link_local_unicast (&ip->src_address))) { l2_arp_term_publish_v6_dp (sw_if_index, &ip->src_address, &mac); } /* Check if MAC entry exsist for solicited target IP */ if (ndh->icmp.type == ICMP6_neighbor_solicitation) { icmp6_neighbor_discovery_ethernet_link_layer_address_option_t *opt; l2_bridge_domain_t *bd_config; u8 *macp; opt = (void *) (ndh + 1); if ((opt->header.type != ICMP6_NEIGHBOR_DISCOVERY_OPTION_source_link_layer_address) || (opt->header.n_data_u64s != 1)) return 0; /* source link layer address option not present */ bd_config = vec_elt_at_index (l2input_main.bd_configs, bd_index); macp = (u8 *) hash_get_mem (bd_config->mac_by_ip6, &ndh->target_address); if (macp) { /* found ip-mac entry, generate eighbor advertisement response */ int bogus_length; vlib_node_runtime_t *error_node = vlib_node_get_runtime (vm, ip6_icmp_input_node.index); ip->dst_address = ip->src_address; ip->src_address = ndh->target_address; ip->hop_limit = 255; opt->header.type = ICMP6_NEIGHBOR_DISCOVERY_OPTION_target_link_layer_address; clib_memcpy (opt->ethernet_address, macp, 6); ndh->icmp.type = ICMP6_neighbor_advertisement; ndh->advertisement_flags = clib_host_to_net_u32 (ICMP6_NEIGHBOR_ADVERTISEMENT_FLAG_SOLICITED | ICMP6_NEIGHBOR_ADVERTISEMENT_FLAG_OVERRIDE); ndh->icmp.checksum = 0; ndh->icmp.checksum = ip6_tcp_udp_icmp_compute_checksum (vm, p0, ip, &bogus_length); clib_memcpy (eth->dst_address, eth->src_address, 6); clib_memcpy (eth->src_address, macp, 6); vlib_error_count (vm, error_node->node_index, ICMP6_ERROR_NEIGHBOR_ADVERTISEMENTS_TX, 1); return 1; } } return 0; } static uword arp_term_l2bd (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame) { l2input_main_t *l2im = &l2input_main; u32 n_left_from, next_index, *from, *to_next; u32 n_replies_sent = 0; u16 last_bd_index = ~0; l2_bridge_domain_t *last_bd_config = 0; l2_input_config_t *cfg0; from = vlib_frame_vector_args (frame); n_left_from = frame->n_vectors; next_index = node->cached_next_index; while (n_left_from > 0) { u32 n_left_to_next; vlib_get_next_frame (vm, node, next_index, to_next, n_left_to_next); while (n_left_from > 0 && n_left_to_next > 0) { vlib_buffer_t *p0; ethernet_header_t *eth0; ethernet_arp_header_t *arp0; ip6_header_t *iph0; u8 *l3h0; u32 pi0, error0, next0, sw_if_index0; u16 ethertype0; u16 bd_index0; u32 ip0; u8 *macp0; pi0 = from[0]; to_next[0] = pi0; from += 1; to_next += 1; n_left_from -= 1; n_left_to_next -= 1; p0 = vlib_get_buffer (vm, pi0); // Terminate only local (SHG == 0) ARP if (vnet_buffer (p0)->l2.shg != 0) goto next_l2_feature; eth0 = vlib_buffer_get_current (p0); l3h0 = (u8 *) eth0 + vnet_buffer (p0)->l2.l2_len; ethertype0 = clib_net_to_host_u16 (*(u16 *) (l3h0 - 2)); arp0 = (ethernet_arp_header_t *) l3h0; if (p0->flags & VNET_BUFFER_F_LOCALLY_ORIGINATED) goto next_l2_feature; if (ethertype0 != ETHERNET_TYPE_ARP) goto check_ip6_nd; if ((arp0->opcode != clib_host_to_net_u16 (ETHERNET_ARP_OPCODE_request)) && (arp0->opcode != clib_host_to_net_u16 (ETHERNET_ARP_OPCODE_reply))) goto check_ip6_nd; /* Must be ARP request/reply packet here */ if (PREDICT_FALSE ((node->flags & VLIB_NODE_FLAG_TRACE) && (p0->flags & VLIB_BUFFER_IS_TRACED))) { u8 *t0 = vlib_add_trace (vm, node, p0, sizeof (ethernet_arp_input_trace_t)); clib_memcpy_fast (t0, l3h0, sizeof (ethernet_arp_input_trace_t)); } error0 = 0; error0 = (arp0->l2_type != clib_net_to_host_u16 (ETHERNET_ARP_HARDWARE_TYPE_ethernet) ? ETHERNET_ARP_ERROR_l2_type_not_ethernet : error0); error0 = (arp0->l3_type != clib_net_to_host_u16 (ETHERNET_TYPE_IP4) ? ETHERNET_ARP_ERROR_l3_type_not_ip4 : error0); sw_if_index0 = vnet_buffer (p0)->sw_if_index[VLIB_RX]; if (error0) goto drop; /* Trash ARP packets whose ARP-level source addresses do not match, or if requester address is mcast */ if (PREDICT_FALSE (!ethernet_mac_address_equal (eth0->src_address, arp0->ip4_over_ethernet[0]. mac.bytes)) || ethernet_address_cast (arp0->ip4_over_ethernet[0].mac.bytes)) { /* VRRP virtual MAC may be different to SMAC in ARP reply */ if (clib_memcmp (arp0->ip4_over_ethernet[0].mac.bytes, vrrp_prefix, sizeof (vrrp_prefix)) != 0) { error0 = ETHERNET_ARP_ERROR_l2_address_mismatch; goto drop; } } if (PREDICT_FALSE (ip4_address_is_multicast (&arp0->ip4_over_ethernet[0].ip4))) { error0 = ETHERNET_ARP_ERROR_l3_src_address_not_local; goto drop; } /* Check if anyone want ARP request events for L2 BDs */ l2_arp_term_publish_v4_dp (sw_if_index0, &arp0->ip4_over_ethernet[0]); /* lookup BD mac_by_ip4 hash table for MAC entry */ ip0 = arp0->ip4_over_ethernet[1].ip4.as_u32; bd_index0 = vnet_buffer (p0)->l2.bd_index; if (PREDICT_FALSE ((bd_index0 != last_bd_index) || (last_bd_index == (u16) ~ 0))) { last_bd_index = bd_index0; last_bd_config = vec_elt_at_index (l2im->bd_configs, bd_index0); } macp0 = (u8 *) hash_get (last_bd_config->mac_by_ip4, ip0); if (PREDICT_FALSE (!macp0)) goto next_l2_feature; /* MAC not found */ if (PREDICT_FALSE (arp0->ip4_over_ethernet[0].ip4.as_u32 == arp0->ip4_over_ethernet[1].ip4.as_u32)) goto next_l2_feature; /* GARP */ /* MAC found, send ARP reply - Convert ARP request packet to ARP reply */ arp0->opcode = clib_host_to_net_u16 (ETHERNET_ARP_OPCODE_reply); arp0->ip4_over_ethernet[1] = arp0->ip4_over_ethernet[0]; arp0->ip4_over_ethernet[0].ip4.as_u32 = ip0; mac_address_from_bytes (&arp0->ip4_over_ethernet[0].mac, macp0); clib_memcpy_fast (eth0->dst_address, eth0->src_address, 6); clib_memcpy_fast (eth0->src_address, macp0, 6); n_replies_sent += 1; output_response: /* For BVI, need to use l2-fwd node to send ARP reply as l2-output node cannot output packet to BVI properly */ cfg0 = vec_elt_at_index (l2im->configs, sw_if_index0); if (PREDICT_FALSE (l2_input_is_bvi (cfg0))) { vnet_buffer (p0)->l2.feature_bitmap |= L2INPUT_FEAT_FWD; vnet_buffer (p0)->sw_if_index[VLIB_RX] = 0; goto next_l2_feature; } /* Send ARP/ND reply back out input interface through l2-output */ vnet_buffer (p0)->sw_if_index[VLIB_TX] = sw_if_index0; next0 = ARP_TERM_NEXT_L2_OUTPUT; vlib_validate_buffer_enqueue_x1 (vm, node, next_index, to_next, n_left_to_next, pi0, next0); continue; check_ip6_nd: /* IP6 ND event notification or solicitation handling to generate local response instead of flooding */ iph0 = (ip6_header_t *) l3h0; if (PREDICT_FALSE (ethertype0 == ETHERNET_TYPE_IP6 && iph0->protocol == IP_PROTOCOL_ICMP6 && !ip6_address_is_unspecified (&iph0->src_address))) { sw_if_index0 = vnet_buffer (p0)->sw_if_index[VLIB_RX]; if (vnet_ip6_nd_term (vm, node, p0, eth0, iph0, sw_if_index0, vnet_buffer (p0)->l2.bd_index)) goto output_response; } next_l2_feature: { next0 = vnet_l2_feature_next (p0, arp_term_next_node_index, L2INPUT_FEAT_ARP_TERM); vlib_validate_buffer_enqueue_x1 (vm, node, next_index, to_next, n_left_to_next, pi0, next0); continue; } drop: if (0 == arp0->ip4_over_ethernet[0].ip4.as_u32 || (arp0->ip4_over_ethernet[0].ip4.as_u32 == arp0->ip4_over_ethernet[1].ip4.as_u32)) { error0 = ETHERNET_ARP_ERROR_gratuitous_arp; } next0 = ARP_TERM_NEXT_DROP; p0->error = node->errors[error0]; vlib_validate_buffer_enqueue_x1 (vm, node, next_index, to_next, n_left_to_next, pi0, next0); } vlib_put_next_frame (vm, node, next_index, n_left_to_next); } vlib_error_count (vm, node->node_index, ETHERNET_ARP_ERROR_replies_sent, n_replies_sent); return frame->n_vectors; } /* *INDENT-OFF* */ VLIB_REGISTER_NODE (arp_term_l2bd_node, static) = { .function = arp_term_l2bd, .name = "arp-term-l2bd", .vector_size = sizeof (u32), .n_errors = ETHERNET_ARP_N_ERROR, .error_strings = ethernet_arp_error_strings, .n_next_nodes = ARP_TERM_N_NEXT, .next_nodes = { [ARP_TERM_NEXT_L2_OUTPUT] = "l2-output", [ARP_TERM_NEXT_DROP] = "error-drop", }, .format_buffer = format_ethernet_arp_header, .format_trace = format_arp_term_input_trace, }; /* *INDENT-ON* */ clib_error_t * arp_term_init (vlib_main_t * vm) { // Initialize the feature next-node indexes feat_bitmap_init_next_nodes (vm, arp_term_l2bd_node.index, L2INPUT_N_FEAT, l2input_get_feat_names (), arp_term_next_node_index); return 0; } VLIB_INIT_FUNCTION (arp_term_init); /* * fd.io coding-style-patch-verification: ON * * Local Variables: * eval: (c-set-style "gnu") * End: */