Skip to content

Commit

Permalink
zebra: Actually display I/O buffer sizes (part-2)
Browse files Browse the repository at this point in the history
An extension of commit-8d8f12ba8e5cd11c189b8475b05539fa8415ccb9

Removing ifdef DEV_BUILD in stream_fifo_push as well to make the 'sh
zebra client' display the current I/O fifo along with max fifo items.

TICKET :#3390099

Signed-off-by: Rajasekar Raja <[email protected]>
  • Loading branch information
raja-rajasekar authored and donaldsharp committed Apr 22, 2024
1 parent 8992a73 commit 75b7746
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions lib/stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -1256,9 +1256,7 @@ void stream_fifo_init(struct stream_fifo *fifo)
/* Add new stream to fifo. */
void stream_fifo_push(struct stream_fifo *fifo, struct stream *s)
{
#if defined DEV_BUILD
size_t max, curmax;
#endif

if (fifo->tail)
fifo->tail->next = s;
Expand All @@ -1267,15 +1265,12 @@ void stream_fifo_push(struct stream_fifo *fifo, struct stream *s)

fifo->tail = s;
fifo->tail->next = NULL;
#if !defined DEV_BUILD
atomic_fetch_add_explicit(&fifo->count, 1, memory_order_release);
#else
max = atomic_fetch_add_explicit(&fifo->count, 1, memory_order_release);
curmax = atomic_load_explicit(&fifo->max_count, memory_order_relaxed);
if (max > curmax)
atomic_store_explicit(&fifo->max_count, max,
memory_order_relaxed);
#endif
}

void stream_fifo_push_safe(struct stream_fifo *fifo, struct stream *s)
Expand Down

0 comments on commit 75b7746

Please sign in to comment.