Re: [PATCH] stmmac: reduce queue lengths if MTU is very large
From: David Miller <davem@davemloft.net>
Date: 2011-12-19 21:35:29
From: Giuseppe CAVALLARO <redacted> Date: Mon, 19 Dec 2011 06:45:30 +0100
From: Alessandro Rubini <redacted> In my use case (STA2X11 IO-Hub), the alloc_coherent, map_single and friends map to a reserved area set up in swiotlb. With the default MTU each packet takes 2kB, but with jumbo frames it increases to 16kB and consumes up my area (it takes 8MB instead of 1MB). Instead of increasing the reserved (== wasted) preallocated area in swiotlb, this patch rescales the user-selected queue lengths if the MTU is modified at runtime to be larger than the default. User choices are still obeyed (compiled default, module parameter, command line) Signed-off-by: Alessandro Rubini <redacted> Acked-by: Giancarlo Asnaghi <redacted> Acked-by: Giuseppe Cavallaro <redacted>
This change doesn't make sense. If the user is only sending/receiving small frames, then this patch will hurt them. I'm not applying this, it just points out that the amount of reserved space in your SWIOMMU setup might be insufficient for this situation rather than something that should be tweaked in this driver.