On Sun, 2012-11-25 at 22:43 +0100, Krzysztof Mazur wrote:
On Sat, Nov 24, 2012 at 12:01:32AM +0000, David Woodhouse wrote:
quoted
There's really no excuse for an additional wmem_default of buffering
between the netdev queue and the ATM device. Two packets (one in-flight,
and one ready to send) ought to be fine. It's not as if it should take
long to get another from the netdev queue when we need it.
If necessary we can make the queue space configurable later, but I don't
think it's likely to be necessary.
Maybe some high-speed devices will require larger queue, especially for
smaller packets, but 2 packet queue should be sufficient in almost all cases.
Yeah. This is fairly much the same conversation I ended up having when I
did the same for PPPoATM.
Some day *perhaps* we might look at doing something adaptive, so it'll
detect a TX underrun and increase the amount of buffering. But this
seems perfectly good for now.
Maybe this magic "2" and the comment should be moved to some #define.
Doesn't make it any less magic. I'm happier with it as it is, with a
clear comment describing why it's done that way.
--
dwmw2