diff options
| author | Christian Franke <chris@opensourcerouting.org> | 2018-11-16 16:05:54 +0100 | 
|---|---|---|
| committer | Rodny Molina <rmolina@linkedin.com> | 2018-12-07 19:45:14 +0000 | 
| commit | 161fa356fbff795fe5945f353af486cf0a628428 (patch) | |
| tree | 911bf015e7ca658ee8a963401949f706a3a032fe /isisd/isis_tx_queue.h | |
| parent | ac92680d8ddba0ab3ddf3099b22b75cc81e50ffa (diff) | |
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.h | 26 | 
1 files changed, 17 insertions, 9 deletions
diff --git a/isisd/isis_tx_queue.h b/isisd/isis_tx_queue.h index ddecdf1e4f..7b01f1a3d4 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);  | 
