🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #26042

[PATCH net v6 0/5] net: qualcomm: rmnet: Update MTU handling during format changes

#26042
From: Subash Abhinov Kasiviswanathan
Date: Thu, 03 Dec 2026 00:01
63 lines
14442 bytes
This patch series addresses the code review comments raised by Sashiko
as part of the rmnet coalescing series. Changes were tested on QEMU only
and not on real hardware.

rmnet derives the MTU of its devices from the real device MTU minus the
headroom needed by the egress data format. Several problems exist in how
this is handled when the data format is set or changed, which can leave
a rmnet device with an MTU larger than the real device can carry, fail
creation of the first device, or leave a failed request half applied.

Patch 1 accounts for the V5 egress checksum header in the headroom, so
devices using V5 checksum offload no longer get an MTU that is too
large.
Patch 2 applies IFLA_RMNET_FLAGS before sizing the first device in
rmnet newlink, so the MTU matches the data format which is actually
used.
Patch 3 fixes the unsigned underflow when the real device MTU is below
the headroom and clamps the computed MTU to RMNET_MAX_PACKET_SIZE so
that a jumbo real device no longer makes the creation of the first
device fail.
Patch 4 computes the new data format locally and publishes the format
and any mux id change only after the MTUs have been updated, so the
data path never sees a format whose headers do not fit the MTUs. rmnet
newlink now also resizes existing devices and the real error is returned
instead of -1.
Patch 5 resizes endpoints with dev_set_mtu() so that MTU notifiers and
link notifications run and restore the MTUs of the endpoints already
resized when a later one fails. Notifiers can veto the shrink so the
request can fail and the restore is best effort.

v6: Address the comments from Simon Horman about the minimum mtu
calculation in Patch 3 and coding style update in
rmnet_vnd_update_dev_mtu in Patch 5. Also reword the commit text in
Patch 5 to explicitly call out the impact of restoring MTU.
v5: Split v4 into multiple patches for easier review as mentioned by
Jakub Kicinski.
https://lore.kernel.org/all/20261117060737.2764327-1-subash.a.kasiviswanathan@oss.qualcomm.com/
v4: https://lore.kernel.org/all/20261108075727.2031331-1-subash.a.kasiviswanathan@oss.qualcomm.com/
v3: https://lore.kernel.org/all/20261009084351.317632-2-subash.a.kasiviswanathan@oss.qualcomm.com/
v2: https://lore.kernel.org/all/20261008005543.2630828-2-subash.a.kasiviswanathan@oss.qualcomm.com/

Assisted-by: LLM

Subash Abhinov Kasiviswanathan (5):
  net: qualcomm: rmnet: Account for V5 checksum header in headroom
  net: qualcomm: rmnet: Size the first device from the requested data
    format
  net: qualcomm: rmnet: Fix MTU underflow and clamp to the maximum
    packet size
  net: qualcomm: rmnet: Publish data format and mux_id only after the
    MTU update
  net: qualcomm: rmnet: Resize endpoints with dev_set_mtu() and restore
    on failure

 .../ethernet/qualcomm/rmnet/rmnet_config.c    |  77 ++++++++-----
 .../ethernet/qualcomm/rmnet/rmnet_config.h    |   1 +
 .../net/ethernet/qualcomm/rmnet/rmnet_vnd.c   | 108 +++++++++++++-----
 .../net/ethernet/qualcomm/rmnet/rmnet_vnd.h   |   4 +-
 4 files changed, 132 insertions(+), 58 deletions(-)

