diff options
author | Jim Baxter <jim_baxter@mentor.com> | 2014-07-07 18:33:18 +0100 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2014-07-10 08:49:38 -0500 |
commit | 6d3865f9d41f15ddbcecaa6722871fc0db21d7ab (patch) | |
tree | 2f4ed7cce199a98fadc042403d6f0088fff3f0a1 /drivers/usb/gadget/u_ether.h | |
parent | 370af734dfaf8336b496b386e194648e097e248a (diff) | |
download | linux-6d3865f9d41f15ddbcecaa6722871fc0db21d7ab.tar.bz2 |
usb: gadget: NCM: Add transmit multi-frame.
This adds multi-frame support to the NCM NTB's for
the gadget driver. This allows multiple network
packets to be put inside a single USB NTB with a
maximum size of 16kB.
It has a time out of 300ms to ensure that smaller
number of packets still maintain a normal latency.
Also the .fp_index and .next_fp_index have been
changed to .ndp_index and .next_ndp_index to
match the latest CDC-NCM specification and
help with maintenance.
Results transmitting from gadget to host.
Before the change:
TCP_STREAM Throughput (10^6bits/sec): 22.72
UDP_STREAM Throughput (10^6bits/sec): 25.94
Latency:
netperf -H 192.168.1.101 -v2 -l 50 -t TCP_RR -- -r 16384,16384
Trans. RoundTrip Throughput
Rate Latency 10^6bits/s
per sec usec/Tran Outbound
100.83 9918.116 13.215
After the change:
TCP_STREAM Throughput (10^6bits/sec): 124.26
UDP_STREAM Throughput (10^6bits/sec): 227.48
Latency:
netperf -H 192.168.1.101 -v2 -l 50 -t TCP_RR -- -r 16384,16384
Trans. RoundTrip Throughput
Rate Latency 10^6bits/s
per sec usec/Tran Outbound
156.80 6377.730 20.552
Signed-off-by: Jim Baxter <jim_baxter@mentor.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/u_ether.h')
-rw-r--r-- | drivers/usb/gadget/u_ether.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/gadget/u_ether.h b/drivers/usb/gadget/u_ether.h index 0f0290acea7e..334b38947916 100644 --- a/drivers/usb/gadget/u_ether.h +++ b/drivers/usb/gadget/u_ether.h @@ -18,6 +18,7 @@ #include <linux/if_ether.h> #include <linux/usb/composite.h> #include <linux/usb/cdc.h> +#include <linux/netdevice.h> #include "gadget_chips.h" @@ -74,6 +75,7 @@ struct gether { bool is_fixed; u32 fixed_out_len; u32 fixed_in_len; + bool supports_multi_frame; struct sk_buff *(*wrap)(struct gether *port, struct sk_buff *skb); int (*unwrap)(struct gether *port, |