]> git.puffer.fish Git - mirror/frr.git/commit
zebra: optimization on the mac addition for evpn-mh 10862/head
authoranlan_cs <vic.lan@pica8.com>
Thu, 24 Mar 2022 12:42:43 +0000 (20:42 +0800)
committeranlan_cs <vic.lan@pica8.com>
Thu, 24 Mar 2022 14:31:50 +0000 (22:31 +0800)
commitb83d220aa94d72591544c0d904beaf9f70f7217a
tree4114e228536b44c4d2c97e1ba91e9a03cd495c54
parent511935cfa4c3c8ac4d5c4d8d5a9ef36e4b2eb507
zebra: optimization on the mac addition for evpn-mh

When `zebra_evpn_mac_svi_add()` adds one found mac by
`zebra_evpn_mac_lookup()` and the found mac is without
svi flag, then call `zebra_evpn_mac_svi_add()` to create
one appropriate mac, but it will call `zebra_evpn_mac_lookup()`
the second time. So lookup twice, the procedure is redundant.

Just an optimization for it, make sure only lookup once.

Modify `zebra_evpn_mac_gw_macip_add()` to check the `macp`
parameter passed by caller, so it can distinguish whether
really need lookup or not.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
zebra/zebra_evpn_mac.c