From: Jesse Brandeburg <[EMAIL PROTECTED]>
Date: Tue, 31 Jan 2006 18:59:37 -0800 (Pacific Standard Time)

> 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

tcp_adv_win_scale default to 2, and tcp_win_from_space() goes:

static inline int tcp_win_from_space(int space)
{
        return sysctl_tcp_adv_win_scale<=0 ?
                (space>>(-sysctl_tcp_adv_win_scale)) :
                space - (space>>sysctl_tcp_adv_win_scale);
}

The results will differ on 32-bit vs 64-bit platforms, and
whether you have things like netfilter enabled, as these
attributes change the size of the various structures, which
are accounted for in skb->truesize.

The formula you end up with is:

        size = SKB_DATA_ALIGN(size) + sizeof(struct skb_shared_info) +
                sizeof(struct sk_buff);
        win_from_space = (space - (space >> 2));

So you can plug in whatever values are appropriate for your
system and configuration, and that's how you'll derive the
numbers you are seeing.

This tcp_win_from_space is trying to deal with the ratio of
real data to "overhead" in the form of the data structures
accounted for in skb->truesize.

If you build packets larger than the actual data used, you
will break socket accounting.  That's why drivers do the
RX copy break stuff.
-
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

Reply via email to