RE: changing usbnet's API to better deal with cdc-ncm

2012-09-10 Thread Alexey ORISHKO
> -Original Message- > From: Oliver Neukum [mailto:oli...@neukum.org] > Sent: Friday, September 07, 2012 8:23 PM > > > There is a temptation to send full NTBs even with a single IP packet, > > But it will lead to wasted USB bandwidth and reduced ability to send > > real data for other func

Re: changing usbnet's API to better deal with cdc-ncm

2012-09-07 Thread Oliver Neukum
On Friday 07 September 2012 17:23:33 Alexey ORISHKO wrote: > There is a temptation to send full NTBs even with a single IP packet, > But it will lead to wasted USB bandwidth and reduced ability to send > real data for other functions in the device or other devices on the > same root hub. Most impo

RE: changing usbnet's API to better deal with cdc-ncm

2012-09-07 Thread Alexey ORISHKO
> -Original Message- > From: Oliver Neukum [mailto:oneu...@suse.de] > Sent: Friday, September 07, 2012 3:09 PM > > > > Until we do something with network device framework in order to get > > access to upper layer Tx queue we need to utilize timer. > > Could you explain your reasoning? Fro

RE: changing usbnet's API to better deal with cdc-ncm

2012-09-07 Thread Alexey ORISHKO
> -Original Message- > From: Ming Lei [mailto:tom.leim...@gmail.com] > Sent: Friday, September 07, 2012 2:58 PM > > Several issues need to be improved: > > Tx path: > > 1. IP packets must be accumulated in one NTB. Currently it's done via > data copy. > > Preferred way would be a possibili

Re: changing usbnet's API to better deal with cdc-ncm

2012-09-07 Thread Oliver Neukum
On Friday 07 September 2012 14:01:23 Alexey ORISHKO wrote: > The experience from early implementations and prototyping of NCM was that > using NCM with 4-8kB NTB increased max throughput in loop-mode by a factor > of 5-6 even 8-10 times compared to using ECM. One real-world example was > modem for

Re: changing usbnet's API to better deal with cdc-ncm

2012-09-07 Thread Ming Lei
On Thu, Sep 6, 2012 at 4:13 PM, Alexey ORISHKO wrote: >> -Original Message- >> From: Oliver Neukum [mailto:oneu...@suse.de] > > >> looking at cdc-ncm it seeems to me that cdc-ncm is forced to play very >> dirty games because usbnet doesn't have a notion about aggregating >> packets for a s

RE: changing usbnet's API to better deal with cdc-ncm

2012-09-07 Thread Alexey ORISHKO
> -Original Message- > From: Oliver Neukum [mailto:oneu...@suse.de] > Sent: Friday, September 07, 2012 9:36 AM > > > Well, that is the mistake. Using a timer is a bad idea. > > > > Why is a bad idea? Without a timer, how can usbnet or low level > > driver aggregate the later coming transm

