diff options
author | sam <sam@FreeBSD.org> | 2003-10-28 05:47:40 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2003-10-28 05:47:40 +0000 |
commit | 39ba2e1c90c5d5fc0d01568719c540b15001528d (patch) | |
tree | ec5f03665816c252b1006ac692945285f1783b9b /sys/netinet/tcp_usrreq.c | |
parent | a68a195ad4d4f0bbdd17a20f3ce13c36224a00d7 (diff) | |
download | FreeBSD-src-39ba2e1c90c5d5fc0d01568719c540b15001528d.zip FreeBSD-src-39ba2e1c90c5d5fc0d01568719c540b15001528d.tar.gz |
speedup stream socket recv handling by tracking the tail of
the mbuf chain instead of walking the list for each append
Submitted by: ps/jayanth
Obtained from: netbsd (jason thorpe)
Diffstat (limited to 'sys/netinet/tcp_usrreq.c')
-rw-r--r-- | sys/netinet/tcp_usrreq.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index 5212d6f..805a4fb 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -685,7 +685,7 @@ tcp_usr_send(struct socket *so, int flags, struct mbuf *m, m_freem(control); /* empty control, just free it */ } if (!(flags & PRUS_OOB)) { - sbappend(&so->so_snd, m); + sbappendstream(&so->so_snd, m); if (nam && tp->t_state < TCPS_SYN_SENT) { /* * Do implied connect if not yet connected, @@ -734,7 +734,7 @@ tcp_usr_send(struct socket *so, int flags, struct mbuf *m, * of data past the urgent section. * Otherwise, snd_up should be one lower. */ - sbappend(&so->so_snd, m); + sbappendstream(&so->so_snd, m); if (nam && tp->t_state < TCPS_SYN_SENT) { /* * Do implied connect if not yet connected, |