mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-03 04:01:59 +00:00
zebra: dplane API to get provider output q length
Returns the current number of (completed) contexts in the provider's output queue (dp_ctx_out_q), allowing access to this data from the provider itself. Signed-off-by: Duncan Eastoe <duncan.eastoe@att.com>
This commit is contained in:
parent
7545bda0a4
commit
53706b4e51
@ -3900,6 +3900,12 @@ int dplane_provider_dequeue_in_list(struct zebra_dplane_provider *prov,
|
||||
return ret;
|
||||
}
|
||||
|
||||
uint32_t dplane_provider_out_ctx_queue_len(struct zebra_dplane_provider *prov)
|
||||
{
|
||||
return atomic_load_explicit(&(prov->dp_out_counter),
|
||||
memory_order_relaxed);
|
||||
}
|
||||
|
||||
/*
|
||||
* Enqueue and maintain associated counter
|
||||
*/
|
||||
|
@ -763,6 +763,9 @@ struct zebra_dplane_ctx *dplane_provider_dequeue_in_ctx(
|
||||
int dplane_provider_dequeue_in_list(struct zebra_dplane_provider *prov,
|
||||
struct dplane_ctx_q *listp);
|
||||
|
||||
/* Current completed work queue length */
|
||||
uint32_t dplane_provider_out_ctx_queue_len(struct zebra_dplane_provider *prov);
|
||||
|
||||
/* Enqueue completed work, maintain associated counter and locking */
|
||||
void dplane_provider_enqueue_out_ctx(struct zebra_dplane_provider *prov,
|
||||
struct zebra_dplane_ctx *ctx);
|
||||
|
Loading…
Reference in New Issue
Block a user