"Dale Farnsworth" <[EMAIL PROTECTED]> writes:

>> +        if (has_tiny_unaligned_frags(skb)) {
>> +                if ((skb_linearize(skb, GFP_ATOMIC) != 0) 
>> +                    || has_tiny_unaligned_frags(skb)) { 
>
> There is no way that skb_linearize can return without removing all frags
> from the skb.  So the extra call to has_tiny_unaligned_frags() is
> unnecessary, right?

It is just paranoia...skb_linearize can return nonzero, but the skb
should indeed be frag-less if it does return zero.

The patch was written that way to maintain the original semantics as
closely as possible.  In the original, if the skb
has_tiny_unaligned_frags the first time through, it does check the skb
again after calling linearize.

In retrospect that should probably be printk(KERN_DEBUG ...) and not
KERN_ERR as well.

-- Paul



-
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