sctp: improve the code for pmtu probe send and recv update
authorXin Long <lucien.xin@gmail.com>
Sun, 25 Jul 2021 17:42:50 +0000 (13:42 -0400)
committerDavid S. Miller <davem@davemloft.net>
Sun, 25 Jul 2021 22:06:02 +0000 (23:06 +0100)
commit058e6e0ed0eace43401c945082dec1d669b5b231
tree6a16a2ca8554df78975388425fe6eb37f3ba858a
parent795e3d2ea68e489ee7039ac29e98bfea0e34a96c
sctp: improve the code for pmtu probe send and recv update

This patch does 3 things:

  - make sctp_transport_pl_send() and sctp_transport_pl_recv()
    return bool type to decide if more probe is needed to send.

  - pr_debug() only when probe is really needed to send.

  - count pl.raise_count in sctp_transport_pl_send() instead of
    sctp_transport_pl_recv(), and it's only incremented for the
    1st probe for the same size.

These are preparations for the next patch to make probes happen
only when there's packet loss in Search Complete state.

Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/sctp/structs.h
net/sctp/sm_statefuns.c
net/sctp/transport.c