Re: skb->truesize > sk->rcvbuf == Dropped packets

From: David S. Miller (davem@redhat.com)
Date: Thu May 03 2001 - 18:49:59 EST


mike_phillips@urscorp.com writes:
> Any suggestions on heuristics for this ?
> Say maybe copy if skb->len <= eth_max_mtu, skb->len <= skb->truesize * .5,
> or just copy the packets no matter what size.

Pick a percentage of "acceptable waste" (ie. ratio of truesize to
len).

We know that cutoff values ~200 work for ethernet, for example.

On the topic of these checks that drop the packets, just so there
there is no misunderstanding. We can't remove them else users
could consume memory in a basically uncontrolled manner.

Later,
David S. Miller
davem@redhat.com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon May 07 2001 - 21:00:19 EST