Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 May 2001 17:00:43 -0400 (EDT)
From:      Andrew Gallatin <gallatin@cs.duke.edu>
To:        Bob Willcox <bob@immure.com>
Cc:        "Jesper Skriver <jesper@skriver.dk>     hackers list" <freebsd-hackers@freebsd.org>
Subject:   Re: How to disable software TCP checksumming?
Message-ID:  <15124.3579.211031.178700@grasshopper.cs.duke.edu>
In-Reply-To: <20010529221107.C49875@skriver.dk>
References:  <20010529144114.I19771@luke.immure.com> <20010529221107.C49875@skriver.dk>

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


Jesper Skriver writes:
 > On Tue, May 29, 2001 at 02:41:14PM -0500, Bob Willcox wrote:
 > > Hi,
 > > 
 > > I am working on a device driver for a GSN adapter that has hardware CRC
 > > checking and need to know if there is a way to disable the software CRC
 > > checking for TCP?  This is on a FreeBSD 4.2-stable system.
 > 

Eegads.  I think the original poster wanted to be able to use the
hardware CRC features of his nic, not ignore checksums altogther.

Bob -- Take a look at the /sys/pci/if_ti.c driver for an example of
how to use hardware checksum assist.

On the recieve side, you want to set the m_pkthdr.csum_flags
appropriately (depending on what your device can do) on each recieve,
as well as fill in the actual checksum in m_pkthdr.csum_data.

On the send side, you need to specify what your device is capable of
assisting with in the if_hwassist field of your driver's ifp struct.
Packets will come down w/o those fields filled in.  The stack will
expect your device to calculate those fields in hardware.

I beleive these features appeared around 4.1, so if this is a 3rd
party driver, you may want to check __FreeBSD_version >= 410000.


Hope this helps,

Drew

------------------------------------------------------------------------------
Andrew Gallatin, Sr Systems Programmer	http://www.cs.duke.edu/~gallatin
Duke University				Email: gallatin@cs.duke.edu
Department of Computer Science		Phone: (919) 660-6590

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




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