[PATCH] USB speedtouch: reduce memory usage
Currently, incoming packets are reassembled in a sk_buff which is then sent to the upper layers. The sk_buff needs to be big enough to hold the worst case packet since the size cannot be known in advance. This would not be so bad if the ATM layer paid attention to the mtu (usually 1500 bytes), but for some reason it blithely ignores it and typically passes 9188 bytes as the maximum size. This means that at best 5/6 of the space in every sk_buff is wasted. So instead let's just allocate an assembly buffer (sarb) which gets reused for every packet, and copy each assembled packet into a minimally sized sk_buff before sending.
Showing
Please register or sign in to comment