-- 
2.34.1
Technical Details
Message-ID: <20261203000152.2083717-1-subash.a.kasiviswanathan@oss.qualcomm.com>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu.MISMATCH!feed-us-txt.newsdeef.eu!feed-us-ny.newsdeef.eu!srv.newsdeef.eu!news-wdc.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-376142-linux-kernel-netdev=dewy.ru

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu.MISMATCH!feed-us-txt.newsdeef.eu!feed-us-ny.newsdeef.eu!srv.newsdeef.eu!news-wdc.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-376142-linux-kernel-netdev=dewy.ru
From: subash.a.kasiviswanathan@oss.qualcomm.com (Subash Abhinov Kasiviswanathan)
Newsgroups: linux.kernel.netdev
Subject: [PATCH net v6 0/5] net: qualcomm: rmnet: Update MTU handling during format changes
Date: Wed,  2 Dec 2026 16:01:47 -0800
Organization: Usenet Network
Message-ID: <20261203000152.2083717-1-subash.a.kasiviswanathan@oss.qualcomm.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="2092835"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:PmAaETjGSmzgkyu3/mMT0iauHmI= sha256:Eolz1ecSHaPobKPQpI4OIe5SaL4UvKBgSOy+1W+bhc4=
	sha1:MdYK8IOzvFl3ByQZGZtfrJ8CHQI= sha256:KStX84WanYQlNwXCZAg9DEnOObxJyY6gkCAg1wSK3j4=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 9048B1177AA; Thu,  3 Dec 2026 03:02:48 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.051
X-Spam-Status: No, score=-3.051 tagged_above=-9999 required=6.31
	tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1,
	RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001]
	autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=qualcomm.com
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id NHdr9jDremic;
	Thu,  3 Dec 2026 03:02:45 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-376142-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=oss.qualcomm.com
X-Received: from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74])
	by mail.dewy.ru (Postfix) with ESMTPS id C9ED4117763; Thu,  3 Dec 2026 03:02:36 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sto.lore.kernel.org (Postfix) with ESMTP id C2196602FE3; Thu,  3 Dec 2026 00:02:35 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1796256153;
	b=nC3wM77wjQcUyW8+F6WVB+oERyoIcp4XnDihdX2lY4IilVbYxy+dBV+8Sx9Rmh2WAh+6
	 gEmhxzJo87YXn5w2UMxYy6DBjIzjF9zj4PnMeQu/kZXi+n3b6EBPxhzxioxBsog24+wWr
	 LnyIJq8VgNTEa+1Yjsm4yFuBt6M+1Zsc68bO+VJxSdrLGg6CJx065PpVIz+cDyQMZgtCh
	 T7N7+yjnM2ld/4zgVqa32+Mqi4kK0FBUoc7aUBJwC7vXolYDoSB2zyN8KhDOblBSZKUI0
	 1qvnaG7Kvc91NfnYfvTZC/ty6A0A3GvvNfGtki/5xSuxDt5gTqbBvM0FK6OTDPfMBOg==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796256153;
	h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:Received:
	 Received:Received:Received:From:To:Cc:Subject:Date:Message-Id:
	 X-Mailer:X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
	 List-Unsubscribe:List-Owner:Precedence:MIME-Version:
	 Content-Transfer-Encoding:X-Proofpoint-Reinject:X-QCInternal:
	 X-QCInternal:X-Authority-Analysis:X-Proofpoint-Spam-Info:
	 X-Proofpoint-ORIG-GUID:X-Proofpoint-Spam-Details-Enc:
	 X-Proofpoint-GUID:X-Proofpoint-Virus-Version:
	 X-Proofpoint-Spam-Details;
	bh=SC7XiwztWJ0NtMdNCl8fbd0Ecq0IeyeWCbxTmkPLe/M=;
	b=csH7qSQ3ptlr1Xkb8J3hslHy79Nw1ZEbTFxY3gy8GBrhTSmXcPS900Pu3miAuRPNdGNp
	 O+utalOH7wX21PHmtQrTLKrb45ak7W2a8h3/etVruV5yREzgCrLG3fYhVu+mNWHolB6+B
	 BC/mUANC8hFdVgWE/GP5g99PFrSOkt3pzb2is+xuLm3PpanGyQzdfa2I16/n0vplnUoQ+
	 h9MrXKzhV6arDpnE1+ooFN6//QTENi2rtHC2tZuQDB0z5iIoYerEOvPBeXVZVjqok/63x
	 3BfHspl7AiZxHBkSBWNbDbzU+Xcjc/EDrW+xRsZXdZO01SybflrnhRtF3f3O04OjUpQ==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=eHg8ov75;
	dmarc=pass header.from=oss.qualcomm.com;
	spf=pass smtp.mailfrom=qualcomm.com;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id AB0BA606A68C;
	Thu,  3 Dec 2026 00:02:33 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=eHg8ov75
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=205.220.168.131
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1796256152;
	b=Ol6ZmjyvJR4DX/FksrubGDoZ5WUfB/CV796WZTA3qXuAZI1knISuJkvhN/YAYY69vipJ
	 CHx+hZDzILyUPM2c565jBogmqaetYU16pR7SVmxQ7g91VxRlmKypI+TnAP46SQMtTmnuh
	 RE6W+qqgy8yET2kBngpFRCHVLzGzJSdvhFFK81aYnmLubQRzsFDi7CF6yLUBjzxLmr2YD
	 ONznYg54araYXYZKZXWNie4r2QvEBFbEAkOmO+r9laJO5bqC5P12EbJZz/FK7ZTm/B+si
	 AYIJ6eZhPNzzN7RwwYBOYJZxlgPX/UpLa1AUBcMeSGpXj2BnISUjDCBXN/H9Qc24jvA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796256152;
	h=DMARC-Filter:Received:DKIM-Signature:Received:Received:Received:
	 Received:From:To:Cc:Subject:Date:Message-Id:X-Mailer:MIME-Version:
	 Content-Transfer-Encoding:X-Proofpoint-Reinject:X-QCInternal:
	 X-QCInternal:X-Authority-Analysis:X-Proofpoint-Spam-Info:
	 X-Proofpoint-ORIG-GUID:X-Proofpoint-Spam-Details-Enc:
	 X-Proofpoint-GUID:X-Proofpoint-Virus-Version:
	 X-Proofpoint-Spam-Details;
	bh=SC7XiwztWJ0NtMdNCl8fbd0Ecq0IeyeWCbxTmkPLe/M=;
	b=1VGfHOO4aeTrRSfJCrj0B23SMlzVxJ+sruLSFxPO+MUmW/Dlj/y2fOHjXhW1XTIgntwj
	 /TyzW6yM7m84T9ibL/M3Sg1QV4rJHSmj6xioDRloOuoC/1ftWBHm1Ctx+nnyjk0ght/q8
	 Jm0/aRlOv8z0I1Gs7CSufDvbcUSNpisBCWyxj08TwrEPPYFUYV0BiqzfKHET1VeoYSf1p
	 uW0M2B8CczSP6QFG3z3uuYJsaQxt+TFEor5Wj0OXhb4Xk65Sw2gF0dHXM086kdNQ4CJaD
	 XvQIOGcgNFwpMYA6LAuAe4gU/gJ9DyqC/1Wc/gGYFsOW8v+umRQEYTuVwNwjoJwfQHw==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=oss.qualcomm.com;
	spf=pass smtp.mailfrom=qualcomm.com;
	dkim=pass header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=eHg8ov75;
	arc=none smtp.remote-ip=205.220.168.131
