summaryrefslogtreecommitdiffstats
path: root/isisd/isis_tx_queue.h
diff options
context:
space:
mode:
authorChristian Franke <chris@opensourcerouting.org>2018-11-16 16:05:54 +0100
committerRodny Molina <rmolina@linkedin.com>2018-12-07 20:45:14 +0100
commit161fa356fbff795fe5945f353af486cf0a628428 (patch)
tree911bf015e7ca658ee8a963401949f706a3a032fe /isisd/isis_tx_queue.h
parentMerge pull request #3438 from opensourcerouting/bgp-rfapi-default-value (diff)
downloadfrr-161fa356fbff795fe5945f353af486cf0a628428.tar.xz
frr-161fa356fbff795fe5945f353af486cf0a628428.zip
isisd: Add debug output for tx-queues
To allow easier debugging of LSP transmission scheduling, add a debug mode where all tx-queue insertions/deletions are logged. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Diffstat (limited to 'isisd/isis_tx_queue.h')
-rw-r--r--isisd/isis_tx_queue.h26
1 files changed, 17 insertions, 9 deletions
diff --git a/isisd/isis_tx_queue.h b/isisd/isis_tx_queue.h
index ddecdf1e4..7b01f1a3d 100644
--- a/isisd/isis_tx_queue.h
+++ b/isisd/isis_tx_queue.h
@@ -29,18 +29,26 @@ enum isis_tx_type {
struct isis_tx_queue;
-struct isis_tx_queue *isis_tx_queue_new(void *arg,
- void(*send_event)(void *arg,
- struct isis_lsp *,
- enum isis_tx_type));
+struct isis_tx_queue *isis_tx_queue_new(
+ struct isis_circuit *circuit,
+ void(*send_event)(struct isis_circuit *circuit,
+ struct isis_lsp *,
+ enum isis_tx_type)
+);
void isis_tx_queue_free(struct isis_tx_queue *queue);
-void isis_tx_queue_add(struct isis_tx_queue *queue,
- struct isis_lsp *lsp,
- enum isis_tx_type type);
-
-void isis_tx_queue_del(struct isis_tx_queue *queue, struct isis_lsp *lsp);
+#define isis_tx_queue_add(queue, lsp, type) \
+ _isis_tx_queue_add((queue), (lsp), (type), \
+ __func__, __FILE__, __LINE__)
+void _isis_tx_queue_add(struct isis_tx_queue *queue, struct isis_lsp *lsp,
+ enum isis_tx_type type, const char *func,
+ const char *file, int line);
+
+#define isis_tx_queue_del(queue, lsp) \
+ _isis_tx_queue_del((queue), (lsp), __func__, __FILE__, __LINE__)
+void _isis_tx_queue_del(struct isis_tx_queue *queue, struct isis_lsp *lsp,
+ const char *func, const char *file, int line);
unsigned long isis_tx_queue_len(struct isis_tx_queue *queue);