Hello vpp dev team,
I’m working on Multi-context - add/update/delete ip4 vrf instances test case (make test framework, usage of vpp_lite) and I have an issue with deleting/reseting of VRF / FIB table. First I create 5 VRFs (1, 2, ..., 5) with three packet-generator interfaces in every VRF (VRF1: pg0, pg1, pg2; VRF2: pg3, pg4, pg5; ...) and run traffic test – everything is OK there.
Unfortunately there is an issue with deleting VRFs. I tried two available possibilities:
1. Use of reset_vrf API command (description: Reset VRF (remove all routes etc) request.)
- it seems it doesn’t work at all – no route is deleted for defined VRF as well as no ARP entry is removed and packets are routed inside VRFs between all pg interfaces in the VRF (e.g. from pg0 and pg1 to pg2 in VRF1, ...)
2. Use of reset_fib API command (description: Reset fib table request.)
- Here I can see that corresponding ARP entries are deleted
- But the routes in the FIB table are not deleted
- And routing still works on the last deleted/reset VRF
----------------------------------------------------------------------
Starting IP4 VRF Multi-instance test 4 - delete 4 VRFs ...
----------------------------------------------------------------------
13:18:37,448 VRF ID 3 deleted
13:18:37,449 VRF ID 4 deleted
13:18:37,451 VRF ID 1 deleted
13:18:37,452 VRF ID 5 deleted
13:18:37,455 show ip fib
ipv4-VRF:0, fib_index 0, flow hash: src dst sport dport proto
0.0.0.0/0
unicast-ip4-chain
[@0]: dpo-load-balance: [index:0 buckets:1 uRPF:0 to:[60:43120]]
[0] [@0]: dpo-drop ip4
0.0.0.0/32
unicast-ip4-chain
[@0]: dpo-load-balance: [index:1 buckets:1 uRPF:1 to:[0:0]]
[0] [@0]: dpo-drop ip4
172.16.1.1/32
unicast-ip4-chain
[@0]: dpo-load-balance: [index:24 buckets:1 uRPF:0 to:[0:0]]
[0] [@0]: dpo-drop ip4
172.16.4.1/32
unicast-ip4-chain
[@0]: dpo-load-balance: [index:51 buckets:1 uRPF:0 to:[0:0]]
[0] [@0]: dpo-drop ip4
172.16.7.1/32
unicast-ip4-chain
[@0]: dpo-load-balance: [index:78 buckets:1 uRPF:0 to:[0:0]]
[0] [@0]: dpo-drop ip4
172.16.10.1/32
unicast-ip4-chain
[@0]: dpo-load-balance: [index:105 buckets:1 uRPF:0 to:[0:0]]
[0] [@0]: dpo-drop ip4
172.16.13.1/32
unicast-ip4-chain
[@0]: dpo-load-balance: [index:38 buckets:1 uRPF:0 to:[0:0]]
[0] [@0]: dpo-drop ip4
224.0.0.0/4
unicast-ip4-chain
[@0]: dpo-load-balance: [index:3 buckets:1 uRPF:3 to:[0:0]]
[0] [@0]: dpo-drop ip4
240.0.0.0/4
unicast-ip4-chain
[@0]: dpo-load-balance: [index:2 buckets:1 uRPF:2 to:[0:0]]
[0] [@0]: dpo-drop ip4
255.255.255.255/32
unicast-ip4-chain
[@0]: dpo-load-balance: [index:4 buckets:1 uRPF:4 to:[0:0]]
[0] [@0]: dpo-drop ip4
ipv4-VRF:1, fib_index 1, flow hash: src dst sport dport proto
0.0.0.0/0
unicast-ip4-chain
[@0]: dpo-load-balance: [index:19 buckets:1 uRPF:17 to:[0:0]]
[0] [@0]: dpo-drop ip4
0.0.0.0/32
unicast-ip4-chain
[@0]: dpo-load-balance: [index:20 buckets:1 uRPF:18 to:[0:0]]
[0] [@0]: dpo-drop ip4
172.16.1.1/32
unicast-ip4-chain
[@0]: dpo-load-balance: [index:26 buckets:1 uRPF:24 to:[0:0]]
[0] [@2]: dpo-receive: 172.16.1.1 on pg0
172.16.1.0/24
unicast-ip4-chain
[@0]: dpo-load-balance: [index:25 buckets:1 uRPF:23 to:[10:9772]]
[0] [@0]: dpo-drop ip4
172.16.2.0/24
unicast-ip4-chain
[@0]: dpo-load-balance: [index:32 buckets:1 uRPF:30 to:[10:6850]]
[0] [@0]: dpo-drop ip4
172.16.2.1/32
unicast-ip4-chain
[@0]: dpo-load-balance: [index:33 buckets:1 uRPF:31 to:[0:0]]
[0] [@2]: dpo-receive: 172.16.2.1 on pg1
172.16.3.0/24
unicast-ip4-chain
[@0]: dpo-load-balance: [index:39 buckets:1 uRPF:37 to:[10:5788]]
[0] [@0]: dpo-drop ip4
172.16.3.1/32
unicast-ip4-chain
[@0]: dpo-load-balance: [index:40 buckets:1 uRPF:38 to:[0:0]]
[0] [@2]: dpo-receive: 172.16.3.1 on pg2
224.0.0.0/4
unicast-ip4-chain
[@0]: dpo-load-balance: [index:22 buckets:1 uRPF:20 to:[0:0]]
[0] [@0]: dpo-drop ip4
240.0.0.0/4
unicast-ip4-chain
[@0]: dpo-load-balance: [index:21 buckets:1 uRPF:19 to:[0:0]]
[0] [@0]: dpo-drop ip4
255.255.255.255/32
unicast-ip4-chain
[@0]: dpo-load-balance: [index:23 buckets:1 uRPF:21 to:[0:0]]
[0] [@0]: dpo-drop ip4
ipv4-VRF:2, fib_index 2, flow hash: src dst sport dport proto
0.0.0.0/0
unicast-ip4-chain
[@0]: dpo-load-balance: [index:46 buckets:1 uRPF:44 to:[0:0]]
[0] [@0]: dpo-drop ip4
0.0.0.0/32
unicast-ip4-chain
[@0]: dpo-load-balance: [index:47 buckets:1 uRPF:45 to:[0:0]]
[0] [@0]: dpo-drop ip4
172.16.4.1/32
unicast-ip4-chain
[@0]: dpo-load-balance: [index:53 buckets:1 uRPF:51 to:[0:0]]
[0] [@2]: dpo-receive: 172.16.4.1 on pg3
172.16.4.0/24
unicast-ip4-chain
[@0]: dpo-load-balance: [index:52 buckets:1 uRPF:50 to:[20:12502]]
[0] [@4]: ipv4-glean: pg3
172.16.5.0/24
unicast-ip4-chain
[@0]: dpo-load-balance: [index:59 buckets:1 uRPF:57 to:[20:16526]]
[0] [@4]: ipv4-glean: pg4
172.16.5.1/32
unicast-ip4-chain
[@0]: dpo-load-balance: [index:60 buckets:1 uRPF:58 to:[0:0]]
[0] [@2]: dpo-receive: 172.16.5.1 on pg4
172.16.6.0/24
unicast-ip4-chain
[@0]: dpo-load-balance: [index:66 buckets:1 uRPF:64 to:[20:13508]]
[0] [@4]: ipv4-glean: pg5
172.16.6.1/32
unicast-ip4-chain
[@0]: dpo-load-balance: [index:67 buckets:1 uRPF:65 to:[0:0]]
[0] [@2]: dpo-receive: 172.16.6.1 on pg5
224.0.0.0/4
unicast-ip4-chain
[@0]: dpo-load-balance: [index:49 buckets:1 uRPF:47 to:[0:0]]
[0] [@0]: dpo-drop ip4
240.0.0.0/4
unicast-ip4-chain
[@0]: dpo-load-balance: [index:48 buckets:1 uRPF:46 to:[0:0]]
[0] [@0]: dpo-drop ip4
255.255.255.255/32
unicast-ip4-chain
[@0]: dpo-load-balance: [index:50 buckets:1 uRPF:48 to:[0:0]]
[0] [@0]: dpo-drop ip4
ipv4-VRF:3, fib_index 3, flow hash: src dst sport dport proto
0.0.0.0/0
unicast-ip4-chain
[@0]: dpo-load-balance: [index:73 buckets:1 uRPF:71 to:[0:0]]
[0] [@0]: dpo-drop ip4
0.0.0.0/32
unicast-ip4-chain
[@0]: dpo-load-balance: [index:74 buckets:1 uRPF:72 to:[0:0]]
[0] [@0]: dpo-drop ip4
172.16.7.1/32
unicast-ip4-chain
[@0]: dpo-load-balance: [index:80 buckets:1 uRPF:78 to:[0:0]]
[0] [@2]: dpo-receive: 172.16.7.1 on pg6
172.16.7.0/24
unicast-ip4-chain
[@0]: dpo-load-balance: [index:79 buckets:1 uRPF:77 to:[0:0]]
[0] [@0]: dpo-drop ip4
172.16.8.0/24
unicast-ip4-chain
[@0]: dpo-load-balance: [index:86 buckets:1 uRPF:84 to:[0:0]]
[0] [@0]: dpo-drop ip4
172.16.8.1/32
unicast-ip4-chain
[@0]: dpo-load-balance: [index:87 buckets:1 uRPF:85 to:[0:0]]
[0] [@2]: dpo-receive: 172.16.8.1 on pg7
172.16.9.0/24
unicast-ip4-chain
[@0]: dpo-load-balance: [index:93 buckets:1 uRPF:91 to:[0:0]]
[0] [@0]: dpo-drop ip4
172.16.9.1/32
unicast-ip4-chain
[@0]: dpo-load-balance: [index:94 buckets:1 uRPF:92 to:[0:0]]
[0] [@2]: dpo-receive: 172.16.9.1 on pg8
224.0.0.0/4
unicast-ip4-chain
[@0]: dpo-load-balance: [index:76 buckets:1 uRPF:74 to:[0:0]]
[0] [@0]: dpo-drop ip4
240.0.0.0/4
unicast-ip4-chain
[@0]: dpo-load-balance: [index:75 buckets:1 uRPF:73 to:[0:0]]
[0] [@0]: dpo-drop ip4
255.255.255.255/32
unicast-ip4-chain
[@0]: dpo-load-balance: [index:77 buckets:1 uRPF:75 to:[0:0]]
[0] [@0]: dpo-drop ip4
ipv4-VRF:4, fib_index 4, flow hash: src dst sport dport proto
0.0.0.0/0
unicast-ip4-chain
[@0]: dpo-load-balance: [index:100 buckets:1 uRPF:98 to:[0:0]]
[0] [@0]: dpo-drop ip4
0.0.0.0/32
unicast-ip4-chain
[@0]: dpo-load-balance: [index:101 buckets:1 uRPF:99 to:[0:0]]
[0] [@0]: dpo-drop ip4
172.16.10.1/32
unicast-ip4-chain
[@0]: dpo-load-balance: [index:107 buckets:1 uRPF:105 to:[0:0]]
[0] [@2]: dpo-receive: 172.16.10.1 on pg9
172.16.10.0/24
unicast-ip4-chain
[@0]: dpo-load-balance: [index:106 buckets:1 uRPF:104 to:[0:0]]
[0] [@0]: dpo-drop ip4
172.16.11.0/24
unicast-ip4-chain
[@0]: dpo-load-balance: [index:113 buckets:1 uRPF:111 to:[0:0]]
[0] [@0]: dpo-drop ip4
172.16.11.1/32
unicast-ip4-chain
[@0]: dpo-load-balance: [index:114 buckets:1 uRPF:112 to:[0:0]]
[0] [@2]: dpo-receive: 172.16.11.1 on pg10
172.16.12.0/24
unicast-ip4-chain
[@0]: dpo-load-balance: [index:120 buckets:1 uRPF:118 to:[0:0]]
[0] [@0]: dpo-drop ip4
172.16.12.1/32
unicast-ip4-chain
[@0]: dpo-load-balance: [index:121 buckets:1 uRPF:119 to:[0:0]]
[0] [@2]: dpo-receive: 172.16.12.1 on pg11
224.0.0.0/4
unicast-ip4-chain
[@0]: dpo-load-balance: [index:103 buckets:1 uRPF:101 to:[0:0]]
[0] [@0]: dpo-drop ip4
240.0.0.0/4
unicast-ip4-chain
[@0]: dpo-load-balance: [index:102 buckets:1 uRPF:100 to:[0:0]]
[0] [@0]: dpo-drop ip4
255.255.255.255/32
unicast-ip4-chain
[@0]: dpo-load-balance: [index:104 buckets:1 uRPF:102 to:[0:0]]
[0] [@0]: dpo-drop ip4
ipv4-VRF:5, fib_index 5, flow hash: src dst sport dport proto
0.0.0.0/0
unicast-ip4-chain
[@0]: dpo-load-balance: [index:45 buckets:1 uRPF:52 to:[0:0]]
[0] [@0]: dpo-drop ip4
0.0.0.0/32
unicast-ip4-chain
[@0]: dpo-load-balance: [index:44 buckets:1 uRPF:43 to:[0:0]]
[0] [@0]: dpo-drop ip4
172.16.13.1/32
unicast-ip4-chain
[@0]: dpo-load-balance: [index:36 buckets:1 uRPF:35 to:[0:0]]
[0] [@2]: dpo-receive: 172.16.13.1 on pg12
172.16.13.0/24
unicast-ip4-chain
[@0]: dpo-load-balance: [index:37 buckets:1 uRPF:36 to:[0:0]]
[0] [@0]: dpo-drop ip4
172.16.14.0/24
unicast-ip4-chain
[@0]: dpo-load-balance: [index:28 buckets:1 uRPF:27 to:[0:0]]
[0] [@0]: dpo-drop ip4
172.16.14.1/32
unicast-ip4-chain
[@0]: dpo-load-balance: [index:27 buckets:1 uRPF:26 to:[0:0]]
[0] [@2]: dpo-receive: 172.16.14.1 on pg13
172.16.15.0/24
unicast-ip4-chain
[@0]: dpo-load-balance: [index:132 buckets:1 uRPF:130 to:[0:0]]
[0] [@0]: dpo-drop ip4
172.16.15.1/32
unicast-ip4-chain
[@0]: dpo-load-balance: [index:133 buckets:1 uRPF:131 to:[0:0]]
[0] [@2]: dpo-receive: 172.16.15.1 on pg14
224.0.0.0/4
unicast-ip4-chain
[@0]: dpo-load-balance: [index:42 buckets:1 uRPF:41 to:[0:0]]
[0] [@0]: dpo-drop ip4
240.0.0.0/4
unicast-ip4-chain
[@0]: dpo-load-balance: [index:43 buckets:1 uRPF:42 to:[0:0]]
[0] [@0]: dpo-drop ip4
255.255.255.255/32
unicast-ip4-chain
[@0]: dpo-load-balance: [index:41 buckets:1 uRPF:40 to:[0:0]]
[0] [@0]: dpo-drop ip4
13:18:37,457 show ip arp
13:18:38,768 File /tmp/vpp-unittest-TestIp4VrfMultiInst-zERM7t/pg0_out.pcap does not exist, probably because no packets arrived
13:18:38,768 File /tmp/vpp-unittest-TestIp4VrfMultiInst-zERM7t/pg1_out.pcap does not exist, probably because no packets arrived
13:18:38,768 File /tmp/vpp-unittest-TestIp4VrfMultiInst-zERM7t/pg2_out.pcap does not exist, probably because no packets arrived
13:18:38,768 File /tmp/vpp-unittest-TestIp4VrfMultiInst-zERM7t/pg3_out.pcap does not exist, probably because no packets arrived
13:18:38,768 File /tmp/vpp-unittest-TestIp4VrfMultiInst-zERM7t/pg4_out.pcap does not exist, probably because no packets arrived
13:18:38,768 File /tmp/vpp-unittest-TestIp4VrfMultiInst-zERM7t/pg5_out.pcap does not exist, probably because no packets arrived
13:18:38,768 File /tmp/vpp-unittest-TestIp4VrfMultiInst-zERM7t/pg6_out.pcap does not exist, probably because no packets arrived
13:18:38,768 File /tmp/vpp-unittest-TestIp4VrfMultiInst-zERM7t/pg7_out.pcap does not exist, probably because no packets arrived
13:18:38,768 File /tmp/vpp-unittest-TestIp4VrfMultiInst-zERM7t/pg8_out.pcap does not exist, probably because no packets arrived
13:18:38,768 File /tmp/vpp-unittest-TestIp4VrfMultiInst-zERM7t/pg9_out.pcap does not exist, probably because no packets arrived
13:18:38,769 File /tmp/vpp-unittest-TestIp4VrfMultiInst-zERM7t/pg10_out.pcap does not exist, probably because no packets arrived
13:18:38,769 File /tmp/vpp-unittest-TestIp4VrfMultiInst-zERM7t/pg11_out.pcap does not exist, probably because no packets arrived
…
======================================================================
ERROR: IP4 VRF Multi-instance test 4 - delete 4 VRFs
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/vpp/Documents/vpp/test/test_ip4_vrf_multi_instance.py", line 418, in test_ip4_vrf_04
self.run_verify_test()
File "/home/vpp/Documents/vpp/test/test_ip4_vrf_multi_instance.py", line 343, in run_verify_test
"the capture is not empty!" % pg_if.name)
RuntimeError: Interface pg12 is not in VRF but the capture is not empty!
=> Packets reached the pg12 interface in deleted/reset VRF5…