X-Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 647D3606A332;
	Thu,  3 Dec 2026 00:02:32 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 647D3606A332
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.qualcomm.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=qualcomm.com
X-Received: from pps.filterd (m0279867.ppops.net [127.0.0.1])
	by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6B2LGiZe2795256;
	Thu, 3 Dec 2026 00:02:21 GMT
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h=
	cc:content-transfer-encoding:date:from:message-id:mime-version
	:subject:to; s=qcppdkim1; bh=SC7XiwztWJ0NtMdNCl8fbd0Ecq0IeyeWCbx
	TmkPLe/M=; b=eHg8ov75LLwCjB154L4J+TT3DWx71efghZrnpNze6L9pvm0cmzO
	BCc3IoqABmfT0vrdLcaUCrQirFdUqW8YXkzDs8Uw1nZ7ZuGHP19De9WN4f3KM+RK
	i5Kuq7egVlk2aXwg638U6kYTFz1wwJOqwOlsU5gfs62Zzpm3kw4Om7UbiC+aYESv
	CjttwDRYNAm8uk88mIu8HqwRgJrawxRAgAeoQpK3GGCGN7wAXD6L5nC9RTc7IJfZ
	EGqIWNTG5pVRiCAv/mhty5G+o5CO8Z1SCilI34B0JbZHWcV8hE9FYOr353Uqoc2g
	UCwBCTYY2LvH3SlN7blNaIzqRKUymS1/AMw==
