]> git.baikalelectronics.ru Git - kernel.git/commit
sctp: send pmtu probe only if packet loss in Search Complete state
authorXin Long <lucien.xin@gmail.com>
Sun, 25 Jul 2021 17:42:51 +0000 (13:42 -0400)
committerDavid S. Miller <davem@davemloft.net>
Sun, 25 Jul 2021 22:06:02 +0000 (23:06 +0100)
commit77b19eeb6e09d97b1589ed192548311805635643
tree0004a2401d2477cc7176caef1efa159af62df47f
parentd689f451cb4a36aae6052d4bee03f7f8aa2a63ad
sctp: send pmtu probe only if packet loss in Search Complete state

This patch is to introduce last_rtx_chunks into sctp_transport to detect
if there's any packet retransmission/loss happened by checking against
asoc's rtx_data_chunks in sctp_transport_pl_send().

If there is, namely, transport->last_rtx_chunks != asoc->rtx_data_chunks,
the pmtu probe will be sent out. Otherwise, increment the pl.raise_count
and return when it's in Search Complete state.

With this patch, if in Search Complete state, which is a long period, it
doesn't need to keep probing the current pmtu unless there's data packet
loss. This will save quite some traffic.

v1->v2:
  - add the missing Fixes tag.

Fixes: 3436c4b0b3b9 ("sctp: do black hole detection 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/transport.c