Skip to content

Commit

Permalink
zebra: svd and mvab bug fixes
Browse files Browse the repository at this point in the history
Ticket: 2730328, 2724075
Reviewed By: CCR-11741, CCR-11746
Testing Done: Unit Test

2730328: At high bridge-vids count, VNI devices are not added in FRR if
FRR restarts after loading e/n/i
The issue is the wrt buffer overflow for netlink_recv_msg.
We have defined the kernel recv message buffer in stack which is of size 32768 (32K).

When the configuration is applied without FRR restart things work fine
because the recv message from kernel is well within the limit of 32K.
However with this configuration, when the FRR was restarted I could see that
some recv messages were crossing the 32K limit and hence weren't processed.
Below error logs were seen when frr was restarted with the confuguration.
2021/08/09 05:59:55 ZEBRA: [EC 4043309092] netlink-cmd (NS 0) error: data remnant size 32768
Fix is to increase the buffer size by another 2K

2724075: evpn mh/SVD - some of the remote neighs/macs aren't installed
in kernel post ifdown/ifup bridge

The issue was specific to SVD. During ifdown/ifup of the bridge,
I could see that the access-bd was not associated with the vni and hence
the remote neighs were not getting programmed in the kernel.
Fix is to reference (or associate) vxlan vni to the access-bd when
the vni is reported up. With this fix, I was able to see the remote
neighs getting programmed to the kernel.

Signed-off-by: Sharath Ramamurthy <sramamurthy@nvidia.com>
  • Loading branch information
sharathr authored and sworleys committed Feb 9, 2023
1 parent ef0edd3 commit 73c438e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion zebra/kernel_netlink.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ extern "C" {
((struct rtattr *)(((char *)(h)) + NLMSG_ALIGN(sizeof(struct nhmsg))))


#define NL_RCV_PKT_BUF_SIZE 32768
#define NL_RCV_PKT_BUF_SIZE (34 * 1024)
#define NL_PKT_BUF_SIZE 8192

/*
Expand Down
3 changes: 3 additions & 0 deletions zebra/zebra_vxlan_if.c
Original file line number Diff line number Diff line change
Expand Up @@ -863,6 +863,8 @@ int zebra_vxlan_if_vni_down(struct interface *ifp, struct zebra_vxlan_vni *vnip)
if (zl3vni)
listnode_delete(zl3vni->l2vnis, zevpn);

zebra_evpn_vl_vxl_deref(vnip->access_vlan, vnip->vni, zif);

/* Delete this VNI from BGP. */
zebra_evpn_send_del_to_client(zevpn);

Expand Down Expand Up @@ -953,6 +955,7 @@ int zebra_vxlan_if_vni_up(struct interface *ifp, struct zebra_vxlan_vni *vnip)
}

assert(zevpn->vxlan_if == ifp);
zebra_evpn_vl_vxl_ref(vnip->access_vlan, vnip->vni, zif);
vlan_if = zvni_map_to_svi(vnip->access_vlan,
zif->brslave_info.br_if);
if (vlan_if) {
Expand Down

0 comments on commit 73c438e

Please sign in to comment.