summaryrefslogtreecommitdiffstats
path: root/src/vnet/buffer.h
AgeCommit message (Expand)AuthorFilesLines
2018-04-27A bit of buffer metadata reshuffling to accommodate flow_idDamjan Marion1-1/+2
2018-04-13GBP V2Neale Ranns1-1/+7
2018-03-21reassembly: feature/concurrencyKlement Sekera1-8/+17
2018-03-16QoS recording and markingNeale Ranns1-5/+21
2018-03-09MPLS Unifom modeNeale Ranns1-0/+2
2018-02-21SCTP: minor refactorMarco Varlese1-1/+1
2018-02-17SCTP: 'multi-home' supportMarco Varlese1-0/+1
2018-02-07Refactor vlib_buffer flagsDamjan Marion1-26/+7
2018-02-01IPv4/6 reassemblyKlement Sekera1-0/+12
2018-01-31Fix VNET_BUFFER_F_SPAN_CLONE flagDamjan Marion1-1/+1
2018-01-29DRAFT ip4/6_frag to support DPO Style based Next NodeVijayabhaskar Katamreddy1-0/+1
2018-01-24SCTP stack (RFC4960)Marco Varlese1-0/+13
2018-01-09DVR: run L3 output featuresNeale Ranns1-0/+24
2017-12-09BIER in non-MPLS netowrksNeale Ranns1-11/+9
2017-11-21dpdk: add l2_hdr_offset and l3_hdr_offset in vlib_buffer_tDamjan Marion1-15/+19
2017-11-09BIERNeale Ranns1-0/+12
2017-10-19VPP-1024: rewrite buffer trajectory tracerDave Barach1-0/+17
2017-10-10session: add support for application namespacingFlorin Coras1-2/+8
2017-10-09NAT: hairpinning rework (VPP-1003)Matus Fabian1-1/+2
2017-10-03Update L2FIB entry timestamp only if BD aging enabled (VPP-1002)John Lo1-0/+1
2017-07-21SNAT: in2out translation as an output feature hairpinning (VPP-913)Matus Fabian1-0/+6
2017-07-18TCP/UDP checksum offload APIDave Barach1-1/+6
2017-07-14vnet_buffer_t flags cleanupDamjan Marion1-25/+24
2017-07-14Introduce l{2,3,4}_hdr_offset fields in the buffer metadataDamjan Marion1-11/+3
2017-06-22VNET:explicitly pad l2_classifyEyal Bari1-10/+4
2017-06-19L2FWD:fix seq_num overwritten + validate l2fib entries when forwardingEyal Bari1-3/+12
2017-05-08L2FIB:CLI/API to flush all non-static entriesEyal Bari1-2/+1
2017-04-25Session/tcp coverity fixesFlorin Coras1-1/+5
2017-04-07MPLS McastNeale Ranns1-0/+3
2017-03-28Implement MAC Flush for BD or Interface from the L2FIBJohn Lo1-3/+5
2017-03-06Remove unused multicast fields from vnet_buffer_tNeale Ranns1-10/+0
2017-03-01VPP-598: tcp stack initial commitDave Barach1-0/+10
2017-02-27vlib: add VLIB_BUFFER_EXT_HDR_VALID flagDamjan Marion1-3/+0
2017-01-11Remove vcgn pluginDamjan Marion1-66/+0
2016-12-28Reorganize source tree to use single autotools instanceDamjan Marion1-0/+381
lass="o">.dport, dport=self.dport, chksum=0) / VXLAN(vni=vni, flags=self.flags) / pkt) def decapsulate(self, pkt): """ Decapsulate the original payload frame by removing VXLAN header """ # check if is set I flag self.assertEqual(pkt[VXLAN].flags, int('0x8', 16)) return pkt[VXLAN].payload # Method for checking VXLAN encapsulation. # def check_encapsulation(self, pkt, vni, local_only=False, mcast_pkt=False): # TODO: add error messages # Verify source MAC is VPP_MAC and destination MAC is MY_MAC resolved # by VPP using ARP. self.assertEqual(pkt[Ether].src, self.pg0.local_mac) if not local_only: if not mcast_pkt: self.assertEqual(pkt[Ether].dst, self.pg0.remote_mac) else: self.assertEqual(pkt[Ether].dst, type(self).mcast_mac) # Verify VXLAN tunnel source IP is VPP_IP and destination IP is MY_IP. self.assertEqual(pkt[IPv6].src, self.pg0.local_ip6) if not local_only: if not mcast_pkt: self.assertEqual(pkt[IPv6].dst, self.pg0.remote_ip6) else: self.assertEqual(pkt[IPv6].dst, type(self).mcast_ip6) # 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 start = 10 end = start + n_ucast_tunnels for dest_ip6 in cls.ip_range(start, end): dest_ip6n = socket.inet_pton(socket.AF_INET6, dest_ip6) # add host route so dest ip will not be resolved rip = VppIpRoute(cls, dest_ip6, 128, [VppRoutePath(cls.pg0.remote_ip6, INVALID_INDEX)], register=False) rip.add_vpp_config() r = cls.vapi.vxlan_add_del_tunnel(src_address=cls.pg0.local_ip6n, dst_address=dest_ip6n, is_ipv6=1, vni=vni) cls.vapi.sw_interface_set_l2_bridge(r.sw_if_index, bd_id=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(TestVxlan6, 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_ip6() # Resolve MAC address for VPP's IP address on pg0. cls.pg0.resolve_ndp() cls.mcast_ip6 = 'ff0e::1' cls.mcast_ip6n = socket.inet_pton(socket.AF_INET6, cls.mcast_ip6) cls.mcast_mac = "33:33:00:00:00:%02x" % (1) # 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_ip6n, dst_address=cls.pg0.remote_ip6n, is_ipv6=1, 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_ip6n, dst_address=cls.mcast_ip6n, mcast_sw_if_index=1, is_ipv6=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) # 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(TestVxlan6, cls).tearDownClass() raise @classmethod def tearDownClass(cls): super(TestVxlan6, cls).tearDownClass() # 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(TestVxlan6, 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)