Date: Tue, 29 May 2001 22:11:07 +0200 From: Jesper Skriver <jesper@skriver.dk> To: Bob Willcox <bob@immure.com> Cc: hackers list <freebsd-hackers@freebsd.org> Subject: Re: How to disable software TCP checksumming? Message-ID: <20010529221107.C49875@skriver.dk> In-Reply-To: <20010529144114.I19771@luke.immure.com>; from bob@immure.com on Tue, May 29, 2001 at 02:41:14PM -0500 References: <20010529144114.I19771@luke.immure.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010529221107.C49875>