mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-14 12:41:21 +00:00
zebra: When using Nexthop groups, use v6 RR semantics
The nexthop group route replace operation was made consistent across all versions of the kernel. A v6 route replacement does not need to do a delete than add when using nexthop groups Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
parent
7fe9333dd7
commit
7e1b56ba98
@ -2209,7 +2209,8 @@ ssize_t netlink_route_multipath_msg_encode(int cmd, struct zebra_dplane_ctx *ctx
|
||||
req->n.nlmsg_flags = NLM_F_CREATE | NLM_F_REQUEST;
|
||||
|
||||
if (((cmd == RTM_NEWROUTE) &&
|
||||
((p->family == AF_INET) || zrouter.v6_rr_semantics)) ||
|
||||
((p->family == AF_INET) || kernel_nexthops_supported() ||
|
||||
zrouter.v6_rr_semantics)) ||
|
||||
force_rr)
|
||||
req->n.nlmsg_flags |= NLM_F_REPLACE;
|
||||
|
||||
@ -3095,7 +3096,8 @@ netlink_put_route_update_msg(struct nl_batch *bth, struct zebra_dplane_ctx *ctx)
|
||||
} else if (dplane_ctx_get_op(ctx) == DPLANE_OP_ROUTE_INSTALL) {
|
||||
cmd = RTM_NEWROUTE;
|
||||
} else if (dplane_ctx_get_op(ctx) == DPLANE_OP_ROUTE_UPDATE) {
|
||||
if (p->family == AF_INET || zrouter.v6_rr_semantics) {
|
||||
if (p->family == AF_INET || kernel_nexthops_supported() ||
|
||||
zrouter.v6_rr_semantics) {
|
||||
/* Single 'replace' operation */
|
||||
|
||||
/*
|
||||
|
@ -4028,6 +4028,17 @@ static int config_write_protocol(struct vty *vty)
|
||||
return 1;
|
||||
}
|
||||
|
||||
static inline bool zebra_vty_v6_rr_semantics_used(void)
|
||||
{
|
||||
if (zebra_nhg_kernel_nexthops_enabled())
|
||||
return true;
|
||||
|
||||
if (zrouter.v6_rr_semantics)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
DEFUN (show_zebra,
|
||||
show_zebra_cmd,
|
||||
"show zebra",
|
||||
@ -4048,7 +4059,8 @@ DEFUN (show_zebra,
|
||||
ttable_add_row(table, "EVPN|%s", is_evpn_enabled() ? "On" : "Off");
|
||||
ttable_add_row(table, "Kernel socket buffer size|%d", rcvbufsize);
|
||||
ttable_add_row(table, "v6 Route Replace Semantics|%s",
|
||||
zrouter.v6_rr_semantics ? "Replace" : "Delete then Add");
|
||||
zebra_vty_v6_rr_semantics_used() ? "Replace"
|
||||
: "Delete then Add");
|
||||
|
||||
#ifdef GNU_LINUX
|
||||
if (!vrf_is_backend_netns())
|
||||
|
Loading…
Reference in New Issue
Block a user