From: Pierre-Yves Ritschard <pyritschard@echo.fr>
To: <netdev@vger.kernel.org>
Subject: Re: [PATCH] sky2.c: length mismatch errors with vlan frames
Date: Tue, 11 Sep 2007 11:50:22 +0200 [thread overview]
Message-ID: <20070911115022.1923de25@gamma.echo-net.net> (raw)
In-Reply-To: <20070911114644.00e2eeee@gamma.echo-net.net>
On Tue, 11 Sep 2007 11:46:44 +0200
Pierre-Yves Ritschard <pyritschard@echo.fr> wrote:
> > My bad, I hadn't tested VLAN acceleration code in a while so must
> > have broken it when more error checking was added.
> >
> I did check without vlans and the messages don't appear so it seems
> to be working correctly. When vlans are enabled I do receive a few
> frames that have the length difference but not the GMR_FS_VLAN bit
> set, since there's high traffic on the interfaces it might be a
> firmware bug that is triggered sometimes (running with my patch the
> occurences are about 10/hour).
>
> > Your fix looks right. Could you format properly for kernel patch
> > inclusion. Also, instead of hard coding 4, please use VLAN_HLEN.
>
> Since the snippet became a patch, here goes:
>
> Signed-off-by: Pierre-Yves Ritschard <pyr@spootnik.org>
>
The patch was mangled by my mailer, sorry about that:
Signed-off-by: Pierre-Yves Ritschard <pyr@spootnik.org>
--- linux-2.6.22.6/drivers/net/sky2.c.orig 2007-09-10 15:34:15.000000000 +0200
+++ linux-2.6.22.6/drivers/net/sky2.c 2007-09-11 11:38:54.000000000 +0200
@@ -2059,6 +2059,9 @@ static struct sk_buff *sky2_receive(stru
sky2->rx_next = (sky2->rx_next + 1) % sky2->rx_pending;
prefetch(sky2->rx_ring + sky2->rx_next);
+ if (status & GMR_FS_VLAN)
+ length += VLAN_HLEN;
+
if (status & GMR_FS_ANY_ERR)
goto error;
@@ -2081,6 +2084,8 @@ len_mismatch:
/* Truncation of overlength packets
causes PHY length to not match MAC length */
++sky2->net_stats.rx_length_errors;
+ printk(KERN_INFO PFX "%s: rx length mismatch: length %d != %d\n",
+ dev->name, length, status >> 16);
error:
++sky2->net_stats.rx_errors;
prev parent reply other threads:[~2007-09-11 9:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-10 14:35 sky2.c: length mismatch errors with vlan frames Pierre-Yves Ritschard
2007-09-11 8:10 ` Stephen Hemminger
2007-09-11 9:46 ` [PATCH] " Pierre-Yves Ritschard
2007-09-11 9:50 ` Pierre-Yves Ritschard [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070911115022.1923de25@gamma.echo-net.net \
--to=pyritschard@echo.fr \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).