答复: [PATCH] qmi_wwan: support modify usbnet's rx_urb_size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



bjorn@xxxxxxx writes:
> Daniele Palmas <dnlplm@xxxxxxxxx> writes:
> > Il giorno lun 3 ago 2020 alle ore 10:18 Greg KH
> > <gregkh@xxxxxxxxxxxxxxxxxxx> 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.

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'.

> 
> 
> Bjørn




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux