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

David S. Miller (davem@redhat.com)
Thu, 3 May 2001 16:49:59 -0700 (PDT)


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/