summaryrefslogtreecommitdiffstats
AgeCommit message (Expand)AuthorFilesLines
2020-03-26acl: API cleanupJakub Grajciar20-1123/+1206
2020-03-26session: fix coverity warningDave Barach1-1/+1
2020-03-26nat: transitory timeout for TCP CLOSED stateKlement Sekera9-118/+329
2020-03-26svm: correct format_fifo_segmentRyujiro Shibuya2-4/+7
2020-03-26build: use gcc-8 as default on ubuntu 18.04Damjan Marion1-0/+6
2020-03-26tests: speed up ipsec unit tests executionFilip Tehlar1-54/+1
2020-03-26ikev2: fix wrong usage of BN_bn2bin()Filip Tehlar3-12/+56
2020-03-26ikev2: dead peer detectionFilip Tehlar2-4/+95
2020-03-25ikev2: fix gcm in ike protocolFilip Tehlar1-1/+1
2020-03-25session: api to add new transport typesFlorin Coras21-103/+150
2020-03-25tcp: avoid updating rcv wnd in resetsFlorin Coras1-3/+1
2020-03-25sr: Change the CLI keyword from address to prefix.Tetsuya Murakami2-3/+3
2020-03-25ip: Adding IP tables is no MP safeNeale Ranns1-2/+0
2020-03-25acl: Add CLI additionsNeale Ranns1-0/+254
2020-03-25avf: fix rx queue refill on buffer alloc failureDamjan Marion1-6/+6
2020-03-25nat: fix error countersKlement Sekera4-1/+21
2020-03-25map: fix hop limit expiration at brVladimir Ratnikov2-2/+29
2020-03-24quic: disable vnet_crypto and batching if no crypto engines are loadedMathiasRaoul3-11/+33
2020-03-24vcl: fix ldp recv return on errorFlorin Coras1-1/+4
2020-03-24vcl: fix ldp writev 0 vecsFlorin Coras1-12/+8
2020-03-24map: fix translation of icmp6 error messagesAlexander Chernavin2-1/+131
2020-03-24avf: proper promisc handlingDamjan Marion2-7/+27
2020-03-23tcp: add lost and in flight to byte trackerFlorin Coras2-2/+15
2020-03-23ikev2: fix typo in .api descriptionVratko Polak1-2/+1
2020-03-23ipsec: Revert "ipsec: fix chained ESP"Florin Coras3-146/+51
2020-03-23docs: add container functional test writeupDave Barach3-1/+512
2020-03-23srv6-mobile: Fix the coverity issuesTetsuya Murakami1-33/+39
2020-03-23sr: srv6 API cleanupJakub Grajciar10-338/+217
2020-03-23ipsec: fix chained ESPFilip Tehlar3-51/+146
2020-03-23ipsec: increment no-tunnel counter in ipsec-tun-inputAlexander Chernavin1-0/+3
2020-03-23virtio: vhost gso checksum error when both indirect and mrg_rxbuf are offSteven Luong1-20/+19
2020-03-23tap: fix the numa/queue for buffersMohsin Kazmi1-1/+1
2020-03-23virtio: improve error handlingMohsin Kazmi1-9/+30
2020-03-23docs: Fix build on fresh ubuntu 18.04John DeNisco2-14/+23
2020-03-22dpdk: false link down issue with ixgbe NICLijian.Zhang1-0/+66
2020-03-22vppinfra: fix typo in dlmalloc.cDave Barach2-2/+8
2020-03-21srv6-mobile: Fix the localsid length issue on vnet/srv6Tetsuya Murakami4-7/+10
2020-03-21srv6-mobile: Support GTP4/6.DT and User Plane message mappingTetsuya Murakami10-206/+2119
2020-03-21ipsec: efficient layout of ESP per thread dataRajesh Goel1-3/+4
2020-03-21vppinfra: fix minor cuckoo bugs and add cuckoo_16_8Klement Sekera5-26/+170
2020-03-21gtpu: encap-vrf-id in show gtpu tunnels commandNick Zavaritsky1-2/+9
2020-03-21libmemif: don't consume rx queue interrupt, if memif_rx_burst failsJan Cavojsky3-5/+16
2020-03-21vlib: leave SIGPROF signal with its default handlerJieqiang Wang3-0/+3
2020-03-21vlib: allow using core 0 as a last resortVladimir Isaev1-15/+12
2020-03-21vlib: complain if workers are configured twiceVladimir Isaev1-1/+10
2020-03-21ikev2: fix l2 interfaceFilip Tehlar1-2/+4
2020-03-21virtio: fix link up/down flagMohsin Kazmi1-3/+9
2020-03-21ikev2: add support for custom ipsec-over-udp portFilip Tehlar12-15/+193
2020-03-21virtio: fix the out of order descriptors in txMohsin Kazmi4-8/+102
2020-03-21vlib: fix error when creating avf interface on SMP systemJieqiang Wang1-1/+13
n class="bp">self).mcast_ip4) # Verify UDP destination port is VXLAN 4789, source UDP port could be # arbitrary. self.assertEqual(pkt[UDP].dport, type(self).dport) # TODO: checksum check # Verify VNI self.assertEqual(pkt[VXLAN].vni, vni) @classmethod def create_vxlan_flood_test_bd(cls, vni, n_ucast_tunnels): # Create 10 ucast vxlan tunnels under bd ip_range_start = 10 ip_range_end = ip_range_start + n_ucast_tunnels next_hop_address = cls.pg0.remote_ip4n for dest_ip4n in ip4n_range(next_hop_address, ip_range_start, ip_range_end): # add host route so dest_ip4n will not be resolved cls.vapi.ip_add_del_route(dst_address=dest_ip4n, dst_address_length=32, next_hop_address=next_hop_address) r = cls.vapi.vxlan_add_del_tunnel(src_address=cls.pg0.local_ip4n, dst_address=dest_ip4n, vni=vni) cls.vapi.sw_interface_set_l2_bridge(rx_sw_if_index=r.sw_if_index, bd_id=vni) @classmethod def add_del_shared_mcast_dst_load(cls, is_add): """ add or del tunnels sharing the same mcast dst to test vxlan ref_count mechanism """ n_shared_dst_tunnels = 20 vni_start = 10000 vni_end = vni_start + n_shared_dst_tunnels for vni in range(vni_start, vni_end): r = cls.vapi.vxlan_add_del_tunnel(src_address=cls.pg0.local_ip4n, dst_address=cls.mcast_ip4n, mcast_sw_if_index=1, is_add=is_add, vni=vni) if r.sw_if_index == 0xffffffff: raise ValueError("bad sw_if_index: ~0") @classmethod def add_shared_mcast_dst_load(cls): cls.add_del_shared_mcast_dst_load(is_add=1) @classmethod def del_shared_mcast_dst_load(cls): cls.add_del_shared_mcast_dst_load(is_add=0) @classmethod def add_del_mcast_tunnels_load(cls, is_add): """ add or del tunnels to test vxlan stability """ n_distinct_dst_tunnels = 200 ip_range_start = 10 ip_range_end = ip_range_start + n_distinct_dst_tunnels for dest_ip4n in ip4n_range(cls.mcast_ip4n, ip_range_start, ip_range_end): vni = bytearray(dest_ip4n)[3] cls.vapi.vxlan_add_del_tunnel(src_address=cls.pg0.local_ip4n, dst_address=dest_ip4n, mcast_sw_if_index=1, is_add=is_add, vni=vni) @classmethod def add_mcast_tunnels_load(cls): cls.add_del_mcast_tunnels_load(is_add=1) @classmethod def del_mcast_tunnels_load(cls): cls.add_del_mcast_tunnels_load(is_add=0) # Class method to start the VXLAN test case. # Overrides setUpClass method in VppTestCase class. # Python try..except statement is used to ensure that the tear down of # the class will be executed even if exception is raised. # @param cls The class pointer. @classmethod def setUpClass(cls): super(TestVxlan, cls).setUpClass() try: cls.dport = 4789 cls.flags = 0x8 # Create 2 pg interfaces. cls.create_pg_interfaces(range(4)) for pg in cls.pg_interfaces: pg.admin_up() # Configure IPv4 addresses on VPP pg0. cls.pg0.config_ip4() # Resolve MAC address for VPP's IP address on pg0. cls.pg0.resolve_arp() # Our Multicast address cls.mcast_ip4 = '239.1.1.1' cls.mcast_ip4n = socket.inet_pton(socket.AF_INET, cls.mcast_ip4) iplong = atol(cls.mcast_ip4) cls.mcast_mac = "01:00:5e:%02x:%02x:%02x" % ( (iplong >> 16) & 0x7F, (iplong >> 8) & 0xFF, iplong & 0xFF) # Create VXLAN VTEP on VPP pg0, and put vxlan_tunnel0 and pg1 # into BD. cls.single_tunnel_bd = 1 r = cls.vapi.vxlan_add_del_tunnel(src_address=cls.pg0.local_ip4n, dst_address=cls.pg0.remote_ip4n, vni=cls.single_tunnel_bd) cls.vapi.sw_interface_set_l2_bridge(rx_sw_if_index=r.sw_if_index, bd_id=cls.single_tunnel_bd) cls.vapi.sw_interface_set_l2_bridge( rx_sw_if_index=cls.pg1.sw_if_index, bd_id=cls.single_tunnel_bd) # Setup vni 2 to test multicast flooding cls.n_ucast_tunnels = 10 cls.mcast_flood_bd = 2 cls.create_vxlan_flood_test_bd(cls.mcast_flood_bd, cls.n_ucast_tunnels) r = cls.vapi.vxlan_add_del_tunnel(src_address=cls.pg0.local_ip4n, dst_address=cls.mcast_ip4n, mcast_sw_if_index=1, vni=cls.mcast_flood_bd) cls.vapi.sw_interface_set_l2_bridge(rx_sw_if_index=r.sw_if_index, bd_id=cls.mcast_flood_bd) cls.vapi.sw_interface_set_l2_bridge( rx_sw_if_index=cls.pg2.sw_if_index, bd_id=cls.mcast_flood_bd) # Add and delete mcast tunnels to check stability cls.add_shared_mcast_dst_load() cls.add_mcast_tunnels_load() cls.del_shared_mcast_dst_load() cls.del_mcast_tunnels_load() # Setup vni 3 to test unicast flooding cls.ucast_flood_bd = 3 cls.create_vxlan_flood_test_bd(cls.ucast_flood_bd, cls.n_ucast_tunnels) cls.vapi.sw_interface_set_l2_bridge( rx_sw_if_index=cls.pg3.sw_if_index, bd_id=cls.ucast_flood_bd) except Exception: super(TestVxlan, cls).tearDownClass() raise @classmethod def tearDownClass(cls): super(TestVxlan, cls).tearDownClass() def test_encap_big_packet(self): """ Encapsulation test send big frame from pg1 Verify receipt of encapsulated frames on pg0 """ self.vapi.sw_interface_set_mtu(self.pg0.sw_if_index, [1500, 0, 0, 0]) frame = (Ether(src='00:00:00:00:00:02', dst='00:00:00:00:00:01') / IP(src='4.3.2.1', dst='1.2.3.4') / UDP(sport=20000, dport=10000) / Raw('\xa5' * 1450)) self.pg1.add_stream([frame]) self.pg0.enable_capture() self.pg_start() # Pick first received frame and check if it's correctly encapsulated. out = self.pg0.get_capture(2) ether = out[0] pkt = reassemble4(out) pkt = ether / pkt self.check_encapsulation(pkt, self.single_tunnel_bd) payload = self.decapsulate(pkt) # TODO: Scapy bug? # self.assert_eq_pkts(payload, frame) # Method to define VPP actions before tear down of the test case. # Overrides tearDown method in VppTestCase class. # @param self The object pointer. def tearDown(self): super(TestVxlan, self).tearDown() def show_commands_at_teardown(self): self.logger.info(self.vapi.cli("show bridge-domain 1 detail")) self.logger.info(self.vapi.cli("show bridge-domain 2 detail")) self.logger.info(self.vapi.cli("show bridge-domain 3 detail")) self.logger.info(self.vapi.cli("show vxlan tunnel")) if __name__ == '__main__': unittest.main(testRunner=VppTestRunner)