• Jon Paul Maloy's avatar
    tipc: simplify tipc_link_rcv() reception loop · f9aa358a
    Jon Paul Maloy authored
    Currently, all packets received in tipc_link_rcv() are unconditionally
    added to the packet deferred queue, whereafter that queue is walked and
    all its buffers evaluated for delivery. This is both non-optimal and
    and makes the queue sorting function unnecessary complex.
    
    This commit changes the loop so that an arrived packet is evaluated
    first, and added to the deferred queue only when a sequence number gap
    is discovered. A non-empty deferred queue is walked until it is empty
    or until its head's sequence number doesn't fit.
    Signed-off-by: default avatarJon Maloy <jon.maloy@ericsson.com>
    Acked-by: default avatarYing Xue <ying.xue@windriver.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    f9aa358a
link.c 50.5 KB