diff options
| author | Christian Franke <chris@opensourcerouting.org> | 2018-11-23 21:32:18 +0100 |
|---|---|---|
| committer | Rodny Molina <rmolina@linkedin.com> | 2018-12-07 19:45:14 +0000 |
| commit | 86d6f80d5d765e4537482aec0bb5d281e028a564 (patch) | |
| tree | 57e298b34cb5f299a5f8eef08c37bc91893c6f4b /isisd/isis_tx_queue.c | |
| parent | 39bb53d67a200bbdcedef8800c0822920031814e (diff) | |
isisd: Provide statistics about retransmitted LSPs
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Diffstat (limited to 'isisd/isis_tx_queue.c')
| -rw-r--r-- | isisd/isis_tx_queue.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/isisd/isis_tx_queue.c b/isisd/isis_tx_queue.c index 46d1595f06..bf5817d008 100644 --- a/isisd/isis_tx_queue.c +++ b/isisd/isis_tx_queue.c @@ -46,6 +46,7 @@ struct isis_tx_queue { struct isis_tx_queue_entry { struct isis_lsp *lsp; enum isis_tx_type type; + bool is_retry; struct thread *retry; struct isis_tx_queue *queue; }; @@ -124,6 +125,11 @@ static int tx_queue_send_event(struct thread *thread) e->retry = NULL; thread_add_timer(master, tx_queue_send_event, e, 5, &e->retry); + if (e->is_retry) { + queue->circuit->area->lsp_rxmt_count++; + } else { + e->is_retry = true; + } queue->send_event(queue->circuit, e->lsp, e->type); /* Don't access e here anymore, send_event might have destroyed it */ @@ -164,6 +170,8 @@ void _isis_tx_queue_add(struct isis_tx_queue *queue, if (e->retry) thread_cancel(e->retry); thread_add_event(master, tx_queue_send_event, e, 0, &e->retry); + + e->is_retry = false; } void _isis_tx_queue_del(struct isis_tx_queue *queue, struct isis_lsp *lsp, |
