net: cdc_ncm: use sane defaults for rx/tx buffers
Lots of devices request much larger buffers than reasonable. This cause real problems for users of hosts with limited resources. Reducing the default buffer size to 16kB for such devices is a reasonable trade-off between allowing them to aggregate traffic and avoiding memory exhaustion on resource restrained hosts. Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
beeecd42c3
commit
50f1cb1cc8
@@ -52,6 +52,10 @@
|
||||
#define CDC_NCM_NTB_MAX_SIZE_TX 32768 /* bytes */
|
||||
#define CDC_NCM_NTB_MAX_SIZE_RX 32768 /* bytes */
|
||||
|
||||
/* Initial NTB length */
|
||||
#define CDC_NCM_NTB_DEF_SIZE_TX 16384 /* bytes */
|
||||
#define CDC_NCM_NTB_DEF_SIZE_RX 16384 /* bytes */
|
||||
|
||||
/* Minimum value for MaxDatagramSize, ch. 6.2.9 */
|
||||
#define CDC_NCM_MIN_DATAGRAM_SIZE 1514 /* bytes */
|
||||
|
||||
|
Reference in New Issue
Block a user