Skip to content
Commit 67f10682 authored by Marcin Niestroj's avatar Marcin Niestroj Committed by Maureen Helm
Browse files

net: ppp: consume ringbuf until it is empty



ringbuf claim API returns pointer to contiguous area. In cases when data
in ringbuf wraps the end of internal buffer, then single call to claim
data is not enough to get all data - there is remaining part on the
beginning of internal buffer. Those remaining bytes will need to wait
for next ISR handler to trigger workqueue. Theoretically this means that
data on the beginning of ringbuf can wait there forever, or simply to
the next timeout in PPP stack when data traffic continues.

Consume data from ringbuf in a loop, stopping only when claiming results
in empty buffer. This will make sure that there is no stale data in the
ringbuf.

Signed-off-by: default avatarMarcin Niestroj <m.niestroj@grinn-global.com>
parent a470d9de
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment