From 94e7edb1e6b194fffd0e7901c0b32e9fc836bc5b Mon Sep 17 00:00:00 2001 From: lucy wang - Sun Microsystems - Beijing China Date: Thu, 26 Mar 2009 09:54:44 +0800 Subject: 6812228 No need to do software checksum for multiple-mblk packets in ip_tcp_input() 6694625 Performance falls off the cliff with large IO sizes PSARC/2009/039 prefetch interfaces 6812282 PSARC 2009/039 prefetch interfaces Contributed by Paul Durrant (pdurrant@solarflare.com) --- usr/src/uts/common/os/streamio.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'usr/src/uts/common/os/streamio.c') diff --git a/usr/src/uts/common/os/streamio.c b/usr/src/uts/common/os/streamio.c index e4744daa35..7d4d23cfee 100644 --- a/usr/src/uts/common/os/streamio.c +++ b/usr/src/uts/common/os/streamio.c @@ -7499,11 +7499,21 @@ retry: * If a streams message is likely to consist * of many small mblks, it is pulled up into * one continuous chunk of memory. + * The size of the first mblk may be bogus because + * successive read() calls on the socket reduce + * the size of this mblk until it is exhausted + * and then the code walks on to the next. Thus + * the size of the mblk may not be the original size + * that was passed up, it's simply a remainder + * and hence can be very small without any + * implication that the packet is badly fragmented. + * So the size of the possible second mblk is + * used to spot a badly fragmented packet. * see longer comment at top of page * by mblk_pull_len declaration. */ - if (MBLKL(bp) < mblk_pull_len) { + if (bp->b_cont != NULL && MBLKL(bp->b_cont) < mblk_pull_len) { (void) pullupmsg(bp, -1); } -- cgit v1.2.3