MBIM (was: Re: changing usbnet's API to better deal with cdc-ncm)

2012-09-07 Thread Oliver Neukum
On Thursday 06 September 2012 10:17:46 Bjørn Mork wrote: > Not really related, but I am still worrying how MBIM is going to fit > into the usbnet model where you have a strict relation between one > netdev and one USB interface. Do you see any way usbnet could be > extended to manage a list of net

Re: changing usbnet's API to better deal with cdc-ncm

2012-09-07 Thread Oliver Neukum
On Friday 07 September 2012 11:55:53 Ming Lei wrote: > On Fri, Sep 7, 2012 at 1:56 AM, Oliver Neukum wrote: > > On Friday 07 September 2012 00:09:13 Ming Lei wrote: > >> On Thu, Sep 6, 2012 at 4:30 PM, Bjørn Mork wrote: > >> > Ming Lei writes: > > > >> >> Looks the introduced .tx_bundle is not n

Re: changing usbnet's API to better deal with cdc-ncm

2012-09-06 Thread Ming Lei
On Fri, Sep 7, 2012 at 1:56 AM, Oliver Neukum wrote: > On Friday 07 September 2012 00:09:13 Ming Lei wrote: >> On Thu, Sep 6, 2012 at 4:30 PM, Bjørn Mork wrote: >> > Ming Lei writes: > >> >> Looks the introduced .tx_bundle is not necessary since .tx_fixup is OK. >> > >> > The minidriver does not

Re: changing usbnet's API to better deal with cdc-ncm

2012-09-06 Thread Oliver Neukum
On Friday 07 September 2012 00:09:13 Ming Lei wrote: > On Thu, Sep 6, 2012 at 4:30 PM, Bjørn Mork wrote: > > Ming Lei writes: > >> Looks the introduced .tx_bundle is not necessary since .tx_fixup is OK. > > > > The minidriver does not have any information about tx in progress. The > > Inside .

Re: changing usbnet's API to better deal with cdc-ncm

2012-09-06 Thread Ming Lei
On Thu, Sep 6, 2012 at 4:30 PM, Bjørn Mork wrote: > Ming Lei writes: >> On Thu, Sep 6, 2012 at 4:12 AM, Oliver Neukum wrote: >>> Hi, >>> >>> looking at cdc-ncm it seeems to me that cdc-ncm is forced to play >>> very dirty games because usbnet doesn't have a notion about aggregating >>> packets f

Re: changing usbnet's API to better deal with cdc-ncm

2012-09-06 Thread Eric Dumazet
On Thu, 2012-09-06 at 11:11 +0200, Eric Dumazet wrote: > Really skb_clone() use should be removed from cdc_ncm_rx_fixup() > > Unless you expect 10Gbit speed from this driver, skb_clone() is the > worst possible strategy. > > Allocating fresh skbs of the right size permits better memory use and >

Re: changing usbnet's API to better deal with cdc-ncm

2012-09-06 Thread Eric Dumazet
On Thu, 2012-09-06 at 10:50 +0200, Oliver Neukum wrote: > On Thursday 06 September 2012 10:13:01 Alexey ORISHKO wrote: > > Rx path: > > 4. IP packets are cloned to separate skb and length of actual data > set to eth packet size, while skb size is still the same as skb > containing full NTB frame.

Re: changing usbnet's API to better deal with cdc-ncm

2012-09-06 Thread Oliver Neukum
On Thursday 06 September 2012 10:13:01 Alexey ORISHKO wrote: > > -Original Message- > > From: Oliver Neukum [mailto:oneu...@suse.de] > > > > looking at cdc-ncm it seeems to me that cdc-ncm is forced to play very > > dirty games because usbnet doesn't have a notion about aggregating > > pa

Re: changing usbnet's API to better deal with cdc-ncm

2012-09-06 Thread Bjørn Mork
Ming Lei writes: > On Thu, Sep 6, 2012 at 4:12 AM, Oliver Neukum wrote: >> Hi, >> >> looking at cdc-ncm it seeems to me that cdc-ncm is forced to play >> very dirty games because usbnet doesn't have a notion about aggregating >> packets for a single transfer. > > The Ethernet API we are using doe

Re: changing usbnet's API to better deal with cdc-ncm

2012-09-06 Thread Bjørn Mork
Oliver Neukum writes: > looking at cdc-ncm it seeems to me that cdc-ncm is forced to play > very dirty games because usbnet doesn't have a notion about aggregating > packets for a single transfer. > > It seems to me that this can be fixed introducing a method for bundling, > which tells usbnet ho

RE: changing usbnet's API to better deal with cdc-ncm

2012-09-06 Thread Alexey ORISHKO
> -Original Message- > From: Oliver Neukum [mailto:oneu...@suse.de] > looking at cdc-ncm it seeems to me that cdc-ncm is forced to play very > dirty games because usbnet doesn't have a notion about aggregating > packets for a single transfer. Several issues need to be improved: Tx path:

Re: changing usbnet's API to better deal with cdc-ncm

2012-09-05 Thread Ming Lei
On Thu, Sep 6, 2012 at 4:12 AM, Oliver Neukum wrote: > Hi, > > looking at cdc-ncm it seeems to me that cdc-ncm is forced to play > very dirty games because usbnet doesn't have a notion about aggregating > packets for a single transfer. The Ethernet API we are using does not support transmitting m

changing usbnet's API to better deal with cdc-ncm

2012-09-05 Thread Oliver Neukum
Hi, looking at cdc-ncm it seeems to me that cdc-ncm is forced to play very dirty games because usbnet doesn't have a notion about aggregating packets for a single transfer. It seems to me that this can be fixed introducing a method for bundling, which tells usbnet how packets have been aggregated