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  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 <>
To:     Carl Yin(殷张成) <>
Cc:     Daniele Palmas <>,
        Greg KH <>,
        "yzc666\" <>,
        David Miller <>,
        "kuba\" <>,
        "netdev\" <>,
        linux-usb <>
Subject: Re: 答复: [PATCH] qmi_wwan: support modify
 usbnet's rx_urb_size

"Carl Yin(殷张成)" <> 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.


Powered by blists - more mailing lists