Author: jfv
Date: Sat Jan 22 20:01:46 2011
New Revision: 217724
URL: http://svn.freebsd.org/changeset/base/217724

Log:
  MFC rev 217591

Modified:
  stable/7/sys/dev/e1000/if_em.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/dev/e1000/if_em.c
==============================================================================
--- stable/7/sys/dev/e1000/if_em.c      Sat Jan 22 20:00:24 2011        
(r217723)
+++ stable/7/sys/dev/e1000/if_em.c      Sat Jan 22 20:01:46 2011        
(r217724)
@@ -1699,12 +1699,12 @@ em_xmit(struct tx_ring *txr, struct mbuf
                }
                ip = (struct ip *)(mtod(m_head, char *) + ip_off);
                poff = ip_off + (ip->ip_hl << 2);
-               m_head = m_pullup(m_head, poff + sizeof(struct tcphdr));
-               if (m_head == NULL) {
-                       *m_headp = NULL;
-                       return (ENOBUFS);
-               }
                if (do_tso) {
+                       m_head = m_pullup(m_head, poff + sizeof(struct tcphdr));
+                       if (m_head == NULL) {
+                               *m_headp = NULL;
+                               return (ENOBUFS);
+                       }
                        tp = (struct tcphdr *)(mtod(m_head, char *) + poff);
                        /*
                         * TSO workaround:
@@ -1728,6 +1728,11 @@ em_xmit(struct tx_ring *txr, struct mbuf
                        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) {
+                       m_head = m_pullup(m_head, poff + sizeof(struct tcphdr));
+                       if (m_head == NULL) {
+                               *m_headp = NULL;
+                               return (ENOBUFS);
+                       }
                        tp = (struct tcphdr *)(mtod(m_head, char *) + poff);
                        m_head = m_pullup(m_head, poff + (tp->th_off << 2));
                        if (m_head == NULL) {
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to