-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FRR Patch] Added patch in FRR to send tag value associated with rout…
…e via Netlink to fpmsyncd (#20692) * Added patch in FRR to send tag value associated with route via NETLINK RTA_PRIORITY field which can be used as attribute/metadata in fpmsyncd for different use-cases. --------- Signed-off-by: Abhishek Dosi <[email protected]>
- Loading branch information
Showing
2 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
49 changes: 49 additions & 0 deletions
49
src/sonic-frr/patch/0063-Patch-to-send-tag-value-associated-with-route-via-ne.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
From c0418c02dabe901f5dc39c85ce2e80bd361d7c78 Mon Sep 17 00:00:00 2001 | ||
From: Abhishek Dosi <[email protected]> | ||
Date: Wed, 11 Dec 2024 11:19:05 +0000 | ||
Subject: [PATCH] Patch to send tag value associated with route via netlink in | ||
RTA_PRIORITY field. | ||
|
||
Signed-off-by: Abhishek Dosi <[email protected]> | ||
--- | ||
zebra/rt_netlink.c | 22 ++++++++++++++++++++-- | ||
1 file changed, 20 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c | ||
index 976c245c3..1f73f5759 100644 | ||
--- a/zebra/rt_netlink.c | ||
+++ b/zebra/rt_netlink.c | ||
@@ -2348,10 +2348,28 @@ ssize_t netlink_route_multipath_msg_encode(int cmd, struct zebra_dplane_ctx *ctx | ||
* path(s) | ||
* by the routing protocol and for communicating with protocol peers. | ||
*/ | ||
- if (!nl_attr_put32(&req->n, datalen, RTA_PRIORITY, | ||
- ROUTE_INSTALLATION_METRIC)) | ||
+ if (fpm) | ||
+ { | ||
+ /* Patch to send tag value as route attribute using RTA_PRIORITY | ||
+ * which can be used as metadata/attribute to take application specific | ||
+ * action. As seen in above comment this field is not use anyways and can be | ||
+ * use by fpmsyncd */ | ||
+ if (!nl_attr_put32(&req->n, datalen, RTA_PRIORITY, | ||
+ cmd == RTM_DELROUTE ? dplane_ctx_get_old_tag(ctx) : | ||
+ dplane_ctx_get_tag(ctx))) | ||
+ { | ||
return 0; | ||
|
||
+ } | ||
+ } | ||
+ else | ||
+ { | ||
+ if (!nl_attr_put32(&req->n, datalen, RTA_PRIORITY, | ||
+ ROUTE_INSTALLATION_METRIC)) | ||
+ { | ||
+ return 0; | ||
+ } | ||
+ } | ||
#if defined(SUPPORT_REALMS) | ||
if (cmd == RTM_DELROUTE) | ||
tag = dplane_ctx_get_old_tag(ctx); | ||
-- | ||
2.25.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters