[PATCH V2 0/1] Reduce cdc_ncm memory use when kernel memory low

2017-06-28 Thread Jim Baxter
m_val = ctx->tx_low_mem_max_cnt; > + } > + } 84a116 > + ctx->tx_low_mem_val--; -- File: include/linux/usb/cdc_ncm.h 130a163,164 > + u32 tx_low_mem_max_cnt; > + u32 tx_low_mem_val; Jim Baxter (1): net: cdc_ncm: Reduce

[PATCH V2 1/1] net: cdc_ncm: Reduce memory use when kernel memory low

2017-06-28 Thread Jim Baxter
ocations before requesting a full size one to not put additional pressure on a low memory system. Once the memory is compacted the CDC-NCM data can resume transmitting at the normal tx_max rate once again. Signed-off-by: Jim Baxter --- V1: Sent to linux-usb for review. V2: Added code to increase

[RFC V1 1/1] net: cdc_ncm: Reduce memory use when kernel memory low

2017-05-16 Thread Jim Baxter
x_max rate once again. Signed-off-by: Jim Baxter --- drivers/net/usb/cdc_ncm.c | 39 +++ include/linux/usb/cdc_ncm.h | 1 + 2 files changed, 28 insertions(+), 12 deletions(-) diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c index b5cec18.

[RFC V1 0/1] Reduce cdc_ncm memory use when kernel memory low

2017-05-16 Thread Jim Baxter
will attempt to use a 2048 Byte minimum size NTB if the allocation of the maximum size NTB fails. This allows the connection to limp along until the memory has been recovered which was usually between 1 and 4 NTBS on our heavy traffic system. Jim Baxter (1): net: cdc_ncm: Reduce memory use when k

[PATCH V2 0/1] net: cdc_ncm: Fix TX zero padding

2017-05-08 Thread Jim Baxter
ed as an error. Solution To resolve this I have cached the value of ctx->tx_max - skb_out->len before the memset operation. V1: Sent to linux-use for review. V2: Added netdev mailing list as it was missed for V1. Jim Baxter (1): net: cdc_ncm: Fix TX zero padding

[PATCH V2 1/1] net: cdc_ncm: Fix TX zero padding

2017-05-08 Thread Jim Baxter
he size of the memory to be zeroed before the skb_put and using this in the memset call. Signed-off-by: Jim Baxter Reviewed-by: Bjørn Mork --- V1: Sent to linux-use for review. V2: Added netdev mailing list as it was missed for V1. drivers/net/usb/cdc_ncm.c | 11 +++ 1 file changed, 7 in