lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Mon, 03 Aug 2020 16:05:52 +0200
From:   Bjørn Mork <bjorn@...k.no>
To:     Carl Yin(殷张成) <carl.yin@...ctel.com>
Cc:     Daniele Palmas <dnlplm@...il.com>,
        Greg KH <gregkh@...uxfoundation.org>,
        "yzc666\@netease.com" <yzc666@...ease.com>,
        David Miller <davem@...emloft.net>,
        "kuba\@kernel.org" <kuba@...nel.org>,
        "netdev\@vger.kernel.org" <netdev@...r.kernel.org>,
        linux-usb <linux-usb@...r.kernel.org>
Subject: Re: 答复: [PATCH] qmi_wwan: support modify
 usbnet's rx_urb_size

"Carl Yin(殷张成)" <carl.yin@...ctel.com> writes:

> Hi Bjørn, 
> 	You can check cdc_ncm.c.
> 	cdc ncm driver set 'rx_urb_size' on driver probe time, and the value read from' cdc_ncm_bind_common() 's USB_CDC_GET_NTB_FORMAT '.
> 	and also allow the userspace to modify 'rx_urb_size' by ' /sys/class/net/wwan0/cdc_ncm/rx_max'.

And I must admit I wrote that code ;-)

NCM has the concept of 'dwNtbInMaxSize' and 'dwNtbOutMaxSize'
controlling the maximum USB buffer size in each direction. The values
are set by the device and provided to the host driver when probing. The
driver then knows it must be prepared to receive up to 'dwNtbInMaxSize'
buffers and set 'rx_urb_size' to this value.

This is fully automatic and will Just Work without user/userspace
intervention for any sane NCM or MBIM device.

'rx_max' was introduced to handle the insane devices, wanting buffers
larger than the host was prepared to give them. The limit used to be
hard coded in the driver.  But it was enough for some low end
hosts, so I made it configurable using that sysfs knob.

You are right that the rmnet aggregation situation is similar. But
similar to NCM, I would like a solution which is fully automatic for
most of the users.  Or preferably all, if possible.  A sysfs knob is a
last resort thing.  Let's try to do without it first.



Bjørn

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