From owner-freebsd-hackers Tue May 29 13: 9:16 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from freesbee.wheel.dk (freesbee.wheel.dk [193.162.159.97]) by hub.freebsd.org (Postfix) with ESMTP id 1188337B423 for ; Tue, 29 May 2001 13:09:13 -0700 (PDT) (envelope-from jesper@skriver.dk) Received: by freesbee.wheel.dk (Postfix, from userid 1001) id 92AD45D82; Tue, 29 May 2001 22:11:07 +0200 (CEST) Date: Tue, 29 May 2001 22:11:07 +0200 From: Jesper Skriver To: Bob Willcox Cc: hackers list Subject: Re: How to disable software TCP checksumming? Message-ID: <20010529221107.C49875@skriver.dk> References: <20010529144114.I19771@luke.immure.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010529144114.I19771@luke.immure.com>; from bob@immure.com on Tue, May 29, 2001 at 02:41:14PM -0500 X-PGP-Fingerprint: 6B88 9CE8 66E9 E631 C9C5 5EB4 22AB F0EC F956 1C31 X-PGP-Public-Key: http://freesbee.wheel.dk/~jesper/gpgkey.pub 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 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. Not without modifying the source, the below should do it from a quick look. Index: src/sys/netinet/tcp_input.c =================================================================== RCS file: /home/ncvs/src/sys/netinet/tcp_input.c,v retrieving revision 1.130 diff -u -r1.130 tcp_input.c --- src/sys/netinet/tcp_input.c 2001/05/29 19:54:45 1.130 +++ src/sys/netinet/tcp_input.c 2001/05/29 20:07:22 @@ -401,6 +401,7 @@ th = (struct tcphdr *)((caddr_t)ip + off0); tlen = ip->ip_len; +#if 0 if (m->m_pkthdr.csum_flags & CSUM_DATA_VALID) { if (m->m_pkthdr.csum_flags & CSUM_PSEUDO_HDR) th->th_sum = m->m_pkthdr.csum_data; @@ -423,6 +424,7 @@ tcpstat.tcps_rcvbadsum++; goto drop; } +#endif #ifdef INET6 /* Re-initialization for later version check */ ip->ip_v = IPVERSION; /Jesper -- Jesper Skriver, jesper(at)skriver(dot)dk - CCIE #5456 Work: Network manager @ AS3292 (Tele Danmark DataNetworks) Private: FreeBSD committer @ AS2109 (A much smaller network ;-) One Unix to rule them all, One Resolver to find them, One IP to bring them all and in the zone to bind them. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message