summaryrefslogtreecommitdiffstats
path: root/src/vnet/vxlan
AgeCommit message (Expand)AuthorFilesLines
2020-01-10docs: Edit FEATURE.yaml files so they can be publishedJohn DeNisco1-2/+2
2020-01-04vxlan: Add FEATURE.yamlJohn Lo2-1/+15
2019-12-20vxlan: reuse inner packet flow hash for tunnel outer header load balanceShawn Ji1-0/+7
2019-12-17vxlan geneve gtpu: fix short helpPaul Vinciguerra1-1/+1
2019-12-10api: multiple connections per processDave Barach1-1/+1
2019-12-05vxlan: fix vxlan hw offload issueChenmin Sun1-1/+3
2019-11-26fib: reduce save_rewrite_length to u8Klement Sekera1-1/+1
2019-08-05vxlan: fix VXLANoIP6 checksum offload setupJohn Lo1-4/+3
2019-07-19fib: FIB Entry trackingNeale Ranns1-7/+7
2019-06-18fib: fib api updatesNeale Ranns1-7/+5
2019-06-04features will register udp ports once configuredJakub Grajciar1-5/+11
2019-03-28Typos. A bunch of typos I've been collecting.Paul Vinciguerra1-1/+1
2019-03-26Simplify adjacency rewrite codeBenoƮt Ganne1-12/+2
2019-03-06vxlan*: migrate old MULTIARCH macros to VLIB_NODE_FNFilip Tehlar1-10/+4
2019-01-09VXLAN: Prevent duplicate bypass graph nodes.Jon Loeliger2-4/+37
2018-11-14Remove c-11 memcpy checks from perf-critical codeDave Barach1-3/+3
2018-11-05vxlan: prefetch extra one cacheline holding external headerZhiyong Yang1-2/+2
2018-10-23c11 safe string handling supportDave Barach3-5/+5
2018-10-17vxlan:decap caching error (VPP-1462)Eyal Bari1-1/+1
2018-10-14vxlan:fix ip6 tunnel deletionEyal Bari1-1/+2
2018-10-05vxlan:ip4 decap:remove access to tunnel objectEyal Bari3-183/+190
2018-09-24Trivial: Clean up some typos.Paul Vinciguerra4-12/+12
2018-09-06vxlan: improve encap performanceZhiyong Yang1-2/+10
2018-08-28vxlan: decap use vlib_buffer_enqueue_to_nextEyal Bari2-255/+221
2018-08-01vxlan:optimize cached entry compareEyal Bari1-9/+5
2018-07-31vxlan:decap.c conform coding styleEyal Bari1-620/+690
2018-07-31fix 'sh vxlan tunnels'Neale Ranns1-15/+4
2018-07-23fix vector index range checksEyal Bari1-1/+1
2018-07-19Remove unused argument to vlib_feature_nextDamjan Marion1-3/+3
2018-07-09vxlan:use bihash_16_8 for ipv4 lookupEyal Bari3-66/+76
2018-07-05vxlan:use bihash_24_8 for ipv6 lookupEyal Bari3-116/+167
2018-06-14vxlan:use VLIB_NODE_FN for multiarch selectionEyal Bari1-17/+1
2018-06-13vxlan:offload RX floweyal bari5-1/+579
2018-05-07vxlan:vxlan.c conform coding styleEyal Bari1-354/+374
2018-05-04Harmonize vec/pool_get_aligned object sizes and alignment requestsDave Barach1-0/+3
2018-05-02Fix CentOS 7 build issue with vxlanMatthew Smith1-2/+4
2018-05-02vxlan:encap - use vnet rewriteeyal bari3-53/+50
2018-04-25Carry recorded QOS bits in the outer VXLAN IP headerIgor Mikhailov (imichail)1-0/+35
2018-04-25vxlan:remove single bucket load-balance dpo'sEyal Bari1-9/+23
2018-04-17vxlan:remove counters writeback cacheEyal Bari2-519/+242
2018-03-27vxlan:refactor add del command functionEyal Bari1-102/+43
2018-03-09MPLS Unifom modeNeale Ranns1-1/+0
2018-02-23VXLAN: Instance numbers now properly freed upon delete.Jon Loeliger1-1/+1
2018-02-16Minor VXLAN/GRE Tunnel Encap Optimization and CleanupJohn Lo2-22/+33
2018-02-15Optimize GRE Tunnel and add support for ERSPAN encapJohn Lo1-4/+0
2018-02-14vxlan:remove interface recycle mechanismEyal Bari2-69/+11
2018-02-07VXLAN: Allow user to specify a custom vxlan tunnel instance id.Jon Loeliger4-17/+123
2018-02-01vxlan: Lookup FIB in either IPv4 or IPv6 families.Jon Loeliger1-4/+5
2018-02-01FIB: Consolidate several copies of fib_ip_proto() into one.Jon Loeliger1-6/+0
2018-01-24Improve tunnel interface creation performanceJohn Lo1-19/+10
n">IPv6].dst) def validate_4in6(self, rx, expected): if IPv6 not in rx: self.fail() if IP in rx: self.fail() self.assertEqual(rx[IPv6].src, expected[IPv6].src) self.assertEqual(rx[IPv6].dst, expected[IPv6].dst) self.assertEqual(rx[IPv6].nh, expected[IPv6].nh) def payload(self, len): return 'x' * len def test_6rd_ip6_to_ip4(self): """ ip6 -> ip4 (encap) 6rd test """ p_ether = Ether(src=self.pg0.remote_mac, dst=self.pg0.local_mac) p_ip6 = IPv6(src="1::1", dst="2002:AC10:0202::1", nh='UDP') rv = self.vapi.ipip_6rd_add_tunnel(ip6_table_id=0, ip4_table_id=0, ip6_prefix='2002::/16', ip4_prefix='0.0.0.0/0', ip4_src=self.pg0.local_ip4, security_check=True) self.tunnel_index = rv.sw_if_index self.vapi.cli("show ip6 fib") p_payload = UDP(sport=1234, dport=1234) p = (p_ether / p_ip6 / p_payload) p_reply = (IP(src=self.pg0.local_ip4, dst=self.pg1.remote_ip4, proto='ipv6') / p_ip6) rx = self.send_and_expect(self.pg0, p * 10, self.pg1) for p in rx: self.validate_6in4(p, p_reply) # MTU tests (default is 1480) plen = 1481 - 40 - 8 p_ip6 = IPv6(src="1::1", dst="2002:AC10:0202::1") p_payload = UDP(sport=1234, dport=1234) / Raw(self.payload(plen)) p = (p_ether / p_ip6 / p_payload) p_reply = (IP(src=self.pg0.local_ip4, dst=self.pg1.remote_ip4, proto='ipv6') / p_ip6) rx = self.send_and_assert_no_replies(self.pg0, p * 10) self.vapi.ipip_6rd_del_tunnel(self.tunnel_index) def test_6rd_ip6_to_ip4_vrf(self): """ ip6 -> ip4 (encap) 6rd VRF test """ p_ether = Ether(src=self.pg2.remote_mac, dst=self.pg2.local_mac) p_ip6 = IPv6(src="1::1", dst="2002:AC10:0402::1", nh='UDP') rv = self.vapi.ipip_6rd_add_tunnel(ip6_table_id=20, ip4_table_id=10, ip6_prefix='2002::/16', ip4_prefix='0.0.0.0/0', ip4_src=self.pg2.local_ip4, security_check=True) self.tunnel_index = rv.sw_if_index self.vapi.cli("show ip6 fib") p_payload = UDP(sport=1234, dport=1234) p = (p_ether / p_ip6 / p_payload) p_reply = (IP(src=self.pg2.local_ip4, dst=self.pg3.remote_ip4, proto='ipv6') / p_ip6) rx = self.send_and_expect(self.pg2, p * 10, self.pg3) for p in rx: self.validate_6in4(p, p_reply) # MTU tests (default is 1480) plen = 1481 - 40 - 8 p_ip6 = IPv6(src="1::1", dst="2002:AC10:0402::1") p_payload = UDP(sport=1234, dport=1234) / Raw(self.payload(plen)) p = (p_ether / p_ip6 / p_payload) p_reply = (IP(src=self.pg2.local_ip4, dst=self.pg3.remote_ip4, proto='ipv6') / p_ip6) rx = self.send_and_assert_no_replies(self.pg0, p * 10) self.vapi.ipip_6rd_del_tunnel(self.tunnel_index) def test_6rd_ip4_to_ip6(self): """ ip4 -> ip6 (decap) 6rd test """ rv = self.vapi.ipip_6rd_add_tunnel(ip6_table_id=0, ip4_table_id=0, ip6_prefix='2002::/16', ip4_prefix='0.0.0.0/0', ip4_src=self.pg0.local_ip4, security_check=True) self.tunnel_index = rv.sw_if_index rv = self.vapi.ipip_6rd_del_tunnel(rv.sw_if_index) rv = self.vapi.ipip_6rd_add_tunnel(ip6_table_id=0, ip4_table_id=0, ip6_prefix='2002::/16', ip4_prefix='0.0.0.0/0', ip4_src=self.pg0.local_ip4, security_check=True) self.tunnel_index = rv.sw_if_index p_ip6 = (IPv6(src="2002:AC10:0202::1", dst=self.pg1.remote_ip6) / UDP(sport=1234, dport=1234)) p = (Ether(src=self.pg0.remote_mac, dst=self.pg0.local_mac) / IP(src=self.pg1.remote_ip4, dst=self.pg0.local_ip4) / p_ip6) p_reply = p_ip6 rx = self.send_and_expect(self.pg0, p * 10, self.pg1) for p in rx: self.validate_4in6(p, p_reply) self.vapi.ipip_6rd_del_tunnel(self.tunnel_index) def test_6rd_ip4_to_ip6_vrf(self): """ ip4 -> ip6 (decap) 6rd VRF test """ rv = self.vapi.ipip_6rd_add_tunnel(ip6_table_id=20, ip4_table_id=10, ip6_prefix='2002::/16', ip4_prefix='0.0.0.0/0', ip4_src=self.pg2.local_ip4, security_check=True) self.tunnel_index = rv.sw_if_index rv = self.vapi.ipip_6rd_del_tunnel(rv.sw_if_index) rv = self.vapi.ipip_6rd_add_tunnel(ip6_table_id=20, ip4_table_id=10, ip6_prefix='2002::/16', ip4_prefix='0.0.0.0/0', ip4_src=self.pg2.local_ip4, security_check=True) self.tunnel_index = rv.sw_if_index self.vapi.sw_interface_set_table(self.tunnel_index, 1, 20) p_ip6 = (IPv6(src="2002:AC10:0402::1", dst=self.pg3.remote_ip6) / UDP(sport=1234, dport=1234)) p = (Ether(src=self.pg2.remote_mac, dst=self.pg2.local_mac) / IP(src=self.pg3.remote_ip4, dst=self.pg2.local_ip4) / p_ip6) p_reply = p_ip6 rx = self.send_and_expect(self.pg2, p * 10, self.pg3) for p in rx: self.validate_4in6(p, p_reply) self.vapi.sw_interface_set_table(self.tunnel_index, 1, 0) self.vapi.ipip_6rd_del_tunnel(self.tunnel_index) def test_6rd_ip4_to_ip6_multiple(self): """ ip4 -> ip6 (decap) 6rd test """ self.tunnel_index = [] rv = self.vapi.ipip_6rd_add_tunnel(ip6_table_id=0, ip4_table_id=0, ip6_prefix='2002::/16', ip4_prefix='0.0.0.0/0', ip4_src=self.pg0.local_ip4, security_check=True) self.tunnel_index.append(rv.sw_if_index) rv = self.vapi.ipip_6rd_add_tunnel(ip6_table_id=0, ip4_table_id=0, ip6_prefix='2003::/16', ip4_prefix='0.0.0.0/0', ip4_src=self.pg1.local_ip4, security_check=True) self.tunnel_index.append(rv.sw_if_index) self.vapi.cli("show ip6 fib") p_ether = Ether(src=self.pg0.remote_mac, dst=self.pg0.local_mac) p_ip4 = IP(src=self.pg1.remote_ip4, dst=self.pg0.local_ip4) p_ip6_1 = (IPv6(src="2002:AC10:0202::1", dst=self.pg1.remote_ip6) / UDP(sport=1234, dport=1234)) p_ip6_2 = (IPv6(src="2003:AC10:0202::1", dst=self.pg1.remote_ip6) / UDP(sport=1234, dport=1234)) p = (p_ether / p_ip4 / p_ip6_1) rx = self.send_and_expect(self.pg0, p * 10, self.pg1) for p in rx: self.validate_4in6(p, p_ip6_1) p = (p_ether / p_ip4 / p_ip6_2) rx = self.send_and_expect(self.pg0, p * 10, self.pg1) for p in rx: self.validate_4in6(p, p_ip6_2) for i in self.tunnel_index: self.vapi.ipip_6rd_del_tunnel(i) def test_6rd_ip4_to_ip6_suffix(self): """ ip4 -> ip6 (decap) 6rd test """ rv = self.vapi.ipip_6rd_add_tunnel(ip6_table_id=0, ip4_table_id=0, ip6_prefix='2002::/16', ip4_prefix='172.0.0.0/8', ip4_src=self.pg0.local_ip4, security_check=True) self.tunnel_index = rv.sw_if_index self.vapi.cli("show ip6 fib") p_ether = Ether(src=self.pg0.remote_mac, dst=self.pg0.local_mac) p_ip4 = IP(src=self.pg1.remote_ip4, dst=self.pg0.local_ip4) p_ip6 = (IPv6(src="2002:1002:0200::1", dst=self.pg1.remote_ip6) / UDP(sport=1234, dport=1234)) p = (p_ether / p_ip4 / p_ip6) rx = self.send_and_expect(self.pg0, p * 10, self.pg1) for p in rx: self.validate_4in6(p, p_ip6) self.vapi.ipip_6rd_del_tunnel(self.tunnel_index) def test_6rd_ip4_to_ip6_sec_check(self): """ ip4 -> ip6 (decap) security check 6rd test """ rv = self.vapi.ipip_6rd_add_tunnel(ip6_table_id=0, ip4_table_id=0, ip6_prefix='2002::/16', ip4_prefix='0.0.0.0/0', ip4_src=self.pg0.local_ip4, security_check=True) self.tunnel_index = rv.sw_if_index self.vapi.cli("show ip6 fib") p_ip6 = (IPv6(src="2002:AC10:0202::1", dst=self.pg1.remote_ip6) / UDP(sport=1234, dport=1234)) p_ip6_fail = (IPv6(src="2002:DEAD:0202::1", dst=self.pg1.remote_ip6) / UDP(sport=1234, dport=1234)) p = (Ether(src=self.pg0.remote_mac, dst=self.pg0.local_mac) / IP(src=self.pg1.remote_ip4, dst=self.pg0.local_ip4) / p_ip6) p_reply = p_ip6 rx = self.send_and_expect(self.pg0, p * 10, self.pg1) for p in rx: self.validate_4in6(p, p_reply) p = (Ether(src=self.pg0.remote_mac, dst=self.pg0.local_mac) / IP(src=self.pg1.remote_ip4, dst=self.pg0.local_ip4) / p_ip6_fail) rx = self.send_and_assert_no_replies(self.pg0, p * 10) self.vapi.ipip_6rd_del_tunnel(self.tunnel_index) def test_6rd_bgp_tunnel(self): """ 6rd BGP tunnel """ rv = self.vapi.ipip_6rd_add_tunnel(ip6_table_id=0, ip4_table_id=0, ip6_prefix='2002::/16', ip4_prefix='0.0.0.0/0', ip4_src=self.pg0.local_ip4, security_check=False) self.tunnel_index = rv.sw_if_index default_route = VppIpRoute(self, "DEAD::", 16, [VppRoutePath("2002:0808:0808::", self.tunnel_index)]) default_route.add_vpp_config() ip4_route = VppIpRoute(self, "8.0.0.0", 8, [VppRoutePath(self.pg1.remote_ip4, 0xFFFFFFFF)]) ip4_route.add_vpp_config() # Via recursive route 6 -> 4 p = (Ether(src=self.pg0.remote_mac, dst=self.pg0.local_mac) / IPv6(src="1::1", dst="DEAD:BEEF::1") / UDP(sport=1234, dport=1234)) p_reply = (IP(src=self.pg0.local_ip4, dst="8.8.8.8", proto='ipv6') / IPv6(src='1::1', dst='DEAD:BEEF::1', nh='UDP')) rx = self.send_and_expect(self.pg0, p * 10, self.pg1) for p in rx: self.validate_6in4(p, p_reply) # Via recursive route 4 -> 6 (Security check must be disabled) p_ip6 = (IPv6(src="DEAD:BEEF::1", dst=self.pg1.remote_ip6) / UDP(sport=1234, dport=1234)) p = (Ether(src=self.pg0.remote_mac, dst=self.pg0.local_mac) / IP(src="8.8.8.8", dst=self.pg0.local_ip4) / p_ip6) p_reply = p_ip6 rx = self.send_and_expect(self.pg0, p * 10, self.pg1) for p in rx: self.validate_4in6(p, p_reply) ip4_route.remove_vpp_config() default_route.remove_vpp_config() self.vapi.ipip_6rd_del_tunnel(self.tunnel_index) if __name__ == '__main__': unittest.main(testRunner=VppTestRunner)