Skip to content

Commit

Permalink
Added patch in FRR to send tag value associated with route
Browse files Browse the repository at this point in the history
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
abdosi committed Nov 4, 2024
1 parent 9af70fe commit a279d8e
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
From 1d16dfa1330c67e9bd25a93117f6e34b4bbb20b7 Mon Sep 17 00:00:00 2001
From: Abhishek Dosi <[email protected]>
Date: Mon, 4 Nov 2024 18:58:56 +0000
Subject: [PATCH] Added Change in Zebra FPM library to send tag value as
RTNETLINK Priority field (instead of metric). This tag value can be used as
metadata/attribute of the route in upper application like fpmsyncd

Signed-off-by: Abhishek Dosi <[email protected]>
---
zebra/zebra_fpm_netlink.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/zebra/zebra_fpm_netlink.c b/zebra/zebra_fpm_netlink.c
index 231047143..2b45087d4 100644
--- a/zebra/zebra_fpm_netlink.c
+++ b/zebra/zebra_fpm_netlink.c
@@ -297,7 +297,8 @@ static int netlink_route_info_fill(struct netlink_route_info *ri, int cmd,

ri->rtm_protocol = netlink_proto_from_route_type(re->type);
ri->rtm_type = RTN_UNICAST;
- ri->metric = &re->metric;
+ // Patch to send tag value via NETLINK Priority field (RTA_PRIORITY). The Tag vale can be used as metadata/attribute in fpmsyncd for further processing
+ ri->metric = &re->tag;

for (ALL_NEXTHOPS(re->nhe->nhg, nexthop)) {
if (ri->num_nhs >= zrouter.multipath_num)
--
2.25.1

1 change: 1 addition & 0 deletions src/sonic-frr/patch/series
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,4 @@
0053-bgpd-Set-md5-TCP-socket-option-for-outgoing-connections-on-listener.patch
build-dplane-fpm-sonic-module.patch
bgpd-lib-Include-SID-structure-in-seg6local-nexthop.patch
0054-Added-Change-in-Zebra-FPM-library-to-send-tag-value-.patch

0 comments on commit a279d8e

Please sign in to comment.