Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 9 Dec 2007 01:30:13 GMT
From:      Kip Macy <kmacy@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 130522 for review
Message-ID:  <200712090130.lB91UDr1056055@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=130522

Change 130522 by kmacy@kmacy_home:ethng on 2007/12/09 01:29:35

	fix contiguous pkthdr check - still need to make this more
	robust before pulling in to CVS

Affected files ...

.. //depot/projects/ethng/src/sys/dev/cxgb/cxgb_sge.c#36 edit

Differences ...

==== //depot/projects/ethng/src/sys/dev/cxgb/cxgb_sge.c#36 (text+ko) ====

@@ -1362,7 +1362,7 @@
 		
 		return (0);		
 	} else if (tso_info) {
-		int eth_type;
+		int undersized, eth_type;
 		struct cpl_tx_pkt_lso *hdr = (struct cpl_tx_pkt_lso *)txd;
 		struct ip *ip;
 		struct tcphdr *tcp;
@@ -1381,7 +1381,11 @@
 		hdr->len = htonl(mlen | 0x80000000);
 
 		DPRINTF("tso buf len=%d\n", mlen);
-		if (__predict_false(tmpmi->mi_len < TCPPKTHDRSIZE)) {
+		undersized = (((tmpmi->mi_len < TCPPKTHDRSIZE) &&
+			(m0->m_flags & M_VLANTAG)) ||
+		    (tmpmi->mi_len < TCPPKTHDRSIZE - ETHER_VLAN_ENCAP_LEN));
+
+		if (__predict_false(undersized)) {
 			pkthdr = tmp;
 			dump_mi(mi);
 			panic("discontig packet - fixxorz");



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200712090130.lB91UDr1056055>