diff options
author | kmacy <kmacy@FreeBSD.org> | 2007-12-17 10:02:01 +0000 |
---|---|---|
committer | kmacy <kmacy@FreeBSD.org> | 2007-12-17 10:02:01 +0000 |
commit | 41d59439f83322b0bb95a3ae4e5ddb1d9886f5c1 (patch) | |
tree | 2fac3fab89781701a15cdbeceebdac7e9f15e58f | |
parent | 03fb3792900dc40682ce7bf0fe337f2a9f4152aa (diff) | |
download | FreeBSD-src-41d59439f83322b0bb95a3ae4e5ddb1d9886f5c1.zip FreeBSD-src-41d59439f83322b0bb95a3ae4e5ddb1d9886f5c1.tar.gz |
Add SB_NOCOALESCE flag to disable socket buffer update in place
-rw-r--r-- | sys/kern/uipc_sockbuf.c | 1 | ||||
-rw-r--r-- | sys/sys/socketvar.h | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/uipc_sockbuf.c b/sys/kern/uipc_sockbuf.c index aa1d5ce..d8c0cab 100644 --- a/sys/kern/uipc_sockbuf.c +++ b/sys/kern/uipc_sockbuf.c @@ -761,6 +761,7 @@ sbcompress(struct sockbuf *sb, struct mbuf *m, struct mbuf *n) } if (n && (n->m_flags & M_EOR) == 0 && M_WRITABLE(n) && + ((sb->sb_flags & SB_NOCOALESCE) == 0) && m->m_len <= MCLBYTES / 4 && /* XXX: Don't copy too much */ m->m_len <= M_TRAILINGSPACE(n) && n->m_type == m->m_type) { diff --git a/sys/sys/socketvar.h b/sys/sys/socketvar.h index bc8df7b..a8163f3 100644 --- a/sys/sys/socketvar.h +++ b/sys/sys/socketvar.h @@ -130,6 +130,7 @@ struct socket { #define SB_NOINTR 0x40 /* operations not interruptible */ #define SB_AIO 0x80 /* AIO operations queued */ #define SB_KNOTE 0x100 /* kernel note attached */ +#define SB_NOCOALESCE 0x200 /* don't coalesce new data into existing mbufs */ #define SB_AUTOSIZE 0x800 /* automatically size socket buffer */ void (*so_upcall)(struct socket *, void *, int); |