Subject: Re: sky2.c: length mismatch errors with vlan frames

From: Stephen Hemminger <[email-masked]>
Date: Tue, 11 Sep 2007 10:10:48 +0200

On Mon, 10 Sep 2007 16:35:38 +0200
Pierre-Yves Ritschard <[email-masked]> wrote:

> Hi list,
> 
> I have been running recent linux kernel on nexcom NSA 1086's equipped
> with sysconnect NICs.
> 
> Like some people previously have on this list I am running into
> problems with these NICs and seeing frequent errors in my dmesg:
> 
> sky2 eth4: rx error, status 0x402300 length 60
> printk: 17 messages suppressed.
> sky2 eth4: rx error, status 0x402300 length 60
> printk: 32 messages suppressed.
> sky2 eth4: rx error, status 0x602300 length 92
> printk: 25 messages suppressed.
> sky2 eth4: rx error, status 0x6e2300 length 106
> printk: 16 messages suppressed.
> sky2 eth4: rx error, status 0x402300 length 60
> printk: 10 messages suppressed.
> sky2 eth4: rx error, status 0x402300 length 60
> printk: 17 messages suppressed.
> sky2 eth4: rx error, status 0x402300 length 60
> 
> 
> I have investigated a bit and status doesn't match any of the errors in
> GMR_FS_ANY_ERR.
> The block generating the error is now len_mismatch, due to the fact
> that on packets having the GMR_FS_VLAN bit set, the length argument to
> sky2_receive is 4 bytes shorter that the 16 bit value in status (status
> ``right shift'' 16).
> 
> Since both these values are read from the card I don't know how to
> solve this other than by incrementing the length arg by 4 when
> GMR_FS_VLAN is set in status. So here's a diff that does this, although
> I'm not sure its an elegant solution:
>

My bad, I hadn't tested VLAN acceleration code in a while so must
have broken it when more error checking was added.

Your fix looks right. Could you format properly for kernel patch inclusion.
Also, instead of hard coding 4, please use VLAN_HLEN.