Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp8926462rwb; Tue, 13 Dec 2022 12:18:08 -0800 (PST) X-Google-Smtp-Source: AA0mqf7TvTC4XGtKqGYhPk47UOx/jxJrbZmOIV3Y6hVOZj9E7UGp8Wh5fK2t+iwF593VDAn1I8Q8 X-Received: by 2002:a17:906:1e4d:b0:7c1:ac8:73a0 with SMTP id i13-20020a1709061e4d00b007c10ac873a0mr20555809ejj.51.1670962688397; Tue, 13 Dec 2022 12:18:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670962688; cv=none; d=google.com; s=arc-20160816; b=CrZa6jaG5zQlicwb0lS6scwMDV90Boo3gcl8NvFjaFcVPCWhySo2tXX51Q+/PKuryn uT9TW1sgG32zBgl2qCguLzFenLjEirq3j3Xs1dSRG3XkjK83N/NauBNT4LoQJeahmZ9f kNfRQPt17x7MsSFarPoDlPTKQhCejGfL+wb6cbkCDwUb8Yd29+T8kWermORsAADrinZh EZPD1G8BMyTdbu4/XzteAczSQtSTp+TnraDV4ENMpYNChZ0V4Y+2w4uf5lQ7ZrliJXu3 LF+PXcLqjim0qXm+P3j9z5LB++M5ysHyuzK8lotN72Hftiun1u13nLpjsVnPYvO8u7Qg ljJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Nk3UifPWZ8X9jtpCKSxbryHT9Gexr5oq8yB6NwibN9U=; b=wLi2kLVMn4wu6LP0d5RhxkGt56J4OOE4nHjKnctaH5qC7JH2LCXYV9Z1fOLg14EpEB bm9bnbhpqX/NF+e168meO3P17a5pa82yvqouNnQJfE1yN9qGxW/Tnmt2CA6UN8qOi8d4 Pa8Hfzi4/xEGnsOO1wP3avlb4wP8Rrm+zkqLh7pPaiF8eFUHh/XUpeedikxoMP0d+DPj ScUFDvu9yOaHIifcDyX6sVkTkgYxmQQXK1Tmydx3a1KXuFpmOsZfi/6aRs2NC21y9qta bCRs2Vw0iLb0u6VSPa5QRDbDZcyO8rxu2Jhu66dexx5sM4ov1rnJnMy4xFGdKE1t0Em1 Ebdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=kemGwEJv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ht20-20020a170907609400b00791994dfb9esi10657098ejc.491.2022.12.13.12.17.49; Tue, 13 Dec 2022 12:18:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=kemGwEJv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236694AbiLMTzR (ORCPT + 72 others); Tue, 13 Dec 2022 14:55:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53528 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236735AbiLMTzL (ORCPT ); Tue, 13 Dec 2022 14:55:11 -0500 Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 115B626572; Tue, 13 Dec 2022 11:55:10 -0800 (PST) Received: by mail-lf1-x129.google.com with SMTP id j4so6823130lfk.0; Tue, 13 Dec 2022 11:55:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Nk3UifPWZ8X9jtpCKSxbryHT9Gexr5oq8yB6NwibN9U=; b=kemGwEJvt2zd6KBzrqEHTXqhqYMo0suffwvPbd2M1aN+H95ddC4bOnIAsVOr3cMo8o yWIp2zZ+ho46O0SrFNgYOz0Ln2mMlz6IXIDUiRgqPD4NgRn6CgHflkgfQLSPgBmdkJvI fNEejwpFG6MzxN9pXoXpfDZdBDHESaloM0SWssnhRRbrFhPx9A+WlUC4pxD49e7JJ1lY WrSCCsapw28AlaYeM+ut2dGp7GMbtcozMVpVY4wZW+6xFxtiCgOyWbbGd8EW/Fjb1RK2 zA0fmeksK7R5yFVrc81xpO+LuGvsTRT0a3v5R3a3xsC4S4RGFarf5p8HN0ibI6xHEWD3 Kz9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Nk3UifPWZ8X9jtpCKSxbryHT9Gexr5oq8yB6NwibN9U=; b=GnwSmT0ZKQSNheMxf49qZhC68uUr00UUeMokTdLTbWIFeCJliBfqCJ9J8DY8haiZQk v7qDoEiDNvOVG+4O54WOGlzuzrA5csJHIxbZfd4iKmGv5+NoHwUE/fYmxRsMJvmLra6J 8arhsNlHm7x6RXFXwuV9h95LalDfLElQ4Vv6l21vWPKrRfJjv/la2RzhzjRCh3gDo0/d m9z5VW9iU7ebmiCpC2zJJTD0cqn4BsHUcrW7Yava5MNWHDc5PSTNchztXYO0JLLhA+z5 y/pwajK71XRdExys3u6hCGHGDdyU4+hKq5Wh/G0Ek/VPS/AmNXxynu2RJQWlWodci+0k PZwQ== X-Gm-Message-State: ANoB5pkiv/V3UgXXL2n3Z926DtgJvqyuBjhSVtU9r6NYgL1mujtZpZ9m ymzlBCVjQpPQZAfxfZNIiui3C1OwmyVPsQ/T3w== X-Received: by 2002:a05:6512:238c:b0:4b5:87b5:75bf with SMTP id c12-20020a056512238c00b004b587b575bfmr4503074lfv.493.1670961308268; Tue, 13 Dec 2022 11:55:08 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: "Seija K." Date: Tue, 13 Dec 2022 14:54:57 -0500 Message-ID: Subject: Re: [PATCH] net: Fix for packets being rejected in the xHCI controller's ring buffer To: Daniele Palmas Cc: =?UTF-8?Q?Bj=C3=B8rn_Mork?= , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Yes, I did. On Tue, Dec 13, 2022 at 1:23 PM Daniele Palmas wrote: > > Hello Seija, > > Il giorno mar 13 dic 2022 alle ore 18:44 Seija K. > ha scritto: > > > > When a packet larger than MTU arrives in Linux from the modem, it is > > discarded with -EOVERFLOW error (Babble error). > > > > This is seen on USB3.0 and USB2.0 buses. > > > > This is because the MRU (Max Receive Size) is not a separate entity > > from the MTU (Max Transmit Size), and the received packets can be > > larger than those transmitted. > > > > Following the babble error, there was an endless supply of zero-length > > URBs that were rejected with -EPROTO (increasing the rx input error > > counter each time). > > > > This is only seen on USB3.0. These continue to come ad infinitum until > > the modem is shut down. > > > > There appears to be a bug in the core USB handling code in Linux that > > doesn't deal with network MTUs smaller than 1500 bytes well. > > > > By default, the dev->hard_mtu (the real MTU) is in lockstep with > > dev->rx_urb_size (essentially an MRU), and the latter is causing > > trouble. > > > > This has nothing to do with the modems; the issue can be reproduced by > > getting a USB-Ethernet dongle, setting the MTU to 1430, and pinging > > with size greater than 1406. > > > > Signed-off-by: Seija Kijin > > > > Co-Authored-By: TarAldarion > > --- > > drivers/net/usb/qmi_wwan.c | 7 +++++++ > > 1 file changed, 7 insertions(+) > > > > diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c > > index 554d4e2a84a4..39db53a74b5a 100644 > > --- a/drivers/net/usb/qmi_wwan.c > > +++ b/drivers/net/usb/qmi_wwan.c > > @@ -842,6 +842,13 @@ static int qmi_wwan_bind(struct usbnet *dev, > > struct usb_interface *intf) > > } > > dev->net->netdev_ops = &qmi_wwan_netdev_ops; > > dev->net->sysfs_groups[0] = &qmi_wwan_sysfs_attr_group; > > + /* LTE Networks don't always respect their own MTU on the receiving side; > > + * e.g. AT&T pushes 1430 MTU but still allows 1500 byte packets from > > + * far-end networks. Make the receive buffer large enough to accommodate > > + * them, and add four bytes so MTU does not equal MRU on network > > + * with 1500 MTU. Otherwise, usbnet_change_mtu() will change both. > > + */ > > + dev->rx_urb_size = ETH_DATA_LEN + 4; > > Did you test this change with QMAP? > > To support qmap dl aggregated blocks qmi_wwan relies on the > usbnet_change_mtu behavior of changing the rx_urb_size. > > Thanks, > Daniele > > > err: > > return status; > > } > > -- > > 2.38.2