Skip to content

Commit 5b6ff85

Browse files
authored
[FRR Patch] Added patch in FRR to send tag value associated with route 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]>
1 parent ade34bf commit 5b6ff85

File tree

2 files changed

+50
-0
lines changed

2 files changed

+50
-0
lines changed
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
From c0418c02dabe901f5dc39c85ce2e80bd361d7c78 Mon Sep 17 00:00:00 2001
2+
From: Abhishek Dosi <[email protected]>
3+
Date: Wed, 11 Dec 2024 11:19:05 +0000
4+
Subject: [PATCH] Patch to send tag value associated with route via netlink in
5+
RTA_PRIORITY field.
6+
7+
Signed-off-by: Abhishek Dosi <[email protected]>
8+
---
9+
zebra/rt_netlink.c | 22 ++++++++++++++++++++--
10+
1 file changed, 20 insertions(+), 2 deletions(-)
11+
12+
diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c
13+
index 976c245c3..1f73f5759 100644
14+
--- a/zebra/rt_netlink.c
15+
+++ b/zebra/rt_netlink.c
16+
@@ -2348,10 +2348,28 @@ ssize_t netlink_route_multipath_msg_encode(int cmd, struct zebra_dplane_ctx *ctx
17+
* path(s)
18+
* by the routing protocol and for communicating with protocol peers.
19+
*/
20+
- if (!nl_attr_put32(&req->n, datalen, RTA_PRIORITY,
21+
- ROUTE_INSTALLATION_METRIC))
22+
+ if (fpm)
23+
+ {
24+
+ /* Patch to send tag value as route attribute using RTA_PRIORITY
25+
+ * which can be used as metadata/attribute to take application specific
26+
+ * action. As seen in above comment this field is not use anyways and can be
27+
+ * use by fpmsyncd */
28+
+ if (!nl_attr_put32(&req->n, datalen, RTA_PRIORITY,
29+
+ cmd == RTM_DELROUTE ? dplane_ctx_get_old_tag(ctx) :
30+
+ dplane_ctx_get_tag(ctx)))
31+
+ {
32+
return 0;
33+
34+
+ }
35+
+ }
36+
+ else
37+
+ {
38+
+ if (!nl_attr_put32(&req->n, datalen, RTA_PRIORITY,
39+
+ ROUTE_INSTALLATION_METRIC))
40+
+ {
41+
+ return 0;
42+
+ }
43+
+ }
44+
#if defined(SUPPORT_REALMS)
45+
if (cmd == RTM_DELROUTE)
46+
tag = dplane_ctx_get_old_tag(ctx);
47+
--
48+
2.25.1
49+

src/sonic-frr/patch/series

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,4 @@
4242
0060-bgpd-Validate-both-nexthop-information-NEXTHOP-and-N.patch
4343
0061-Set-multipath-to-514-and-disable-bgp-vnc-for-optimiz.patch
4444
0062-zebra-lib-use-internal-rbtree-per-ns.patch
45+
0063-Patch-to-send-tag-value-associated-with-route-via-ne.patch

0 commit comments

Comments
 (0)