ports/net/bird3/files/patch-01-Table-not-feeding-twice
Olivier Cochard 4516e09a23 net/bird3: Add new branch 3.x (multithreaded)
Warning: Consider version 3.0.0 to be unstable.

PR:		283403
Sponsored by:	Netflix
2025-01-09 23:07:38 +01:00

39 lines
1 KiB
Text

From 0a2f92ad205d96d0be0945ecf2bb740b68d5a3c1 Mon Sep 17 00:00:00 2001
From: Maria Matejka <mq@ucw.cz>
Date: Thu, 19 Dec 2024 11:54:05 +0100
Subject: [PATCH] Table: not feeding twice, once is enough
If there is no feed pending, the requested one should be
activated immediately, otherwise it is activated only after
the full run, effectively running first a full feed and
then the requested one.
---
nest/rt-export.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/nest/rt-export.c b/nest/rt-export.c
index 7368447de..7d51e54cf 100644
--- nest/rt-export.c
+++ nest/rt-export.c
@@ -357,8 +357,16 @@ rt_export_refeed_feeder(struct rt_export_feeder *f, struct rt_feeding_request *r
if (!rfr)
return;
- rfr->next = f->feed_pending;
- f->feed_pending = rfr;
+ if (f->feeding)
+ {
+ rfr->next = f->feed_pending;
+ f->feed_pending = rfr;
+ }
+ else
+ {
+ rfr->next = NULL;
+ f->feeding = rfr;
+ }
}
void rt_export_refeed_request(struct rt_export_request *rer, struct rt_feeding_request *rfr)
--
GitLab