From nobody Sun Feb 8 21:12:33 2026 Delivered-To: wpasupplicant.patchew@gmail.com Received: by 2002:ac4:a898:0:b0:4b1:af33:c52d with SMTP id z24csp282624pid; Thu, 21 Apr 2022 07:20:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwilbE75B3O2M6FUE/cuGt0fsAPNr6JehYd/8aWXo++1battupNKFGMxKPnCGpLby/wloCV X-Received: by 2002:a2e:2281:0:b0:24e:4cd3:7f0d with SMTP id i123-20020a2e2281000000b0024e4cd37f0dmr4597684lji.281.1650550848350; Thu, 21 Apr 2022 07:20:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650550848; cv=none; d=google.com; s=arc-20160816; b=VQXEc4MJaklIYjlVMF+2dvaa37IfEjNf1a0brq8bYjU+gzan3KoFpK26jQ9w0HQzex tEXYsi76GewvdTeJ+TQr2oDpDAiOM9+AfU/QrBqLPVbYUUAROOIZMjz8axROgokhehLR /uL13kNXf+PfkBZ6e2nssOc0t6l8QWQtLDE4qGfs9ntykcUOi7qcEcOQ5udnC6Amcb2c H3UaTt7RnERNgNNh8oezNPDM80HRiQaNW9BSzBJ+qf5516UQ/9F9wm8C6u1Kxd+iq2oF zeF0i/qKfZK8lZPVdCS4Xsc82WRLAuV84F3DMPSECO1MTl3U8c5YoHMY3hr5MfxFs9js zUUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:to:from:dkim-signature; bh=4lwxSQtYs3DtTz8QQ9eyhgcYER6AqBrJiuFnazSgJUc=; b=Zxioc0nLWiC+QlRdS5g9Vn6LBcHc6nSOGzm0PQn6SGw3MsGHt2QeLxcLX78RNByUy1 XHS333C4ZoGD9fN/xPNb/kCTk+8RTiGqvyl7OD0q6cErnKA+wlVMRghi6Rk4MHNTTQQJ 8YDXwKehp6PQeApK7k4/825BrhhZ2P8WdR0d7eRa/JouvljW/bB+VJBglzPv/UFAYkSv 6aSIOwJ+07W1MbYGwnbQOwbL4CWqFh3uJsfo9X448HHoqBqzGS2Iie4Ym3uZmgII2x+s AiC5QkcYFMFh4oD1b+n6dOBy67L6gCtIsLmHP/DZtUlAMrTTu9Pvcm4/AyHdjmAh4Tkq DMIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=RrjLv5if; spf=pass (google.com: domain of mptcp+bounces-4837-wpasupplicant.patchew=gmail.com@lists.linux.dev designates 139.178.84.19 as permitted sender) smtp.mailfrom="mptcp+bounces-4837-wpasupplicant.patchew=gmail.com@lists.linux.dev"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from da.mirrors.kernel.org (da.mirrors.kernel.org. [139.178.84.19]) by mx.google.com with ESMTPS id z7-20020a2e9b87000000b0024c8f54c66dsi4604771lji.291.2022.04.21.07.20.47 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Apr 2022 07:20:48 -0700 (PDT) Received-SPF: pass (google.com: domain of mptcp+bounces-4837-wpasupplicant.patchew=gmail.com@lists.linux.dev designates 139.178.84.19 as permitted sender) client-ip=139.178.84.19; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=RrjLv5if; spf=pass (google.com: domain of mptcp+bounces-4837-wpasupplicant.patchew=gmail.com@lists.linux.dev designates 139.178.84.19 as permitted sender) smtp.mailfrom="mptcp+bounces-4837-wpasupplicant.patchew=gmail.com@lists.linux.dev"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by da.mirrors.kernel.org (Postfix) with ESMTPS id E824F2E051C for ; Thu, 21 Apr 2022 14:20:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4AAD11FC3; Thu, 21 Apr 2022 14:20:43 +0000 (UTC) X-Original-To: mptcp@lists.linux.dev Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B49EE1FBF for ; Thu, 21 Apr 2022 14:20:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1650550840; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4lwxSQtYs3DtTz8QQ9eyhgcYER6AqBrJiuFnazSgJUc=; b=RrjLv5ifFxjmB3y9dRzAfd9y1xmweGfVXpYo506TI7CYVLXWOccfeDwa5tQnvXsGZtr/IX a53DrLY3dFyZL0EK/PiUaLwdvIVEL10QzLXbyHwjU8pySzvPVDTmrhxh5j17HZpNmfcN60 ejIUQkWtn7jWCyL6RYQxzB1BtyCim3Y= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-447-4ZtpBCRQP5mtJegCQQVD-w-1; Thu, 21 Apr 2022 10:20:39 -0400 X-MC-Unique: 4ZtpBCRQP5mtJegCQQVD-w-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1CC8F1C07386 for ; Thu, 21 Apr 2022 14:20:39 +0000 (UTC) Received: from gerbillo.redhat.com (unknown [10.32.181.152]) by smtp.corp.redhat.com (Postfix) with ESMTP id C317D14A4F80 for ; Thu, 21 Apr 2022 14:20:38 +0000 (UTC) From: Paolo Abeni To: mptcp@lists.linux.dev Subject: [PATCH v2 2/5] mptcp: add mib for xmit window sharing Date: Thu, 21 Apr 2022 16:20:16 +0200 Message-Id: In-Reply-To: References: Precedence: bulk X-Mailing-List: mptcp@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.7 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pabeni@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8"; x-default="true" Bump a counter for counter when snd_wnd is shared among subflow, for observability's sake. Signed-off-by: Paolo Abeni --- net/mptcp/mib.c | 1 + net/mptcp/mib.h | 1 + net/mptcp/protocol.c | 4 +++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/net/mptcp/mib.c b/net/mptcp/mib.c index d93a8c9996fd..6a6f8151375a 100644 --- a/net/mptcp/mib.c +++ b/net/mptcp/mib.c @@ -56,6 +56,7 @@ static const struct snmp_mib mptcp_snmp_list[] =3D { SNMP_MIB_ITEM("RcvPruned", MPTCP_MIB_RCVPRUNED), SNMP_MIB_ITEM("SubflowStale", MPTCP_MIB_SUBFLOWSTALE), SNMP_MIB_ITEM("SubflowRecover", MPTCP_MIB_SUBFLOWRECOVER), + SNMP_MIB_ITEM("SndWndShared", MPTCP_MIB_SNDWNDSHARED), SNMP_MIB_SENTINEL }; =20 diff --git a/net/mptcp/mib.h b/net/mptcp/mib.h index 529d07af9e14..2411510bef66 100644 --- a/net/mptcp/mib.h +++ b/net/mptcp/mib.h @@ -49,6 +49,7 @@ enum linux_mptcp_mib_field { MPTCP_MIB_RCVPRUNED, /* Incoming packet dropped due to memory limit */ MPTCP_MIB_SUBFLOWSTALE, /* Subflows entered 'stale' status */ MPTCP_MIB_SUBFLOWRECOVER, /* Subflows returned to active status after bei= ng stale */ + MPTCP_MIB_SNDWNDSHARED, /* Subflow snd wnd is overridden by msk's one */ __MPTCP_MIB_MAX }; =20 diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c index 0223a44d6b29..098f8f7d6366 100644 --- a/net/mptcp/protocol.c +++ b/net/mptcp/protocol.c @@ -1153,8 +1153,10 @@ static int mptcp_check_allowed_size(const struct mpt= cp_sock *msk, struct sock *s mptcp_snd_wnd =3D window_end - data_seq; avail_size =3D min_t(unsigned int, mptcp_snd_wnd, avail_size); =20 - if (unlikely(tcp_sk(ssk)->snd_wnd < mptcp_snd_wnd)) + if (unlikely(tcp_sk(ssk)->snd_wnd < mptcp_snd_wnd)) { tcp_sk(ssk)->snd_wnd =3D min_t(u64, U32_MAX, mptcp_snd_wnd); + MPTCP_INC_STATS(sock_net(ssk), MPTCP_MIB_SNDWNDSHARED); + } =20 return avail_size; } --=20 2.35.1