aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/CMakeLists.txt
AgeCommit message (Expand)AuthorFilesLines
2020-11-25api: vat2 and json autogeneration for api messagesOle Troan1-1/+7
2020-10-28misc: Break the big IP header files to improve compile timeNeale Ranns1-0/+5
2020-10-21virtio: run process to send interrupts to input nodesMohsin Kazmi1-0/+1
2020-10-21misc: minimize dependencies on udp.hFlorin Coras1-0/+2
2020-10-08tcp: custom geometry for timer wheelFlorin Coras1-0/+1
2020-10-08l2: input performanceNeale Ranns1-1/+2
2020-09-28virtio: add packet buffering on txMohsin Kazmi1-0/+1
2020-09-22lisp: Move to pluginNeale Ranns1-58/+0
2020-09-21geneve: Move to pluginNeale Ranns1-23/+0
2020-09-21misc: Move l2tp to pluginNeale Ranns1-23/+0
2020-09-21lldp: Move to pluginNeale Ranns1-18/+0
2020-09-04virtio: remove kernel virtio header dependenciesMohsin Kazmi1-1/+5
2020-09-03crypto: Add async crypto APIsNathan Skrzypczak1-0/+3
2020-08-25flow: add vnet/flow formal APIChenmin Sun1-0/+3
2020-08-20virtio: add modern device supportMohsin Kazmi1-0/+2
2020-08-20virtio: refactor pci device codeMohsin Kazmi1-0/+2
2020-08-14gso: packet coalesce libraryMohsin Kazmi1-0/+2
2020-08-14ip: add VNET_IP_TABLE_ADD_DEL_FUNCTIONSteven Luong1-0/+1
2020-07-21ipsec: Dedicated IPSec interface typeNeale Ranns1-0/+1
2020-07-16adl: move allow/deny list function to pluginDave Barach1-16/+3
2020-05-04fib: midchain adjacency optimisationsNeale Ranns1-0/+1
2020-04-30crypto: introduce async crypto infraFan Zhang1-0/+3
2020-04-28lisp: API cleanupJakub Grajciar1-0/+3
2020-04-23ip: Replace Sematics for Interface IP addressesNeale Ranns1-0/+2
2020-04-22gso: add vxlan tunnel supportMohsin Kazmi1-0/+1
2020-04-15misc: refactor calc_checksumsDave Barach1-0/+1
2020-04-14urpf: Unicast reverse Path Forwarding (plugin)Neale Ranns1-2/+0
2020-04-13session: cleanup debug codeFlorin Coras1-0/+1
2020-04-07udp: move cli to separate fileFlorin Coras1-0/+1
2020-04-02tcp: move features to separate filesFlorin Coras1-1/+8
2020-03-31vlib: move pci api types from vnet/pci to vlib/pciJakub Grajciar1-14/+0
2020-03-23sr: srv6 API cleanupJakub Grajciar1-2/+8
2020-03-12policer: API cleanupJakub Grajciar1-1/+4
2020-03-06build: building applications outside of vpp is missing header filesIJsbrand Wijnands1-0/+3
2020-03-03geneve gtpu vxlan vxlan-gpe: VRF-aware bypass nodeNick Zavaritsky1-0/+1
2020-02-04teib: Rename NHRP to TEIBNeale Ranns1-6/+6
2020-01-30misc: deprecate netmap and ixge driversDamjan Marion1-20/+0
2020-01-30gre: Tunnel encap/decap flagsNeale Ranns1-0/+1
2020-01-27tunnel: Common types for IP tunnelsNeale Ranns1-3/+16
2020-01-17lb: fix that lb_add_del_vip and lb_add_del_as api doesn't work correctlyYulong Pei1-0/+9
2020-01-15build: Add missing version.h dependency in vnetChris Luke1-1/+1
2020-01-03devices: virtio API cleanupJakub Grajciar1-0/+14
2019-12-17ipsec: bind an SA to a workerNeale Ranns1-0/+2
2019-12-17ip: Protocol Independent IP NeighborsNeale Ranns1-10/+55
2019-12-11devices: vhost API cleanupJakub Grajciar1-0/+3
2019-12-04fib: Decouple source from priority and behaviourNeale Ranns1-6/+8
2019-12-04gre: Multi-point interfacesNeale Ranns1-0/+16
2019-12-03ipip: Tunnel flags controlling copying data to/from payload/encapNeale Ranns1-1/+6
2019-12-03ipsec: Changes to make ipsec encoder/decoders reusable by the pluginsPrashant Maheshwari1-0/+3
2019-11-14virtio: refactor virtio-pci loggingDamjan Marion1-2/+3
s="o">.local_ip4, self.pg1.remote_ip4, 331, 441, table_id=1) udp_encap_2 = VppUdpEncap(self, self.pg2.local_ip6, self.pg2.remote_ip6, 332, 442, table_id=2) udp_encap_3 = VppUdpEncap(self, self.pg3.local_ip6, self.pg3.remote_ip6, 333, 443, table_id=3) udp_encap_0.add_vpp_config() udp_encap_1.add_vpp_config() udp_encap_2.add_vpp_config() udp_encap_3.add_vpp_config() self.logger.info(self.vapi.cli("sh udp encap")) self.assertTrue(find_udp_encap(self, udp_encap_2)) self.assertTrue(find_udp_encap(self, udp_encap_3)) self.assertTrue(find_udp_encap(self, udp_encap_0)) self.assertTrue(find_udp_encap(self, udp_encap_1)) # # Routes via each UDP encap object - all combinations of v4 and v6. # route_4o4 = VppIpRoute( self, "1.1.0.1", 32, [VppRoutePath("0.0.0.0", 0xFFFFFFFF, type=FibPathType.FIB_PATH_TYPE_UDP_ENCAP, next_hop_id=udp_encap_0.id)]) route_4o6 = VppIpRoute( self, "1.1.2.1", 32, [VppRoutePath("0.0.0.0", 0xFFFFFFFF, type=FibPathType.FIB_PATH_TYPE_UDP_ENCAP, next_hop_id=udp_encap_2.id)]) route_6o4 = VppIpRoute( self, "2001::1", 128, [VppRoutePath("0.0.0.0", 0xFFFFFFFF, type=FibPathType.FIB_PATH_TYPE_UDP_ENCAP, next_hop_id=udp_encap_1.id)]) route_6o6 = VppIpRoute( self, "2001::3", 128, [VppRoutePath("0.0.0.0", 0xFFFFFFFF, type=FibPathType.FIB_PATH_TYPE_UDP_ENCAP, next_hop_id=udp_encap_3.id)]) route_4o6.add_vpp_config() route_6o6.add_vpp_config() route_6o4.add_vpp_config() route_4o4.add_vpp_config() # # 4o4 encap # p_4o4 = (Ether(src=self.pg0.remote_mac, dst=self.pg0.local_mac) / IP(src="2.2.2.2", dst="1.1.0.1") / UDP(sport=1234, dport=1234) / Raw(b'\xa5' * 100)) rx = self.send_and_expect(self.pg0, p_4o4*NUM_PKTS, self.pg0) for p in rx: self.validate_outer4(p, udp_encap_0) p = IP(p["UDP"].payload.load) self.validate_inner4(p, p_4o4) self.assertEqual(udp_encap_0.get_stats()['packets'], NUM_PKTS) # # 4o6 encap # p_4o6 = (Ether(src=self.pg0.remote_mac, dst=self.pg0.local_mac) / IP(src="2.2.2.2", dst="1.1.2.1") / UDP(sport=1234, dport=1234) / Raw(b'\xa5' * 100)) rx = self.send_and_expect(self.pg0, p_4o6*NUM_PKTS, self.pg2) for p in rx: self.validate_outer6(p, udp_encap_2) p = IP(p["UDP"].payload.load) self.validate_inner4(p, p_4o6) self.assertEqual(udp_encap_2.get_stats()['packets'], NUM_PKTS) # # 6o4 encap # p_6o4 = (Ether(src=self.pg0.remote_mac, dst=self.pg0.local_mac) / IPv6(src="2001::100", dst="2001::1") / UDP(sport=1234, dport=1234) / Raw(b'\xa5' * 100)) rx = self.send_and_expect(self.pg0, p_6o4*NUM_PKTS, self.pg1) for p in rx: self.validate_outer4(p, udp_encap_1) p = IPv6(p["UDP"].payload.load) self.validate_inner6(p, p_6o4) self.assertEqual(udp_encap_1.get_stats()['packets'], NUM_PKTS) # # 6o6 encap # p_6o6 = (Ether(src=self.pg0.remote_mac, dst=self.pg0.local_mac) / IPv6(src="2001::100", dst="2001::3") / UDP(sport=1234, dport=1234) / Raw(b'\xa5' * 100)) rx = self.send_and_expect(self.pg0, p_6o6*NUM_PKTS, self.pg3) for p in rx: self.validate_outer6(p, udp_encap_3) p = IPv6(p["UDP"].payload.load) self.validate_inner6(p, p_6o6) self.assertEqual(udp_encap_3.get_stats()['packets'], NUM_PKTS) # # A route with an output label # the TTL of the inner packet is decremented on LSP ingress # route_4oMPLSo4 = VppIpRoute( self, "1.1.2.22", 32, [VppRoutePath("0.0.0.0", 0xFFFFFFFF, type=FibPathType.FIB_PATH_TYPE_UDP_ENCAP, next_hop_id=1, labels=[VppMplsLabel(66)])]) route_4oMPLSo4.add_vpp_config() p_4omo4 = (Ether(src=self.pg0.remote_mac, dst=self.pg0.local_mac) / IP(src="2.2.2.2", dst="1.1.2.22") / UDP(sport=1234, dport=1234) / Raw(b'\xa5' * 100)) rx = self.send_and_expect(self.pg0, p_4omo4*NUM_PKTS, self.pg1) for p in rx: self.validate_outer4(p, udp_encap_1) p = MPLS(p["UDP"].payload.load) self.validate_inner4(p, p_4omo4, ttl=63) self.assertEqual(udp_encap_1.get_stats()['packets'], 2*NUM_PKTS) class TestUDP(VppTestCase): """ UDP Test Case """ @classmethod def setUpClass(cls): super(TestUDP, cls).setUpClass() @classmethod def tearDownClass(cls): super(TestUDP, cls).tearDownClass() def setUp(self): super(TestUDP, self).setUp() self.vapi.session_enable_disable(is_enable=1) self.create_loopback_interfaces(2) table_id = 0 for i in self.lo_interfaces: i.admin_up() if table_id != 0: tbl = VppIpTable(self, table_id) tbl.add_vpp_config() i.set_table_ip4(table_id) i.config_ip4() table_id += 1 # Configure namespaces self.vapi.app_namespace_add_del(namespace_id="0", sw_if_index=self.loop0.sw_if_index) self.vapi.app_namespace_add_del(namespace_id="1", sw_if_index=self.loop1.sw_if_index) def tearDown(self): for i in self.lo_interfaces: i.unconfig_ip4() i.set_table_ip4(0) i.admin_down() self.vapi.session_enable_disable(is_enable=0) super(TestUDP, self).tearDown() def test_udp_transfer(self): """ UDP echo client/server transfer """ # Add inter-table routes ip_t01 = VppIpRoute(self, self.loop1.local_ip4, 32, [VppRoutePath("0.0.0.0", 0xffffffff, nh_table_id=1)]) ip_t10 = VppIpRoute(self, self.loop0.local_ip4, 32, [VppRoutePath("0.0.0.0", 0xffffffff, nh_table_id=0)], table_id=1) ip_t01.add_vpp_config() ip_t10.add_vpp_config() # Start builtin server and client uri = "udp://" + self.loop0.local_ip4 + "/1234" error = self.vapi.cli("test echo server appns 0 fifo-size 4 no-echo" + "uri " + uri) if error: self.logger.critical(error) self.assertNotIn("failed", error) error = self.vapi.cli("test echo client mbytes 10 appns 1 " + "fifo-size 4 no-output test-bytes " + "syn-timeout 2 no-return uri " + uri) if error: self.logger.critical(error) self.assertNotIn("failed", error) self.logger.debug(self.vapi.cli("show session verbose 2")) # Delete inter-table routes ip_t01.remove_vpp_config() ip_t10.remove_vpp_config() if __name__ == '__main__': unittest.main(testRunner=VppTestRunner)