• Bjorn Andersson's avatar
    net: qrtr: Implement outgoing flow control · 5fdeb0d3
    Bjorn Andersson authored
    In order to prevent overconsumption of resources on the remote side QRTR
    implements a flow control mechanism.
    
    The mechanism works by the sender keeping track of the number of
    outstanding unconfirmed messages that has been transmitted to a
    particular node/port pair.
    
    Upon count reaching a low watermark (L) the confirm_rx bit is set in the
    outgoing message and when the count reaching a high watermark (H)
    transmission will be blocked upon the reception of a resume_tx message
    from the remote, that resets the counter to 0.
    
    This guarantees that there will be at most 2H - L messages in flight.
    Values chosen for L and H are 5 and 10 respectively.
    Signed-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    5fdeb0d3
qrtr.c 30.2 KB