Skip to content

Conversation

@soumyar-roy
Copy link
Contributor

@soumyar-roy soumyar-roy commented Nov 13, 2025

This is batch commit MR for multiple evpn vxlan related bugs found internally and fixed.

@github-actions
Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@soumyar-roy soumyar-roy marked this pull request as draft November 13, 2025 23:31
@soumyar-roy soumyar-roy force-pushed the soumya/cl_to_frr_batch1 branch from 9d4818f to 1bd1f0b Compare November 13, 2025 23:52
@soumyar-roy soumyar-roy force-pushed the soumya/cl_to_frr_batch1 branch from 1bd1f0b to fc3ac12 Compare November 14, 2025 00:01
@soumyar-roy soumyar-roy force-pushed the soumya/cl_to_frr_batch1 branch from fc9bb2d to 5afcfe7 Compare November 14, 2025 00:15
@github-actions github-actions bot added size/L and removed size/M labels Nov 14, 2025
@soumyar-roy soumyar-roy force-pushed the soumya/cl_to_frr_batch1 branch 9 times, most recently from b72e8f3 to 059e501 Compare November 14, 2025 07:14
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); */
Copy link
Member

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

* 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)
Copy link
Member

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().

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

/* SVI associated with the VLAN */
struct zebra_if *vlan_zif;
/* VNI count */
uint8_t vni_count;
Copy link
Member

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@soumyar-roy soumyar-roy marked this pull request as ready for review November 14, 2025 18:42
@soumyar-roy
Copy link
Contributor Author

ci:rerun

@soumyar-roy soumyar-roy force-pushed the soumya/cl_to_frr_batch1 branch from 3861f2d to 34940b0 Compare November 17, 2025 21:11
sworleys and others added 8 commits November 17, 2025 15:09
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]>
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]>
@soumyar-roy soumyar-roy force-pushed the soumya/cl_to_frr_batch1 branch 2 times, most recently from 969609a to 3d16e6d Compare November 18, 2025 05:02
soumyar-roy and others added 4 commits November 17, 2025 21:03
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]>
@soumyar-roy soumyar-roy force-pushed the soumya/cl_to_frr_batch1 branch from 3d16e6d to ff4308a Compare November 18, 2025 05:04
@ton31337
Copy link
Member

Could you fix Verify Source check before merging?

@soumyar-roy
Copy link
Contributor Author

soumyar-roy commented Nov 18, 2025

Could you fix Verify Source check before merging?

"
18-Nov-2025 05:05:19 | < WARNING: quoted string split across lines
18-Nov-2025 05:05:19 | < #2185: FILE: /tmp/f1-3206634/zebra_evpn_mac.c:2185:
"
It has a fail for this, for multiline string split, but isn't splitting here better than having them together ?>>if (IS_ZEBRA_DEBUG_VXLAN)
zlog_debug(" Add/Update %sMAC %pEA intf %s(%u) VID %u -> VNI %u%s, "
"entry exists and has not changed ",
sticky ? "sticky " : "",
macaddr, ifp->name,
ifp->ifindex, vid, zevpn->vni,
local_inactive
? " local_inactive"
: "");

@soumyar-roy soumyar-roy force-pushed the soumya/cl_to_frr_batch1 branch from ff4308a to 913c753 Compare November 18, 2025 19:55
@soumyar-roy soumyar-roy force-pushed the soumya/cl_to_frr_batch1 branch from 913c753 to c336a6b Compare November 18, 2025 19:58
@soumyar-roy
Copy link
Contributor Author

Could you fix Verify Source check before merging?

Fixed it

@ton31337 ton31337 merged commit e46d1fb into FRRouting:master Nov 20, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants