Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C9465C433DF for ; Mon, 3 Aug 2020 10:33:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9D63A20719 for ; Mon, 3 Aug 2020 10:33:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=mork.no header.i=@mork.no header.b="XMZj0/gF" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726504AbgHCKdu (ORCPT ); Mon, 3 Aug 2020 06:33:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53282 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725933AbgHCKds (ORCPT ); Mon, 3 Aug 2020 06:33:48 -0400 Received: from canardo.mork.no (canardo.mork.no [IPv6:2001:4641::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37212C06174A; Mon, 3 Aug 2020 03:33:48 -0700 (PDT) Received: from miraculix.mork.no (miraculix.mork.no [IPv6:2001:4641:0:2:7627:374e:db74:e353]) (authenticated bits=0) by canardo.mork.no (8.15.2/8.15.2) with ESMTPSA id 073AWlCj014053 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Mon, 3 Aug 2020 12:32:47 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mork.no; s=b; t=1596450769; bh=ywKJJYEaqrMP3rBbr28H7fcIEWJIbjsJG6XvCfIuoIc=; h=From:To:Cc:Subject:References:Date:Message-ID:From; b=XMZj0/gFO9BEzWA6ofys6f7lT75FSd1mVqJK8eoQYLlM04FCMSvgDdi5jthD89iVg C+36d2xFgPK7cdVY9YAdeQ1CgRqL1GK5olfzlMJ9q8UvlPOqGGbjVrpIcNyiGOe6bT C0mW0NGqwr/0j7qwi76eXYRFGnyjIdVFhO6bA4Os= Received: from bjorn by miraculix.mork.no with local (Exim 4.94) (envelope-from ) id 1k2Xlu-000IZR-IL; Mon, 03 Aug 2020 12:32:46 +0200 From: =?utf-8?Q?Bj=C3=B8rn_Mork?= To: Daniele Palmas Cc: Greg KH , yzc666@netease.com, David Miller , kuba@kernel.org, netdev@vger.kernel.org, linux-usb , carl Subject: Re: [PATCH] qmi_wwan: support modify usbnet's rx_urb_size Organization: m References: <20200803065105.8997-1-yzc666@netease.com> <20200803081604.GC493272@kroah.com> Date: Mon, 03 Aug 2020 12:32:46 +0200 In-Reply-To: (Daniele Palmas's message of "Mon, 3 Aug 2020 10:26:18 +0200") Message-ID: <87r1so9fzl.fsf@miraculix.mork.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: clamav-milter 0.102.4 at canardo X-Virus-Status: Clean Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Daniele Palmas writes: > Il giorno lun 3 ago 2020 alle ore 10:18 Greg KH > ha scritto: > >> Actually, no, this all should be done "automatically", do not change the >> urb size on the fly. Change it at probe time based on the device you >> are using, do not force userspace to "know" what to do here, as it will >> not know that at all. >> > > the problem with doing at probe time is that rx_urb_size is not fixed, > but depends on the configuration done at the userspace level with > QMI_WDA_SET_DATA_FORMAT, so the userspace knows that. Yes, but the driver "will know" (or "may assume") this based on the QMI_WWAN_FLAG_MUX flag, as long as we are using the driver internal (de)muxing. We should be able to automatically set a sane rx_urb_size value based on this? Not sure if the rmnet driver currently can be used on top of qmi_wwan? That will obviously need some other workaround. > Currently there's a workaround for setting rx_urb_size i.e. changing > the network interface MTU: this is fine for most uses with qmap, but > there's the limitation that certain values (multiple of the endpoint > size) are not allowed. And this also requires an additional setup step for user/userspace, which we should try to avoid if possible. I'm all for a fully automatic solution. I don't think rx_urb_size should be directly configurable. And it it were, then it should be implemented in the usbnet framework. It is not a qmi_wwan specific attribute. Bj=C3=B8rn