]> git.baikalelectronics.ru Git - kernel.git/commit
mptcp: accurate SIOCOUTQ for fallback socket
authorPaolo Abeni <pabeni@redhat.com>
Fri, 25 Feb 2022 00:52:57 +0000 (16:52 -0800)
committerJakub Kicinski <kuba@kernel.org>
Fri, 25 Feb 2022 05:54:53 +0000 (21:54 -0800)
commit25f8fcc0f760014681050bd7ae1fbdcdad7e52b2
treed965b7302c2dca37d71664e558296e7f7c162d29
parentce29ece9e6275da50a0bf7d4978ddf5d8fe6624a
mptcp: accurate SIOCOUTQ for fallback socket

The MPTCP SIOCOUTQ implementation is not very accurate in
case of fallback: it only measures the data in the MPTCP-level
write queue, but it does not take in account the subflow
write queue utilization. In case of fallback the first can be
empty, while the latter is not.

The above produces sporadic self-tests issues and can foul
legit user-space application.

Fix the issue additionally querying the subflow in case of fallback.

Fixes: 7218e38dcd8b ("mptcp: add SIOCINQ, OUTQ and OUTQNSD ioctls")
Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/260
Reported-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/mptcp/protocol.c