aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlib/main.c
AgeCommit message (Expand)AuthorFilesLines
2020-10-06misc: add xxx_not_inlineDave Barach1-0/+12
2020-09-17vppinfra: allow handoff to main threadDamjan Marion1-18/+16
2020-09-09vlib: support interrupt re-arm from nodev21.01-rc0Damjan Marion1-10/+21
2020-08-06misc: harmonize namesDave Barach1-6/+7
2020-07-16misc: add callback hooks and refactor pmcTom Seidenberg1-65/+30
2020-07-01vlib: wake up workers if interrupts are postedBenoît Ganne1-1/+4
2020-06-16vlib: address sanitizer support for stack switch, enable clangDamjan Marion1-5/+18
2020-06-03vlib: improve node interrupt handlingDamjan Marion1-38/+43
2020-04-27vlib: deprecate i2c and cjDave Barach1-3/+0
2020-04-13buffers: configurable buffer fault injectorDave Barach1-0/+51
2020-02-18vlib: calculate per-worker loops/second metricDave Barach1-0/+38
2020-02-10vppinfra: use vm memory allocator for numa mappingFlorin Coras1-0/+1
2020-02-06vlib: add plugin override supportDave Barach1-2/+0
2019-10-25mdata: buffer metadata change tracker pluginDave Barach1-8/+11
2019-10-18vlib: enable worker-thread dispatch pcap traceDave Barach1-3/+7
2019-10-02vlib: improve summary vector-rate statisticsDave Barach1-3/+6
2019-09-23interface: use the correct condition for checking if the pcap fd is openAndrew Yourtchenko1-1/+1
2019-09-10misc: clean up "pcap [rx|tx] trace" debug CLIDave Barach1-1/+1
2019-09-07vlib: clean up the "pcap dispatch trace" debug CLIDave Barach1-138/+170
2019-08-20fix pcap_write functionJack Xu1-0/+2
2019-07-18vlib: convert frame_index into real pointersAndreas Schultz1-44/+37
2019-07-16api: enable binary API event logging in vatDave Barach1-0/+25
2019-06-24vlib: packet tracer support for pkt thread handoffsDave Barach1-3/+4
2019-06-04sort worker-thread init functions in advanceDave Barach1-0/+11
2019-05-24Add callback multiplex supportDave Barach1-6/+5
2019-05-01Add node, frame to vlib main loop perf analysis callback argumentsDave Barach1-5/+10
2019-03-21Ignore SIGTERM during the vpp boot sequenceDave Barach1-11/+11
2019-03-12Perf tune handoff queue pollingDave Barach1-2/+21
2019-03-10Perf tune get_frame_size_infoDave Barach1-1/+7
2019-02-27VPP-1576: fix Coverity issuesDave Barach1-27/+17
2019-02-22stats: add buffer gaugesFilip Tehlar1-3/+3
2019-02-22Add no-append flag to vlib_frame_tDamjan Marion1-4/+6
2019-02-02CLI control of graph dispatch elogsDave Barach1-124/+170
2019-01-31Add 'show vlib graphviz' commandBenoît Ganne1-16/+3
2019-01-30buffers: major cleanup and improvementsDamjan Marion1-6/+3
2019-01-28Less intrusive way to capture numa_node and cpu_id changesDamjan Marion1-6/+3
2019-01-27Fix issue with cpu_id and numa_code captured too earlyDamjan Marion1-0/+6
2019-01-27perfmon: collect data on selected thread(s)Dave Barach1-8/+0
2019-01-24perfmon plugin: 2-way parallel stat collectionDave Barach1-38/+48
2019-01-23buffers: wrap vlib_buffer_t to union and expose vector typesDamjan Marion1-3/+2
2019-01-20buffers: remove VLIB_BUFFER_DEFAULT_FREE_LIST macro and fl->n_data_bytesDamjan Marion1-2/+1
2019-01-20buffers: keep buffer_main in vlib_main_tDamjan Marion1-1/+1
2019-01-19buffers: remove free-list information from buffer metadataDamjan Marion1-1/+0
2019-01-09Use the official libpcap file typeDave Barach1-1/+1
2018-11-30Metadata / opaque formatting belongs in vppDave Barach1-57/+90
2018-11-20Add buffer tracing to the dispatch tracerDave Barach1-6/+79
2018-11-20vlib: reset frame flags when frame is reusedDamjan Marion1-0/+1
2018-11-17pcap-based dispatch tracerDave Barach1-1/+305
2018-11-14Remove c-11 memcpy checks from perf-critical codeDave Barach1-4/+4
2018-11-13vlib rename vlib_frame_args(...) to vlib_frame_scalar_args(..)Damjan Marion1-0/+1
class="o">.dst) self.assertEqual(rx.hlim, tx[IPv6].hlim) def test_udp_encap(self): """ UDP Encap test """ # # construct a UDP encap object through each of the peers # v4 through the first two peears, v6 through the second. # udp_encap_0 = VppUdpEncap(self, 0, self.pg0.local_ip4, self.pg0.remote_ip4, 330, 440) udp_encap_1 = VppUdpEncap(self, 1, self.pg1.local_ip4, self.pg1.remote_ip4, 331, 441, table_id=1) udp_encap_2 = VppUdpEncap(self, 2, self.pg2.local_ip6, self.pg2.remote_ip6, 332, 442, table_id=2, is_ip6=1) udp_encap_3 = VppUdpEncap(self, 3, self.pg3.local_ip6, self.pg3.remote_ip6, 333, 443, table_id=3, is_ip6=1) udp_encap_0.add_vpp_config() udp_encap_1.add_vpp_config() udp_encap_2.add_vpp_config() udp_encap_3.add_vpp_config() # # 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, is_udp_encap=1, next_hop_id=0)]) route_4o6 = VppIpRoute(self, "1.1.2.1", 32, [VppRoutePath("0.0.0.0", 0xFFFFFFFF, is_udp_encap=1, next_hop_id=2)]) route_6o4 = VppIpRoute(self, "2001::1", 128, [VppRoutePath("0.0.0.0", 0xFFFFFFFF, is_udp_encap=1, next_hop_id=1)], is_ip6=1) route_6o6 = VppIpRoute(self, "2001::3", 128, [VppRoutePath("0.0.0.0", 0xFFFFFFFF, is_udp_encap=1, next_hop_id=3)], is_ip6=1) route_4o4.add_vpp_config() route_4o6.add_vpp_config() route_6o6.add_vpp_config() route_6o4.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('\xa5' * 100)) rx = self.send_and_expect(self.pg0, p_4o4*65, 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) # # 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('\xa5' * 100)) rx = self.send_and_expect(self.pg0, p_4o6*65, 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) # # 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('\xa5' * 100)) rx = self.send_and_expect(self.pg0, p_6o4*65, 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) # # 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('\xa5' * 100)) rx = self.send_and_expect(self.pg0, p_6o6*65, 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) # # 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, is_udp_encap=1, 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('\xa5' * 100)) rx = self.send_and_expect(self.pg0, p_4omo4*65, 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) class TestUDP(VppTestCase): """ UDP Test Case """ @classmethod def setUpClass(cls): super(TestUDP, cls).setUpClass() def setUp(self): super(TestUDP, self).setUp() self.vapi.session_enable_disable(is_enabled=1) self.create_loopback_interfaces(range(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(namespace_id="0", sw_if_index=self.loop0.sw_if_index) self.vapi.app_namespace_add(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_enabled=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.assertEqual(error.find("failed"), -1) 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.assertEqual(error.find("failed"), -1) # Delete inter-table routes ip_t01.remove_vpp_config() ip_t10.remove_vpp_config() if __name__ == '__main__': unittest.main(testRunner=VppTestRunner)