aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Expand)AuthorFilesLines
2018-11-05Genric API types format/unformat support for VAT and custom dumpNeale Ranns12-57/+162
2018-11-05VPP-1450: binary api call for dumping SPD to interface registrationFilip Varga2-1/+81
2018-11-05tcp: send unsent data in fast recoveryFlorin Coras5-121/+196
2018-11-05Provide return value for PAPI disconnect()Igor Mikhailov (imichail)2-1/+3
2018-11-05Alter logging semantics for VPP PAPI objectIgor Mikhailov (imichail)1-1/+1
2018-11-02tcp: coverity fixesFlorin Coras3-9/+9
2018-11-02cdp scapy protocol & cdp unit testsFilip Varga2-0/+184
2018-11-02vnet: ping: rewrite for maintainability and multicore supportAndrew Yourtchenko2-450/+737
2018-11-02vlib: define minimum chained buffer segment sizeDamjan Marion4-5/+15
2018-11-02dpdk: restore special handling for failsafe driverStephen Hemminger1-1/+1
2018-11-02session: measure dispatch period only if under loadFlorin Coras9-22/+51
2018-11-02tcp: minimize use of tlsFlorin Coras4-198/+195
2018-11-02arp:add error counters for all failure casesEyal Bari2-101/+85
2018-11-01tcp: fast retransmit pacingFlorin Coras8-66/+129
2018-11-01Move RPC calls off the binary API input queueDave Barach6-31/+62
2018-11-01Fix API name_crc format stored in msg_api_tableIgor Mikhailov (imichail)3-3/+3
2018-11-01vom: Add igmp 'host' support in vomMohsin Kazmi10-0/+1314
2018-10-31session: fix sh session cliFlorin Coras1-1/+1
2018-10-31Makefile: support both RHEL and CentOS in install-depYichen Wang1-2/+6
2018-10-31make-test: Fix the vapi testMohsin Kazmi1-0/+1
2018-10-31EMACS-LISP-ONLY: fix names of xxx_main_t pointersDave Barach3-29/+32
2018-10-31EMACS-LISP-ONLY: fix boilerplate compile errorDave Barach1-3/+3
2018-10-31Add and enable msb mask vector intrinsic for aarch64.Lijian Zhang1-10/+28
2018-10-31l2fib:remove unused bucket arg in lookup functionsEyal Bari3-33/+7
2018-10-31session: prioritize postponed sessionsFlorin Coras3-45/+33
2018-10-31session: add wrk contextFlorin Coras7-163/+172
2018-10-30ADJ: init MTU to interface defaultNeale Ranns2-1/+4
2018-10-30DOC-ONLY: document packet intialization from scratchDave Barach2-40/+126
2018-10-30change mac address functions take const macNeale Ranns2-3/+3
2018-10-30docs: Add VPP with iperf and trexjdenisco12-3/+554
2018-10-30DOC-ONLY: upgrade the "requests" packageDave Barach1-1/+1
2018-10-30vppinfra: fix bug in default_socket_sendmsgDamjan Marion1-1/+1
2018-10-30dpdk: .function should be removed for mutiarch nodesDamjan Marion2-4/+0
2018-10-29migrate ipsec to new multiarch infraKlement Sekera10-104/+59
2018-10-29Use throttle_t for ND throttlingNeale Ranns7-52/+71
2018-10-29interface-flags; fix coverity error found in conversionNeale Ranns2-4/+30
2018-10-29Fixing Exclusive dpo path issues added when via rpathVijayabhaskar Katamreddy1-4/+18
2018-10-28session: move test to unittest pluginFlorin Coras3-3/+3
2018-10-29bond: problem switching from l2 to l3Steven1-0/+11
2018-10-28physmem: coverity issuesDamjan Marion2-6/+4
2018-10-28session: extend connect api for internal appsFlorin Coras18-148/+431
2018-10-27FIB: Sources must be keep in priority order, so re-sort after a vec_delNeale Ranns1-0/+2
2018-10-27pg: icmp4 & tcp4 ip length issueKingwel Xie2-2/+12
2018-10-27pg: incrementing len should be truncated byKingwel Xie1-12/+15
2018-10-27pg: allow creating pg for udp based protocolsKingwel Xie2-1/+13
2018-10-27Enumify interface flagsNeale Ranns3-42/+62
2018-10-27vmxnet3: add logging support to the control plane [VPP-1470]Steven4-17/+87
2018-10-27virtio: remove the extra return callMohsin Kazmi1-2/+0
2018-10-26dpdk: fix mlx5 build on SUSEStephen Hemminger1-0/+39
2018-10-26cj: cj dump crashSteven1-1/+1
span> = p.copy() size = random.choice(packet_sizes) self.extend_packet(p, size) pkts.append(p) return pkts def verify_capture(self, rx_if, capture, ip_l=IP): """Verify captured input packet stream for defined interface. :param VppInterface rx_if: Interface to verify captured packet stream. :param list capture: Captured packet stream. :param Scapy ip_l: Required IP layer - IP or IPv6. (Default is IP.) """ self.logger.info("Verifying capture on interface %s" % rx_if.name) count = 0 host_counters = {} for host_mac in rx_if._hosts_by_mac: host_counters[host_mac] = 0 for packet in capture: try: ip_received = packet[ip_l] payload_info = self.payload_to_info(str(packet[Raw])) packet_index = payload_info.index ip_sent = self._packet_infos[packet_index].data[ip_l] self.logger.debug("Got packet on port %s: src=%u (id=%u)" % (rx_if.name, payload_info.src, packet_index)) # Check standard fields self.assertIn(packet.dst, rx_if._hosts_by_mac, "Destination MAC address %s shouldn't be routed " "via interface %s" % (packet.dst, rx_if.name)) self.assertEqual(packet.src, rx_if.local_mac) self.assertEqual(ip_received.src, ip_sent.src) self.assertEqual(ip_received.dst, ip_sent.dst) host_counters[packet.dst] += 1 self._packet_infos.pop(packet_index) except: self.logger.error(ppp("Unexpected or invalid packet:", packet)) raise # We expect packet routed via all host of pg interface for host_mac in host_counters: nr = host_counters[host_mac] self.assertNotEqual( nr, 0, "No packet routed via host %s" % host_mac) self.logger.info("%u packets routed via host %s of %s interface" % (nr, host_mac, rx_if.name)) count += nr self.logger.info("Total amount of %u packets routed via %s interface" % (count, rx_if.name)) return count def create_ip_routes(self, dst_ip_net, dst_prefix_len, is_ipv6=0): """ Create IP routes for defined destination IP network. :param str dst_ip_net: Destination IP network. :param int dst_prefix_len: IP address prefix length. :param int is_ipv6: 0 if an ip4 route, else ip6 """ af = socket.AF_INET if is_ipv6 == 0 else socket.AF_INET6 dst_ip = socket.inet_pton(af, dst_ip_net) for pg_if in self.pg_interfaces[1:]: for nh_host in pg_if.remote_hosts: nh_host_ip = nh_host.ip4 if is_ipv6 == 0 else nh_host.ip6 next_hop_address = socket.inet_pton(af, nh_host_ip) next_hop_sw_if_index = pg_if.sw_if_index self.vapi.ip_add_del_route( dst_ip, dst_prefix_len, next_hop_address, next_hop_sw_if_index=next_hop_sw_if_index, is_ipv6=is_ipv6, is_multipath=1) self.logger.info("Route via %s on %s created" % (nh_host_ip, pg_if.name)) self.logger.debug(self.vapi.ppcli("show ip fib")) self.logger.debug(self.vapi.ppcli("show ip6 fib")) def test_ip_ecmp(self): """ IP equal-cost multi-path routing test """ src_ip_net = '16.0.0.1' dst_ip_net = '32.0.0.1' ip_prefix_len = 24 self.create_ip_routes(dst_ip_net, ip_prefix_len) pkts = self.create_stream(self.pg0, src_ip_net, dst_ip_net, ip_prefix_len, self.pg_if_packet_sizes) self.pg0.add_stream(pkts) self.pg_enable_capture(self.pg_interfaces) self.pg_start() # We expect packets on pg1, pg2 and pg3, but not on pg0 rx_count = 0 for pg_if in self.pg_interfaces[1:]: capture = pg_if._get_capture(timeout=1) self.assertNotEqual( len(capture), 0, msg="No packets captured on %s" % pg_if.name) rx_count += self.verify_capture(pg_if, capture) self.pg0.assert_nothing_captured(remark="IP packets forwarded on pg0") # Check that all packets were forwarded via pg1, pg2 and pg3 self.assertEqual(rx_count, len(pkts)) def test_ip6_ecmp(self): """ IPv6 equal-cost multi-path routing test """ src_ip_net = '3ffe:51::1' dst_ip_net = '3ffe:71::1' ip_prefix_len = 64 self.create_ip_routes(dst_ip_net, ip_prefix_len, is_ipv6=1) pkts = self.create_stream( self.pg0, src_ip_net, dst_ip_net, ip_prefix_len, self.pg_if_packet_sizes, ip_l=IPv6) self.pg0.add_stream(pkts) self.pg_enable_capture(self.pg_interfaces) self.pg_start() # We expect packets on pg1, pg2 and pg3, but not on pg0 rx_count = 0 for pg_if in self.pg_interfaces[1:]: capture = pg_if._get_capture(timeout=1) self.assertNotEqual( len(capture), 0, msg="No packets captured on %s" % pg_if.name) rx_count += self.verify_capture(pg_if, capture, ip_l=IPv6) self.pg0.assert_nothing_captured(remark="IP packets forwarded on pg0") # Check that all packets were forwarded via pg1, pg2 and pg3 self.assertEqual(rx_count, len(pkts)) if __name__ == '__main__': unittest.main(testRunner=VppTestRunner)