From nobody Sun Feb 8 23:42:19 2026 Delivered-To: wpasupplicant.patchew@gmail.com Received: by 2002:ac4:a898:0:b0:4b1:af33:c52d with SMTP id z24csp151215pid; Fri, 15 Apr 2022 07:49:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwjmA9wfFekklTDfzf2wyWM9bwkrk5lGuPHpji2lLjEnVV8qPfkZ6jnpC9LzuOe6xTHTmFo X-Received: by 2002:a17:90a:14f:b0:1cb:55d9:42d9 with SMTP id z15-20020a17090a014f00b001cb55d942d9mr4694322pje.196.1650034140556; Fri, 15 Apr 2022 07:49:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650034140; cv=none; d=google.com; s=arc-20160816; b=VOUNkYK+4uZ7fOWsubyeXUx5Qcxrd242zb9zmMaj3gC33sCCHolqBU4vxO+IspF/X3 3CJLF8LAhJIZGrHTkbHx531baQKZXZaRxlSWZ2NGFWjVyy7VzaUkjq+O0O/370st4g6t 5GDatMWdTkZzg4MAPe+6rDYztruRVWJSjhO16aWEoddPgJK0+snlZ+QRCY8myjwi8rRl MgOfaz/dKm6QZ5kEoYCVk8E1J/QRd2yeAYSR3544FotUshiHaki2VEKkoHFV+hd97B50 yqrcioiGW6PqvngtezugH1M51rMTS8Dra+WP5R07hniuEa3Vlja/ZPdvCnfntptw8cuW xphw== 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=eWu5ly4kU5PF88dNdCsNwtXZJ1Y6GTrAWoGRS7VtE0A=; b=IbpZJxbcr3vaYvcDr0xwc9ymGCXHUvBKnnm3St55MInCanI+MFKgx+IAg2bFUkXsU1 z6jLtq1eePj8jcS/6apsf3S5CYptEDIh4/ptgMQuQ6wkYoGhPolbJjnUW912BCgmI3H3 j9uCP8WvbIIQPsvlBKqvTzlY25y6swsbwD9Kp2ku+W5S+x0cE53HF57DUEQnZknkuh0j 2iror7roRgzYJfhe3F/pnzKxRJnEsD4o+HjsWhmT4gz52PPmjc6uhcdUaWUXBR5mEc3k Dxg+2LazqOw4OBNEBm55hEyjDf5W9eEaBYvy+ijMQHr5NyQQQerl4ehelRb+aUZ8SZQU L3PQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=JebrXb7L; spf=pass (google.com: domain of mptcp+bounces-4755-wpasupplicant.patchew=gmail.com@lists.linux.dev designates 2604:1380:1000:8100::1 as permitted sender) smtp.mailfrom="mptcp+bounces-4755-wpasupplicant.patchew=gmail.com@lists.linux.dev"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from sjc.edge.kernel.org (sjc.edge.kernel.org. [2604:1380:1000:8100::1]) by mx.google.com with ESMTPS id s18-20020a17090aad9200b001cba0cee373si4327166pjq.37.2022.04.15.07.49.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Apr 2022 07:49:00 -0700 (PDT) Received-SPF: pass (google.com: domain of mptcp+bounces-4755-wpasupplicant.patchew=gmail.com@lists.linux.dev designates 2604:1380:1000:8100::1 as permitted sender) client-ip=2604:1380:1000:8100::1; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=JebrXb7L; spf=pass (google.com: domain of mptcp+bounces-4755-wpasupplicant.patchew=gmail.com@lists.linux.dev designates 2604:1380:1000:8100::1 as permitted sender) smtp.mailfrom="mptcp+bounces-4755-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 sjc.edge.kernel.org (Postfix) with ESMTPS id B5D563E0FB0 for ; Fri, 15 Apr 2022 14:48:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C512F33C0; Fri, 15 Apr 2022 14:48:57 +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.133.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 2CC18323C for ; Fri, 15 Apr 2022 14:48:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1650034135; 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=eWu5ly4kU5PF88dNdCsNwtXZJ1Y6GTrAWoGRS7VtE0A=; b=JebrXb7LVwxX74qOCGpJevsawUlnqkRrlclSrKz5Whhf/uhGsgFb+AMR92r2+yNSSSK2LB yVzOUGu4siRlVNW4BEHWH8k1H6NvxKdxOUdjwGLWGIfVCXcAq9rYZQt9tFKLX4YtCLLyjn Z84agNA/B6lwiZG+J2JotGowi8rxg74= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-588-ZuwW-WhEPtCFnoo-BnntnA-1; Fri, 15 Apr 2022 10:48:53 -0400 X-MC-Unique: ZuwW-WhEPtCFnoo-BnntnA-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 762EB811E90 for ; Fri, 15 Apr 2022 14:48:53 +0000 (UTC) Received: from gerbillo.redhat.com (unknown [10.39.192.179]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0DE4C440AAA for ; Fri, 15 Apr 2022 14:48:52 +0000 (UTC) From: Paolo Abeni To: mptcp@lists.linux.dev Subject: [PATCH net-next 2/5] mptcp: add mib for xmit window sharing Date: Fri, 15 Apr 2022 16:48:45 +0200 Message-Id: <097fc6a50e7914b3a96d7f14cd680d006f242217.1650034062.git.pabeni@redhat.com> 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.9 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 923fdb26214e..8f159d535fed 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