PERFORCE change 130522 for review
Kip Macy
kmacy at FreeBSD.org
Sat Dec 8 17:30:14 PST 2007
http://perforce.freebsd.org/chv.cgi?CH=130522
Change 130522 by kmacy at 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");
More information about the p4-projects
mailing list