MCPcopy Create free account
hub / github.com/FDio/vpp / test_session_with_fib

Method test_session_with_fib

test/test_bfd.py:2529–2615  ·  view source on GitHub ↗

BFD-FIB interactions

(self)

Source from the content-addressed store, hash-verified

2527 return False
2528
2529 def test_session_with_fib(self):
2530 """BFD-FIB interactions"""
2531
2532 # packets to match against both of the routes
2533 p = [
2534 (
2535 Ether(dst=self.pg0.local_mac, src=self.pg0.remote_mac)
2536 / IPv6(src="3001::1", dst="2001::1")
2537 / UDP(sport=1234, dport=1234)
2538 / Raw(b"\xa5" * 100)
2539 ),
2540 (
2541 Ether(dst=self.pg0.local_mac, src=self.pg0.remote_mac)
2542 / IPv6(src="3001::1", dst="2002::1")
2543 / UDP(sport=1234, dport=1234)
2544 / Raw(b"\xa5" * 100)
2545 ),
2546 ]
2547
2548 # Two different routes via a next-hop that will have a BFD session.
2549 # One of the routes is non-recursive route only for single-hop.
2550 if self.multihop:
2551 intf_index = 0xFFFFFFFF
2552 else:
2553 intf_index = self.pg0.sw_if_index
2554
2555 ip_2001_s_64 = VppIpRoute(
2556 self,
2557 "2001::",
2558 64,
2559 [VppRoutePath(self.dst_ip6_net, intf_index)],
2560 )
2561 ip_2002_s_64 = VppIpRoute(
2562 self, "2002::", 64, [VppRoutePath(self.dst_ip6_net, 0xFFFFFFFF)]
2563 )
2564 ip_2001_s_64.add_vpp_config()
2565 ip_2002_s_64.add_vpp_config()
2566
2567 # bring the session up now the routes are present
2568 self.vpp_session = VppBFDUDPSession(
2569 self,
2570 self.pg0,
2571 self.dst_ip6_net,
2572 local_addr=self.src_ip6_net,
2573 af=AF_INET6,
2574 multihop=self.multihop,
2575 )
2576 self.vpp_session.add_vpp_config()
2577 self.vpp_session.admin_up()
2578 self.test_session = BFDTestSession(
2579 self,
2580 self.pg0,
2581 AF_INET6,
2582 local_addr=self.src_ip6_net,
2583 peer_addr=self.dst_ip6_net,
2584 multihop=self.multihop,
2585 )
2586

Callers

nothing calls this directly

Calls 12

add_vpp_configMethod · 0.95
VppIpRouteClass · 0.90
VppRoutePathClass · 0.90
VppBFDUDPSessionClass · 0.90
BFDTestSessionClass · 0.85
bfd_session_upFunction · 0.85
bfd_session_downFunction · 0.85
pg_startMethod · 0.80
add_vpp_configMethod · 0.45
admin_upMethod · 0.45
add_streamMethod · 0.45
wait_for_packetMethod · 0.45

Tested by

no test coverage detected