Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Jan 2003 00:01:31 +0100
From:      Joerg Wunsch <j@uriah.heep.sax.de>
To:        mobile@freebsd.org
Cc:        Kevin Oberman <oberman@es.net>, grog@lemis.com
Subject:   Re: How to make an Intel EtherExpress known to xe(4)?
Message-ID:  <20030127000131.B27981@uriah.heep.sax.de>
In-Reply-To: <20030125230756.BC4195D06@ptavv.es.net>; from oberman@es.net on Sat, Jan 25, 2003 at 03:07:56PM -0800
References:  <20030125235520.A97813@uriah.heep.sax.de> <20030125230756.BC4195D06@ptavv.es.net>

next in thread | previous in thread | raw e-mail | index | archive | help
As Kevin Oberman wrote:

> This is typical of receiving 802.1q tagged frames, but I have been
> getting this error on my current system with a Xircom RE-100 card
> and I am reasonably sure that i am not getting any tagged frames
> where it's located.

Me too.  The remote end is running a vx0 which i think couldn't
even emit 802.1q tags at all.

It's a bug in the driver, or an oddity of the xe hardware, depending
on the point of view.  Unlike many other devices, it seems these chips
do indeed deliver the FCS along with the packet, and set the length
appropriately.

Browsing through the source reveals that our network code could
already handle this situation, only the driver needs to set the
M_HASFCS flag.  The attached patch would do this.  If nobody objects,
i'll commit that.

The only remaining oddity is then that tcpdump displays the incoming
packet (and length) including the FCS.

I verified that the xe(4) driver in 4.x (where the card worked
flawlessly so far) also experienced this behaviour, i. e. the upper
network layers obviously silently ignored the trailing FCS.  Only now
in 5.x, the kernel complains about oversized packets and discards
them.

Index: if_xe.c
===================================================================
RCS file: /home/ncvs/src/sys/dev/xe/if_xe.c,v
retrieving revision 1.32
diff -u -r1.32 if_xe.c
--- if_xe.c	14 Nov 2002 23:54:55 -0000	1.32
+++ if_xe.c	26 Jan 2003 20:40:11 -0000
@@ -718,6 +718,8 @@
 
 	  /* Deliver packet to upper layers */
 	  if (mbp != NULL) {
+	    mbp->m_flags |= M_HASFCS;		/* FCS is included in our
+						 * packet */
 	    mbp->m_pkthdr.len = mbp->m_len = len;
 	    (*ifp->if_input)(ifp, mbp);		/* Send the packet on its way */
 	    ifp->if_ipackets++;			/* Success! */

-- 
cheers, J"org               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/                        NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-mobile" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030127000131.B27981>