From: Laurent Vivier <lvivier@redhat.com>
To: Koen Vandeputte <koen.vandeputte@citymesh.com>
Cc: oneukum@suse.com, andrew+netdev@lunn.ch,
Eric Dumazet <edumazet@google.com>,
kuba@kernel.org, pabeni@redhat.com,
netdev <netdev@vger.kernel.org>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: commit 662dc80a5e86 breaks rmnet over usb
Date: Mon, 23 Feb 2026 15:08:41 +0100 [thread overview]
Message-ID: <95ccf5a6-975b-4543-80a3-595f1ee20543@redhat.com> (raw)
In-Reply-To: <CAPh3n803k8JcBPV5qEzUB-oKzWkAs-D5CU7z=Vd_nLRCr5ZqQg@mail.gmail.com>
On 2/23/26 13:04, Koen Vandeputte wrote:
> Hi Laurent,
Hi Koen,
> I'm testing the latest openwrt state and found an issue probably
> caused by your usb mtu limit patch :-)
>
> I'm talking about this one:
> 662dc80a5e86 ("usbnet: limit max_mtu based on device's hard_mtu")
>
> https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.74&id=662dc80a5e86b35bbf339e0b87b7cc3f07c09de1
>
>
> When using wwan0 iface normally, this makes sense, but the problem is
> when using QMI modems combined with the rmnet driver and aggregated
> frames.
>
> - The modem is configured to frame sizes of 16383 or 32767 using QMI
> - wwan0 (using qmi_wwan) is configured to match this frame size by
> setting it's MTU to the same value
> - Frames of this size are sent over to qmi_wwan driver (containing
> multiple data packets)
> - Frames are then forwarded to the rmnet driver
> - Frames get de-aggregated here and sent to the network stack for processing.
>
> The reason here is to reduce USB transfers heavily.
>
>
> As you see, it's perfectly possible here to use very large MTU sizes
> as the aggregation feature by rmnet relies on this.
> Also the modem can be perfectly configured to send very large aggregated frames.
>
> After your patch, wwan0 is limited to 1500 bytes it seems, effectively
> breaking aggregation.
>
> On my tests, download speeds are reduced from >300Mbps to ~.8Mbps
>
> I also made a build reverting this patch and all works well again.
>
>
> Is there any other solution to fix this?
> I guess it should be reverted otherwise :-)
It's weird to be able to set an MTU that is not supported by the hardware.
To restore performance I think the rx_usb_size should be decoupled from MTU max in qmi_wwan.
Could you try something like:
diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c
index 3a4985b582cb..6b4796fac692 100644
--- a/drivers/net/usb/qmi_wwan.c
+++ b/drivers/net/usb/qmi_wwan.c
@@ -788,6 +788,8 @@ static int qmi_wwan_bind(struct usbnet *dev, struct usb_interface *intf)
usbnet_get_ethernet_addr(dev, cdc_ether->iMACAddress);
}
+ dev->rx_urb_size = 32768;
+
/* claim data interface and set it up */
if (info->control != info->data) {
status = usb_driver_claim_interface(driver, info->data, dev);
Thanks,
Laurent
next prev parent reply other threads:[~2026-02-23 14:08 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-23 12:04 Koen Vandeputte
2026-02-23 14:08 ` Laurent Vivier [this message]
2026-02-23 15:13 ` David Laight
2026-02-25 7:19 ` Daniele Palmas
2026-02-25 7:48 ` Laurent Vivier
2026-02-25 11:04 ` Laurent Vivier
2026-02-25 14:14 ` Daniele Palmas
2026-02-26 1:01 ` Jakub Kicinski
2026-02-26 8:26 ` Daniele Palmas
2026-02-26 9:09 ` Laurent Vivier
2026-02-26 18:18 ` Daniele Palmas
2026-02-27 16:15 ` Daniele Palmas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=95ccf5a6-975b-4543-80a3-595f1ee20543@redhat.com \
--to=lvivier@redhat.com \
--cc=andrew+netdev@lunn.ch \
--cc=edumazet@google.com \
--cc=koen.vandeputte@citymesh.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=oneukum@suse.com \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®