Thanks Drew!  This helps alot!

Bob


On Tue, May 29, 2001 at 05:00:43PM -0400, Andrew Gallatin wrote:
> 
> 
> 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: [EMAIL PROTECTED]
> Department of Computer Science                Phone: (919) 660-6590

-- 
Bob Willcox      Egotist, n.:
[EMAIL PROTECTED]       A person of low taste, more interested in himself than me.
Austin, TX                -- Ambrose Bierce, "The Devil's Dictionary"

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to