diff options
author | lucy wang - Sun Microsystems - Beijing China <xiuyan.wang@Sun.COM> | 2009-03-26 09:54:44 +0800 |
---|---|---|
committer | lucy wang - Sun Microsystems - Beijing China <xiuyan.wang@Sun.COM> | 2009-03-26 09:54:44 +0800 |
commit | 94e7edb1e6b194fffd0e7901c0b32e9fc836bc5b (patch) | |
tree | 578105e1f80b27ca4200d731633225fbdbe1acf8 /usr/src/uts/common/os/streamio.c | |
parent | 09ce0d4acf1a79c720d7e54b60e87cbfa0f1b2d6 (diff) | |
download | illumos-gate-94e7edb1e6b194fffd0e7901c0b32e9fc836bc5b.tar.gz |
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)
Diffstat (limited to 'usr/src/uts/common/os/streamio.c')
-rw-r--r-- | usr/src/uts/common/os/streamio.c | 12 |
1 files changed, 11 insertions, 1 deletions
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); } |