X-Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20])
	by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4jajuq2t8q-1
	(version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT);
	Thu, 03 Dec 2026 00:02:21 +0000 (GMT)
X-Received: from pps.filterd (nalasppmta02.qualcomm.com [127.0.0.1])
	by NALASPPMTA02.qualcomm.com (8.18.1.11/8.18.1.11) with ESMTP id 6B301wQ71993903;
	Thu, 3 Dec 2026 00:02:20 GMT
X-Received: from hu-devc-lv-u22-c.qualcomm.com (hu-subashab-lv.qualcomm.com [10.81.24.15])
	by NALASPPMTA02.qualcomm.com (PPS) with ESMTPS id 6B302KLt1994810
	(version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT);
	Thu, 03 Dec 2026 00:02:20 +0000 (GMT)
X-Received: by hu-devc-lv-u22-c.qualcomm.com (Postfix, from userid 212624)
	id 52A28AD9; Wed,  2 Dec 2026 16:02:20 -0800 (PST)
X-Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, horms@kernel.org,
        Subash Abhinov Kasiviswanathan <subash.a.kasiviswanathan@oss.qualcomm.com>
X-Mailer: git-send-email 2.34.1
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list
X-Proofpoint-Reinject: loops=2 maxloops=12
X-QCInternal: smtphost
X-QCInternal: smtphost
X-Authority-Analysis: v=2.4 cv=B8QsQ+tM c=1 sm=1 tr=0 ts=6b10b18d cx=c_pps
 a=ouPCqIW2jiPt+lZRy3xVPw==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17
 a=pUM-KoujPXoA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22
 a=eoimf2acIAo5FJnRuUoq:22 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8
 a=30UzVU-uWA_VPYjeBXEA:9
X-Proofpoint-Spam-Info: AW1haW4tMjYxMjAyMDA5NSBTYWx0ZWRfX15zLqmpoaUsJ
 lfuHf7Cakqzo6mD8iz9Cl4gHGwVnqURKHTn8bzmAITBYdIajkBUvA5Zwvyx71Y7oDnLJtW2xPbp
 VnssLbMSsKCCLpDpwoi9v3vmP+IaM6k=
X-Proofpoint-ORIG-GUID: o0OKmzMCayzHvcB24ktni4cYXbCHn7GD
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMjAyMDA5NSBTYWx0ZWRfX1ZYPLGIsqZCW
 6dWoIHEhWIHPvqShKeSSa+zHzXJxeAiaSUn2YqNj92DDwbsEODr4fmwlzaJ9oUhPX854xE6F1km
 bh3tKmCJT6lWKOI8D7g1GDfB7AnjGTgemwYxkNJiuOJnPVMU1FBo8Z5e1GP6We5v+aokluO+4g/
 nVq04q7UUhnYPjvNSInTNNk+gaQeG+yPys0mZCIEM0GvrH7BXfJG5NnPiuL7N+R1FA8BThom/nI
 qSOxyutgRwyoOFa51iEznf7MvvQbVJN56cd0ZNvFlFo9FCyYPZnPQzBW4PU+Ub1s77o1gIDSYBM
 593RAKaFcNfVtEFVIcnjrowNw7uE27ic4ZIcnO6rCjrOVXyS6a+UlxeAbf4ls9gAZ8YrQin3yl2
 2Z0h73BYrWo83y/1IMvW/m+IkRBcDz3vOxodDUscNDxExoCozYixSx/rCM88oIvy/xi5eEoini7
 7lNX3SX78wuy846ASXw==
X-Proofpoint-GUID: o0OKmzMCayzHvcB24ktni4cYXbCHn7GD
X-Proofpoint-Virus-Version: vendor=baseguard
 engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49
 definitions=2026-12-02_06,2026-12-02_07,2025-10-01_01
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0
 priorityscore=1501 bulkscore=0 adultscore=0 malwarescore=0 suspectscore=0
 spamscore=0 phishscore=0 impostorscore=0 lowpriorityscore=0 clxscore=1015
 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0
 reason=mlx scancount=1 engine=8.22.0-2611040001 definitions=main-2612020095