On Tue, 31 Jan 2006, David S. Miller wrote:
From: Jesse Brandeburg <[EMAIL PROTECTED]>
Date: Tue, 31 Jan 2006 16:27:59 -0800 (Pacific Standard Time)
> Assuming a 1500 mtu, This appears to be due to e1000 allocating 2k buffers
> for hardware + 2 bytes of alignment to align the ip header (NET_IP_ALIGN),
> to which then dev_alloc_skb adds 16 bytes. There is a final alloc_skb
> call of 2048 + 16 + 2 bytes, which then comes from 4096 byte slab.
>
> skb->truesize is 4k, this is used to compute the socket buffer charge, and
> also to limit window size, which in turn limits our future window growth.
Just because it comes from a 4K slab doesn't mean the truesize
will be set to 4K.
Okay, that statement forced me to look further into whats happenning.
this code:
if (tcp_win_from_space(skb->truesize) <= skb->len) {
incr = 2*tp->advmss;
}
else {
incr = __tcp_grow_window(sk, tp, skb);
}
If I allocate my receive buffers with dev_alloc_skb(1648)
tcp_win_from_space returns 1404, and my window grows
if I allocate my receive buffers with dev_alloc_skb(1650) or any value
greater than that, at least up to 1664 (i tried each value)
tcp_win_from_space returns 1500, and my window stops growing at
rcv_ssthresh = 66608
here is my printk output for alloc 1648
winfrmspc: 1404 <= skblen: 1448 incr: 2896
21: rcv_ssthresh = 63712 window_clamp: 98464
winfrmspc: 1404 <= skblen: 1448 incr: 2896
21: rcv_ssthresh = 66608 window_clamp: 98464
winfrmspc: 1404 <= skblen: 1448 incr: 2896
21: rcv_ssthresh = 69504 window_clamp: 98464
winfrmspc: 1404 <= skblen: 1448 incr: 2896
21: rcv_ssthresh = 72400 window_clamp: 98464
here is the same section of output for alloc 1650
24: truesize: 750 ; window: 65535
winfrmspc: 1500 > skblen: 1448 incr: 2896
21: rcv_ssthresh = 63712 window_clamp: 92672
24: truesize: 750 ; window: 65535
winfrmspc: 1500 > skblen: 1448 incr: 2896
21: rcv_ssthresh = 66608 window_clamp: 92672
24: truesize: 750 ; window: 65535
notice the second case takes the else in the above code, why is
tcp_win_from_space returning 1500
I'll be glad to provide any data you request.
Jesse
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html