-
Notifications
You must be signed in to change notification settings - Fork 1.4k
zebra: use nexthop instead of route vrf_id for EVPN #18309
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Can we get a topotest to show that this is fixed? |
Sure, will add one! |
d3b7140
to
1fa0bb6
Compare
Okay, added the topotest now. I created a new topology for it as route-leaking (as far as I am aware at least) only applies to vrf-lite, not to the netns vrf backend (which the bgp_evpn_rt5 topology relies on). If I revert f5dd2e6 and therefore run it without my changes, the topotest fails because the router MAC is wrongly updated:
|
1fa0bb6
to
713510d
Compare
I've slightly changed the topotest, it didn't catch all failure cases (it only looked at the first RMAC in the list, not at the RMAC count in the list). If the first one in the list was the right one it did not properly return a failure. With the code previous to this PR it now fails with:
|
style suggestions by frrbot. |
713510d
to
60950bb
Compare
done! |
60950bb
to
901b0f1
Compare
ci:rerun unrelated error |
Anything missing for this PR to be accepted? |
Could you rebase ? I get an errror
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please rebase.
The test was working before the merge of 0c14dd3
Could you take inspiration from #18708 to clarify the topotest ? |
901b0f1
to
f74c838
Compare
@louis-6wind Yeah, will do. |
@louis-6wind as you are reducing complexity in |
@pguibert6WIND has created a new topology because we need to test both situations: underlay in default VRF and in another VRF. We have to make sure that the new code does not make regression in working setup |
He just introduced r4 from what I can tell in |
Or to say it differently: I think it does not make sense to introduce a new topology for it (as I do with this). I'll wait for #18708 to be merged and add route-leaking / vrf import in the |
Today zebra tracks EVPN vtep_ips in the L3-VNI of the route_entry. Leaking routes in bgpd and using different RMACs on the remote side for different L3-VNIs for a single VTEP leads to updates in the leak destination VRF which is not desired. Zebra gets the source VRF in vrf_id of the nexthops. This nexthop vrf_id is now used for adding/ updating/deleting the l3vni nexthop. Signed-off-by: Christopher Dziomba <christopher.dziomba@telekom.de>
f74c838
to
86e71c6
Compare
Okay, after carefully looking at #18358 again, it did not implement leaking for the usecase I needed, thanks for pointing that out again. I added a second VRF to R2 and created another router, R3, because R1 is not suited for In general duplicate RMACs could still happen when routes with conflicting evpn information are advertised (same VTEP IP but with different RMAC), maybe changing log |
86e71c6
to
e785d97
Compare
Forget about it, I came up with a better idea to not introduce R3, keeping the topology smaller: |
e785d97
to
78abdb2
Compare
done! |
64195e4
to
93d8f32
Compare
An additional VRF, 102, is introduced on both routers, importing r1 routes from VRF 101 into VRF 102 on r2 and vice versa (both on r2, because r1 is in netns mode and can not use route import). RMACs and ping (from VRF 101 to VRF 102 on r1, going through r2) is then checked. All RMACs are created deterministically, using 52:54:00:00:<router>:<vrf> to ease debugging and checks. Signed-off-by: Christopher Dziomba <christopher.dziomba@telekom.de>
93d8f32
to
fd975ad
Compare
There is a zebra crash.
The crash was previously reported here: It seems that both netns contexts share the same info in memory for table 254 (main linux rt table), which is incorrect. |
Not that. Let's dissect the backtrace.
req is NULL because data is NULL
buf is NULL
bth->buf_head is NULL
bth->buf_head is NULL
bth->buf_head is NULL
batch.buf_head is NULL. It was set by nl_batch_init() -> nl_batch_reset()
It means that nl_batch_tx_buf is NULL The only place it is free is kernel_terminate() |
@louis-6wind thank you very much! So, I see that So I think this was introduced by c416603, freeing the global |
Yes, nl_batch_tx_buf should be deleted only on the last ns deletion |
The nl batch buffer was destroyed too early when a netns was terminated. Now freeing the buffer later in router_terminate allows netlink messages to be still processed. Signed-off-by: Christopher Dziomba <christopher.dziomba@telekom.de>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Today zebra tracks EVPN vtep_ips in the L3-VNI of the route_entry. Leaking routes in bgpd and using different RMACs on the remote side for different L3-VNIs for a single VTEP leads to updates in the leak destination VRF which is not desired. Zebra gets the source VRF in vrf_id of the nexthops. This nexthop vrf_id is now used for adding/ updating/deleting the l3vni nexthop.
Should fix #18190