Subject: Re: kern/29544: NFS server broken in -current
To: None <thorpej@netbsd.org, gnats-admin@netbsd.org,>
From: Jason Thorpe <thorpej@shagadelic.org>
List: netbsd-bugs
Date: 02/28/2005 16:58:02
The following reply was made to PR kern/29544; it has been noted by GNATS.

From: Jason Thorpe <thorpej@shagadelic.org>
To: Martin Husemann <martin@duskware.de>
Cc: gnats-bugs@NetBSD.org
Subject: Re: kern/29544: NFS server broken in -current
Date: Mon, 28 Feb 2005 08:57:32 -0800

 --Apple-Mail-2-306149930
 Content-Transfer-Encoding: 7bit
 Content-Type: text/plain;
 	charset=US-ASCII;
 	format=flowed
 
 
 On Feb 27, 2005, at 4:03 PM, Martin Husemann wrote:
 
 > I usually enable "ip4csum tcp4csum udp4csum" in /etc/ifconfig.wm0.
 > I use UDP mounts for NFS.
 >
 > Now - with rev 1.90 of if_wm.c everything works as expected. With 
 > everything
 > later I can get it to work if I do either of
 
 IPv4 header checksum offloading was broken in the presence of sending 
 fragmented IP packets by ip_output.c,v 1.143.  Please re-enable all of 
 the offloading options and try the attached patch (against 1.144).
 
 -- thorpej
 
 --Apple-Mail-2-306149930
 Content-Transfer-Encoding: 7bit
 Content-Type: text/plain;
 	x-unix-mode=0644;
 	name="pr29544-patch.txt"
 Content-Disposition: attachment;
 	filename=pr29544-patch.txt
 
 Index: ip_output.c
 ===================================================================
 RCS file: /cvsroot/src/sys/netinet/ip_output.c,v
 retrieving revision 1.144
 diff -u -p -r1.144 ip_output.c
 --- ip_output.c	26 Feb 2005 22:45:12 -0000	1.144
 +++ ip_output.c	28 Feb 2005 16:54:22 -0000
 @@ -978,6 +978,7 @@ ip_fragment(struct mbuf *m, struct ifnet
  			KASSERT((m->m_pkthdr.csum_flags & M_CSUM_IPv4) == 0);
  		} else {
  			m->m_pkthdr.csum_flags |= M_CSUM_IPv4;
 +			m->m_pkthdr.csum_data |= hlen << 16;
  		}
  		ipstat.ips_ofragments++;
  		fragments++;
 @@ -1038,7 +1039,7 @@ in_delayed_cksum(struct mbuf *m)
  	if (csum == 0 && (m->m_pkthdr.csum_flags & M_CSUM_UDPv4) != 0)
  		csum = 0xffff;
  
 -	offset += m->m_pkthdr.csum_data;	/* checksum offset */
 +	offset += M_CSUM_DATA_IPv4_OFFSET(m->m_pkthdr.csum_data);
  
  	if ((offset + sizeof(u_int16_t)) > m->m_len) {
  		/* This happen when ip options were inserted
 
 --Apple-Mail-2-306149930--