Add SB_NOCOALESCE flag to disable socket buffer update in place
This commit is contained in:
parent
03fb379290
commit
41d59439f8
@ -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) {
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user