Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Feb 2003 12:02:42 -0800 (PST)
From:      wpaul@FreeBSD.ORG (Bill Paul)
To:        dcs@tcoip.com.br (Daniel C. Sobral)
Cc:        jlemon@FreeBSD.ORG, ru@FreeBSD.ORG, src-committers@FreeBSD.ORG, cvs-src@FreeBSD.ORG, cvs-all@FreeBSD.ORG
Subject:   Re: cvs commit: src/sys/dev/fxp if_fxp.c if_fxpreg.h if_fxpvar.h
Message-ID:  <20030227200242.198F237B401@hub.freebsd.org>
In-Reply-To: <3E5E60ED.70406@tcoip.com.br> from "Daniel C. Sobral" at "Feb 27, 2003 04:03:09 pm"

next in thread | previous in thread | raw e-mail | index | archive | help

> Well, whenever I use that txcsum/rxcsum thingy, the machine acquires a 
> kind of life-like appearance, and sends some strange pulses through the 
> TP cables and start gobbling all other switches it is connected to in a 
> similar fashion, in a manner very much like the BOOMERs of BubbleGum 
> Crisis and AD Police. I'm still wondering if that's an advanced feature 
> added by the .jp crew or not, though. :-)

That's nothing. You should see what happens when you turn on the
"devour soul" config bit.

[...]
 
> So, ignoring all that, my questions are:
> 
> 1) How do I know if an interface has actually been identified as 
> supporting the feature?

ifconfig -m should show RXCSUM/TXCSUM in its capabilities word.
It should show up in the options word too, however according to
jlemon it didn't because I forgot to set if_capenable in fxp_attach().
It should show up in both places now.
 
> 2) How do I know if the feature is in use?

Currently, it's on by default, so as long as you have an 82550 chip,
it's always in use. In order to use the checksumming features, you have
to configure the chip to use extended RX and TX descriptor structures.
The driver decides whether or not this can be done during the attach
phase, and if so, the extended structures will always be enabled.
 
> 3) If it can be turned on/off, how do I do it?

Right now, you can't turn it off. To make that work, I'd have to tweak
fxp_ioctl() to handle the SIOCIFCAP command. The trouble is there are
two ways to disable the checksumming:

- Keep the extended TX and RX DMA descriptors turned on, but ignore
  the extra fields and always compute/verify checksums in software.

- Turn off the extended RX/TX descriptors and pretend the chip is an
  82559 again.

The latter requires resetting/reconfiguring the chip, which also means
resetting/renegotiating the link. There's no special reason you can't
do this, but it's a little annoying. The former method requires no
reconfiguration, but doesn't really put everything back exactly the way
it was before. I'm not sure which way is preferable.

-Bill

--
=============================================================================
-Bill Paul            (510) 749-2329 | Senior Engineer, Master of Unix-Fu
                 wpaul@windriver.com | Wind River Systems
=============================================================================
      "If stupidity were a handicap, you'd have the best parking spot."
=============================================================================

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




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