From owner-svn-src-all@FreeBSD.ORG Thu Oct 28 00:16:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5211B1065674; Thu, 28 Oct 2010 00:16:55 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 273438FC12; Thu, 28 Oct 2010 00:16:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9S0Gt80048090; Thu, 28 Oct 2010 00:16:55 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9S0GtHf048088; Thu, 28 Oct 2010 00:16:55 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <201010280016.o9S0GtHf048088@svn.freebsd.org> From: Jack F Vogel Date: Thu, 28 Oct 2010 00:16:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214441 - head/sys/dev/e1000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Oct 2010 00:16:55 -0000 Author: jfv Date: Thu Oct 28 00:16:54 2010 New Revision: 214441 URL: http://svn.freebsd.org/changeset/base/214441 Log: In the data setup code for doing offloads the ip and tcp pointers were not reset after some pullups. In practice this led to an NFS mount failure when using UDP reported by Kevin Lo, thanks Kevin. Fix from yongari, thank you! Modified: head/sys/dev/e1000/if_em.c Modified: head/sys/dev/e1000/if_em.c ============================================================================== --- head/sys/dev/e1000/if_em.c Wed Oct 27 23:55:15 2010 (r214440) +++ head/sys/dev/e1000/if_em.c Thu Oct 28 00:16:54 2010 (r214441) @@ -93,7 +93,7 @@ int em_display_debug_stats = 0; /********************************************************************* * Driver version: *********************************************************************/ -char em_driver_version[] = "7.1.6"; +char em_driver_version[] = "7.1.7"; /********************************************************************* * PCI Device ID Table @@ -1848,6 +1848,7 @@ em_xmit(struct tx_ring *txr, struct mbuf *m_headp = NULL; return (ENOBUFS); } + ip = (struct ip *)(mtod(m_head, char *) + ip_off); ip->ip_len = 0; ip->ip_sum = 0; /* @@ -1856,6 +1857,7 @@ em_xmit(struct tx_ring *txr, struct mbuf * what hardware expect to see. This is adherence of * Microsoft's Large Send specification. */ + tp = (struct tcphdr *)(mtod(m_head, char *) + poff); tp->th_sum = in_pseudo(ip->ip_src.s_addr, ip->ip_dst.s_addr, htons(IPPROTO_TCP)); } else if (m_head->m_pkthdr.csum_flags & CSUM_TCP) { @@ -1865,12 +1867,15 @@ em_xmit(struct tx_ring *txr, struct mbuf *m_headp = NULL; return (ENOBUFS); } + ip = (struct ip *)(mtod(m_head, char *) + ip_off); + tp = (struct tcphdr *)(mtod(m_head, char *) + poff); } else if (m_head->m_pkthdr.csum_flags & CSUM_UDP) { m_head = m_pullup(m_head, poff + sizeof(struct udphdr)); if (m_head == NULL) { *m_headp = NULL; return (ENOBUFS); } + ip = (struct ip *)(mtod(m_head, char *) + ip_off); } *m_headp = m_head; }