BIER head
(self)
| 352 | self.send_and_assert_no_replies(self.pg0, pkts) |
| 353 | |
| 354 | def test_bier_head(self): |
| 355 | """BIER head""" |
| 356 | |
| 357 | MRouteItfFlags = VppEnum.vl_api_mfib_itf_flags_t |
| 358 | MRouteEntryFlags = VppEnum.vl_api_mfib_entry_flags_t |
| 359 | |
| 360 | # |
| 361 | # Add a BIER table for sub-domain 0, set 0, and BSL 256 |
| 362 | # |
| 363 | bti = VppBierTableID(0, 0, BIERLength.BIER_LEN_256) |
| 364 | bt = VppBierTable(self, bti, 77) |
| 365 | bt.add_vpp_config() |
| 366 | |
| 367 | # |
| 368 | # 2 bit positions via two next hops |
| 369 | # |
| 370 | nh1 = "10.0.0.1" |
| 371 | nh2 = "10.0.0.2" |
| 372 | ip_route_1 = VppIpRoute( |
| 373 | self, |
| 374 | nh1, |
| 375 | 32, |
| 376 | [ |
| 377 | VppRoutePath( |
| 378 | self.pg1.remote_ip4, |
| 379 | self.pg1.sw_if_index, |
| 380 | labels=[VppMplsLabel(2001)], |
| 381 | ) |
| 382 | ], |
| 383 | ) |
| 384 | ip_route_2 = VppIpRoute( |
| 385 | self, |
| 386 | nh2, |
| 387 | 32, |
| 388 | [ |
| 389 | VppRoutePath( |
| 390 | self.pg1.remote_ip4, |
| 391 | self.pg1.sw_if_index, |
| 392 | labels=[VppMplsLabel(2002)], |
| 393 | ) |
| 394 | ], |
| 395 | ) |
| 396 | ip_route_1.add_vpp_config() |
| 397 | ip_route_2.add_vpp_config() |
| 398 | |
| 399 | bier_route_1 = VppBierRoute( |
| 400 | self, bti, 1, [VppRoutePath(nh1, 0xFFFFFFFF, labels=[VppMplsLabel(101)])] |
| 401 | ) |
| 402 | bier_route_2 = VppBierRoute( |
| 403 | self, bti, 2, [VppRoutePath(nh2, 0xFFFFFFFF, labels=[VppMplsLabel(102)])] |
| 404 | ) |
| 405 | bier_route_1.add_vpp_config() |
| 406 | bier_route_2.add_vpp_config() |
| 407 | |
| 408 | # |
| 409 | # An imposition object with both bit-positions set |
| 410 | # |
| 411 | bi = VppBierImp(self, bti, 333, scapy.compat.chb(0x3) * 32) |
nothing calls this directly
no test coverage detected