From owner-freebsd-hackers Tue May 29 14: 1:16 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) by hub.freebsd.org (Postfix) with ESMTP id BFE5037B424 for ; Tue, 29 May 2001 14:01:13 -0700 (PDT) (envelope-from gallatin@cs.duke.edu) Received: from grasshopper.cs.duke.edu (grasshopper.cs.duke.edu [152.3.145.30]) by duke.cs.duke.edu (8.9.3/8.9.3) with ESMTP id RAA24658; Tue, 29 May 2001 17:01:13 -0400 (EDT) Received: (from gallatin@localhost) by grasshopper.cs.duke.edu (8.11.3/8.9.1) id f4TL0hd38481; Tue, 29 May 2001 17:00:43 -0400 (EDT) (envelope-from gallatin@cs.duke.edu) From: Andrew Gallatin MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15124.3579.211031.178700@grasshopper.cs.duke.edu> Date: Tue, 29 May 2001 17:00:43 -0400 (EDT) To: Bob Willcox Cc: "Jesper Skriver hackers list" Subject: Re: How to disable software TCP checksumming? In-Reply-To: <20010529221107.C49875@skriver.dk> References: <20010529144114.I19771@luke.immure.com> <20010529221107.C49875@skriver.dk> X-Mailer: VM 6.75 under 21.1 (patch 12) "Channel Islands" XEmacs Lucid Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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