2006-02-22 04:24:55

by James Harper

[permalink] [raw]
Subject: flawed assumption in via-rhine (or bug in skb_pad)?

Should the 'len' field of an skb be updated by a call to skb_pad? I'm
guessing not...

The via-rhine drive does a skb_padto (which in turn calls skb_pad) to
ensure that the skb contains enough bits to satisfy the ethernet minimum
packet size, but then it goes and uses skb->len everywhere else, which
seems like it is assuming that skb->len is incrememted...

The documentation in via-rhine (which I can only assume is correct)
specifically states that the hardware does not do padding, so the driver
would have to explicitly bump the length.

Whatever the cause, I'm getting runt frames and I don't like it :)

Thanks

James