-
Notifications
You must be signed in to change notification settings - Fork 1.4k
evpn vxlan fixes batch1 #20046
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
evpn vxlan fixes batch1 #20046
Conversation
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
9d4818f to
1bd1f0b
Compare
1bd1f0b to
fc3ac12
Compare
fc9bb2d to
5afcfe7
Compare
b72e8f3 to
059e501
Compare
zebra/zebra_rib.c
Outdated
| vtep_ip.ipaddr_v6 = tmp_nh->gate.ipv6; | ||
| } | ||
| zebra_rib_queue_evpn_route_del(tmp_nh->vrf_id, &vtep_ip, &ere->p); | ||
| /* zebra_rib_queue_evpn_route_del(re->vrf_id, &vtep_ip, &ere->p); */ |
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.
Can we drop this call at all then?
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.
Done
zebra/zebra_vxlan.c
Outdated
| * given vxlan interface. For deletion of vni from the vni table please use | ||
| * zebra_vxlan_if_vni_del() | ||
| */ | ||
| static int zebra_vxlan_if_vni_remove(struct zebra_if *zif, vni_t vni) |
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.
If we don't care about the return code, let's use void().
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.
Done
zebra/zebra_evpn_mh.h
Outdated
| /* SVI associated with the VLAN */ | ||
| struct zebra_if *vlan_zif; | ||
| /* VNI count */ | ||
| uint8_t vni_count; |
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.
Maybe let's name it vni_refcnt? Because now I'm reading it as a VNI mapping, but it's a reference count actually?
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.
Done
|
ci:rerun |
3861f2d to
34940b0
Compare
Set the vlan_id/bridge_if when the l3vni is configured. We were neglecting to set this info if the l3vni is configured after we read in the bridge/vlan info. This happens even at startup. Before: ``` alfred# show evpn vni 10 VNI: 10 Type: L3 Tenant VRF: vrf-red Vlan: 0 <============================ Bridge: - <=========================== Local Vtep Ip: 2.2.2.1 Vxlan-Intf: vxlan0 SVI-If: vlan10 State: Up VNI Filter: none System MAC: aa:bb:cc:00:12:11 Router MAC: aa:bb:cc:00:12:11 L2 VNIs: 20 ``` After: ``` alfred# show evpn vni 10 VNI: 10 Type: L3 Tenant VRF: vrf-red Vlan: 10 Bridge: bridge Local Vtep Ip: 2.2.2.1 Vxlan-Intf: vxlan0 SVI-If: vlan10 State: Up VNI Filter: none System MAC: aa:bb:cc:00:12:11 Router MAC: aa:bb:cc:00:12:11 L2 VNIs: 20 ``` Ticket: #3283598 Testing Done: Manual, evpn-min Signed-off-by: Stephen Worley <[email protected]>
Issue is: when new VNI is added, the access vlan - '1' acts as a placeholder till the sequence of updating the info for the new VNI is complete. In the update sequence the placeholder is dereferenced when the actual access-vlan for the VNI is updated. Hence when an actual vlan1 bridge exists this current code path assumes this is a placedolder and removes the vlan1-vni mapping. fix is to keep a ref count of the vni’s associated with the VLAN. So, when we reference and deference the VLAN->VNI mapping based on this ref count we could take the appropriate action. Ticket:#3102128 Testing Done: UT Signed-off-by: Ashwini Reddy <[email protected]>
Signed-off-by: Soumya Roy <[email protected]>
Add VNI's associated bridge and vlan info in json
output format.
torm-11# show evpn vni detail
VNI: 1008
Type: L2
Vlan: 1008
Bridge: bridge
...
Ticket:#3208813
Reviewed By:
Testing Done:
torm-11# show evpn vni detail json
[
{
"vni":1008,
"type":"L2",
"vlan":1008, <<< New field
"bridge":"bridge", <<< New field
"vrf":"vrf3",
"vxlanInterface":"vxlan0",
"ifindex":15,
"vtepIp":"27.0.0.15",
"mcastGroup":"239.1.1.108",
"advertiseGatewayMacip":"No",
"advertiseSviMacip":"No",
"numMacs":18,
"numArpNd":42,
"numRemoteVteps":[
"27.0.0.18",
"27.0.0.17",
"27.0.0.16"
]
},
]
Signed-off-by: Chirag Shah <[email protected]>
Add test to verify that L2 VNI JSON output includes "vlan" and
"bridge" fields that were missing before.
The test checks both PE1 and PE2 for VNI 101 to ensure the JSON
output from 'show evpn vni <l2vni> json' contains:
- "vlan" field with the VLAN ID
- "bridge" field with the bridge interface name
This validates the fix from commit 1a5ad2356b ("zebra: add vni
bridge vlan info in json output").
Signed-off-by: Soumya Roy <[email protected]>
Add a debug for deleting the NH for a evpn-vrf route. Signed-off-by: Stephen Worley <[email protected]>
Below is output of the change:
Ticket: #4074735
tor-12# show evpn vni
VNI Type VxLAN IF # MACs # ARPs # Remote VTEPs Tenant VRF VLAN BRIDGE
10400 L2 vxlan48 5 11 3 default 400 br_default
10300 L2 vxlan48 1 3 3 default 300 br_default
10100 L2 vxlan48 13 27 3 default 100 br_default
10200 L2 vxlan48 1 3 3 default 200 br_default
tor-12# show evpn vni json
{
"10400":{
"vni":10400,
"type":"L2",
"vxlanIf":"vxlan48",
"numMacs":5,
"numArpNd":11,
"numRemoteVteps":3,
"tenantVrf":"default",
"vlan":400,
"bridge":"br_default",
"remoteVteps":[
"10.10.3.14",
"10.10.3.13",
"10.10.3.11"
]
},
"10300":{
"vni":10300,
"type":"L2",
"vxlanIf":"vxlan48",
"numMacs":1,
"numArpNd":3,
"numRemoteVteps":3,
"tenantVrf":"default",
"vlan":300,
"bridge":"br_default",
"remoteVteps":[
"10.10.3.14",
"10.10.3.13",
"10.10.3.11"
]
},
tor-12# show evpn arp-cache vni 10400 ip 2011:11:44::124 json
{
"uptime":"00:00:06",
"ip":"2011:11:44::124",
"type":"local",
"state":"active",
"mac":"00:02:00:00:00:08",
"vlan":400,
"localSequence":0,
"remoteSequence":0,
"detectionCount":0,
"isDuplicate":false
}
tor-12# show evpn arp-cache vni 10400 ip 2011:11:44::124
IP: 2011:11:44::124
Type: local
State: active
Uptime: 00:00:11
MAC: 00:02:00:00:00:08
VLAN: 400
Sync-info: -
Flags: Router
Local Seq: 0 Remote Seq: 0
Signed-off-by: Ashwini Reddy <[email protected]>
Verify 'show evpn vni' includes VLAN and BRIDGE columns. Tests commit b99ffd9. Signed-off-by: Soumya Roy <[email protected]>
969609a to
3d16e6d
Compare
Add test case to verify that L3 VNI displays correct VLAN and bridge information instead of showing "Vlan: 0" and "Bridge: -". The test adds L3 VNI 999 with VLAN 999 on bridge br999 to the existing bgp_evpn_vxlan_topo1 topology and verifies that "show evpn vni 999" displays: - "Vlan: 999" (not 0) - "Bridge: br999" (not "-") This validates the fix from commit 3ad2a78 ("zebra: set vlan_id/bridge_if on l3vni configure") which addresses the issue where L3 VNI configuration was not populating these fields when the VNI is configured after bridge/VLAN interfaces are read. Signed-off-by: Soumya Roy <[email protected]>
We are missing some fpm hooks for rmac installation. Add them. Signed-off-by: Stephen Worley <[email protected]>
Let's assume the DUT receives sticky mac of a remote host, but it already learnt the same mac as local sticky mac. Currently, Zebra reprograms the local sticky to remote sticky MAC. When this happens, we don't log any message about the mac movement. So adding a log. UT after the fix: Leaf1 ------- Leaf2(DUT) To recreate this scenario, we need to configure route-map filter on Leaf1 to deny MACIP route coming from Leaf2. So that Leaf1 can generate MACIP route for the same sticky MAC and the DUT(already has local sticky MAC) can receive and process the remote sticky MAC. 2024-10-16T07:45:13.107733+00:00 leaf2 zebra[450183]: [V6SBB-9YZQG] Received remote mac add for MAC 00:0b:11:bb:00:01 VNI 10 VTEP 1.1.1.1, but it is already learnt as local sticky MAC on intf swp3 Ticket: #3803354 Signed-off-by: Krishnasamy R <[email protected]>
Rename vni_count to vni_refcnt to reflect what it is being used for Signed-off-by: Soumya Roy <[email protected]>
3d16e6d to
ff4308a
Compare
|
Could you fix |
" |
ff4308a to
913c753
Compare
Signed-off-by: Soumya Roy <[email protected]>
913c753 to
c336a6b
Compare
Fixed it |
This is batch commit MR for multiple evpn vxlan related bugs found internally and fixed.