Article View: linux.kernel.netdev
Article #15296Re: [PATCH net v4] net: qualcomm: rmnet: Update MTU handling during format changes
From: Jakub Kicinski
Date: Thu, 12 Nov 2026 16:33
Date: Thu, 12 Nov 2026 16:33
27 lines
9230 bytes
9230 bytes
On Sat, 7 Nov 2026 23:57:27 -0800 Subash Abhinov Kasiviswanathan wrote: > 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: > > - The headroom only accounts for the V4 egress checksum header and > ignores the V5 one, so devices using V5 checksum offload get an MTU > that is too large for the real device. > - rmnet_newlink() sizes the first device from the port's data format > before the requested IFLA_RMNET_FLAGS have been applied, so the MTU > does not match the format that ends up being used. > - A real device MTU smaller than the headroom underflows the unsigned > subtraction, and a real device with a jumbo MTU makes the creation of > the first device fail while resizing an existing one clamps it. > - Existing endpoints are shrunk by writing dev->mtu directly. No MTU > notifiers run and userspace gets no link notification. The helper > also returns -1, and changelink flattens every failure into -EINVAL. > - rmnet_changelink() publishes the new data format before resizing the > endpoints and reverts it on failure, so the datapath can observe a > format whose headers do not fit the MTUs. A failed resize can also > leave some endpoints shrunk, and a mux_id change requested in the > same call is kept even though the call returned an error. > > Fix these by calculating the headroom from the requested data format, These should probably be 5 separate fixes in a patch series?
Technical Details
Message-ID:
<20261112083311.641a2216@kernel.org>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-362010-linux-kernel-netdev=dewy.ruReferences:
<20261108075727.2031331-1-subash.a.kasiviswanathan@oss.qualcomm.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-362010-linux-kernel-netdev=dewy.ru From: kuba@kernel.org (Jakub Kicinski) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net v4] net: qualcomm: rmnet: Update MTU handling during format changes Date: Thu, 12 Nov 2026 08:33:11 -0800 Organization: Usenet Network Message-ID: <20261112083311.641a2216@kernel.org> References: <20261108075727.2031331-1-subash.a.kasiviswanathan@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Injection-Info: usenet.network; logging-data="1129618"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:miuipTnjHA8vFa4sbWdjtqW1ShU= sha256:1d8SdXvXaOH3wd+EsQDlZoNId6omcvEb17nNpO4iprg= sha1:b5F6Jab/urHNGRKOj+451fYrC5A= sha256:0iiR8syu2bbsDqOjAB8Au4oTIpyMth7VOpiXsrLEakY= 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 5E4FF1142FE; Thu, 12 Nov 2026 19:58:44 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.401 X-Spam-Status: No, score=-3.401 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, 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=kernel.org 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 Kf4WmsDdwi9t; Thu, 12 Nov 2026 19:58:39 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-362010-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id D36FE1142FA; Thu, 12 Nov 2026 19:58:30 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id 71B35183AE7; Thu, 12 Nov 2026 16:34:12 +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=1794501194; b=osQjTM9nUCyPjYZ5mc/RvR1MvJZVxMyNIQsExz5i8FRY+k0t7vgO601pZjIUIaB9lkJR qWsUuSzN5b7NAWm5OpdIW0q7mFuY4p6RdanrjW7+F9WY9+gltY2IkgmnjyCYFSDLluSrC q48+4Jyoe/x5pd8mZo54ICuUdkMe3JwgxERAqpHfvEZ39TjdWXYJjxMscZe2UHMsPnPGo nG0Br6XfMsE6+qw29jPCCDXyV03gH2i9+Q72ozHv6cCjNYdCx469v1c9b8n+OyFbxjDWy 5UET/AwW6zEwt55CYBezsKQymVrXgfWviuS88rpa5wbhet2IgK8xiHoiF7RwMZk93yw== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794501194; h=X-Original-To:Received:Received:DKIM-Signature:Date:From:To:Cc: Subject:Message-ID:In-Reply-To:References:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version:Content-Type:Content-Transfer-Encoding; bh=yPUd9FeLj5QpouzWq1NZvMG7gxT72E6Fd8Vvq6ez92s=; b=GgPe+6fw8BHkf2w23cM+/AOCnBbZwB/aSK+mYT/pLwZZWsPoORzgcPh7a0cX+0XlNGhF /NG7COhMWuIB9WVAFevPs27FttC8+TB1TXOlzab+9D87Om2EMWMgTIKxsmOGM7LEyaPiF +TwSBahtA7AE+QR0ix53ULZMPEtKKVjXEcjnRb9DIu2O+G3Ergl/1YSeBz0f/ualNEhol fI+zrV3wLH/8+8OU2s3iJB0r7lGXLNHkx6VLOzeHe1oW8kaGOUjxIJjC913lG633ykjk7 7IHIxXpM04g0n2732eKzV7qKyzAocX8AEGResAwlTlwdDlUsocEUBv27Vs30d8tlpQQ== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b="kkL6kCI/"; 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 E58C2606A339; Thu, 12 Nov 2026 16:33:13 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=kkL6kCI/ X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794501193; b=KjUUE+BqOyxTxGR/OHgjhlqVPrXEwGs3bBin7JDxeMjP+Mefcv7aPABm5IlPba287hSy zvsbFeBYjSzmCPD3vj9m7pbjR8Ycqxk4Fg9Q1r9fqbxrvmAzVrmzxl5n+UcD4jJsVc/ka asNUWRwGWrH0Q/3AHBEe/lNx1bbz0puFIEHZJX3nX94IgyMLfa2DUnm53mrl5QLqADfWK 68xwLTT0og8RALnhHrq5AwSnlsUxoQHKMpRdvovkLhHC1SscIdAv+yrvwlFNiZkKDsNIF 2oPQfEiCQUhtSXG9REROyvAOnESyGtAeYOd+VrZ4rUujvQp2YI2qXzGByeTPipdxquA== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794501193; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: In-Reply-To:References:MIME-Version:Content-Type: Content-Transfer-Encoding; bh=yPUd9FeLj5QpouzWq1NZvMG7gxT72E6Fd8Vvq6ez92s=; b=kw7sUQhIM3kefBhk/c68Nh8B4jhDpVIcFUfEYQlBZ5qMEE+OUWq1lEEs7WdciHZXqNdP vJUUF072wjBTeJ1eoxcTC0MJYxaOWbAXDVRVM7nLt/TKJ+Z/uzgpsM6Fcyr4ZyHmt57lu F2MgHXtuskwaUw7sRUc2KxUhs14/U6WyoDixXU2pj/sUQUGKBr7BmliWV3enF+OWr4ueJ R1aXj5AGAF7jiAje8yHYqdnEG7bDTE6cUErj/LMSYjQj96Z+bLJfAizJyJHKI3kPVVcrj mWJ0MTicfS8fk08JU3JeDyoWCRpwj6TiuVM40fd4QfbbqDViXO7U3Y75stXIqy1ciiA== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b="kkL6kCI/"; arc=none smtp.remote-ip=100.103.45.18 X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 105CC606A33E; Thu, 12 Nov 2026 16:33:12 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5B3471F000C4; Thu, 12 Nov 2026 16:33:12 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1794501192; bh=yPUd9FeLj5QpouzWq1NZvMG7gxT72E6Fd8Vvq6ez92s=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=kkL6kCI/5z+yr5mFgZW7w+h2y0/a3TTWefVLABMpxdQHdJudK8lwyF4FjFvwxq3Vs htMBstcmkwA8gIJAq6QxjEz6Mzx2FNoc8zqgdFNqu21GN+h9TwxVxTSJrfhnIaL++W HXlmBp6fvwahXXYZJojhnoDUcdbXbUstH61FpFE96KyvTCnyWm0AJrz3FNQ4rO5QZR +8Pv4oK185Rax6ifdRTKOk8TjNGvzMMKyaKciww3Gmi+pL7+GFv5kX0+vS0J3jwz0r Igr+BBC7PxIMpuLA7dn6QK8QqgoD9UJ6D7sOvsvhRjMMujNoYSzU1A8VPiWa/Os7Ew K0pwlnK9eAX3g== X-Cc: sean.tranchetti@oss.qualcomm.com, andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org X-In-Reply-To: <20261108075727.2031331-1-subash.a.kasiviswanathan@oss.qualcomm.com> 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