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 functions in

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 oneu...@suse.de wrote: On Friday 07 September 2012 00:09:13 Ming Lei wrote: On Thu, Sep 6, 2012 at 4:30 PM, Bjørn Mork bj...@mork.no wrote: Ming Lei tom.leim...@gmail.com writes: Looks

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

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 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 possibility to have

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? From what you

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: 1.

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

2012-09-06 Thread Bjørn Mork
Oliver Neukum oneu...@suse.de 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

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

2012-09-06 Thread Bjørn Mork
Ming Lei tom.leim...@gmail.com writes: On Thu, Sep 6, 2012 at 4:12 AM, Oliver Neukum oneu...@suse.de 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

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 packets for a

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

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 Ming Lei
On Thu, Sep 6, 2012 at 4:30 PM, Bjørn Mork bj...@mork.no wrote: Ming Lei tom.leim...@gmail.com writes: On Thu, Sep 6, 2012 at 4:12 AM, Oliver Neukum oneu...@suse.de 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

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 bj...@mork.no wrote: Ming Lei tom.leim...@gmail.com writes: Looks the introduced .tx_bundle is not necessary since .tx_fixup is OK. The minidriver does not have any information about tx in

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 oneu...@suse.de wrote: On Friday 07 September 2012 00:09:13 Ming Lei wrote: On Thu, Sep 6, 2012 at 4:30 PM, Bjørn Mork bj...@mork.no wrote: Ming Lei tom.leim...@gmail.com writes: Looks the introduced .tx_bundle is not necessary since .tx_fixup