summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd T. Fries <todd@cvs.openbsd.org>2002-08-08 18:26:38 +0000
committerTodd T. Fries <todd@cvs.openbsd.org>2002-08-08 18:26:38 +0000
commit96a5b4648220ed844b1c668eccedc33dbb6c54f9 (patch)
tree1122e5d288ce1c5822b77b62a1b3b16e61e74b39
parent8e4d9a1f7c08ce4dccc0b6802e75ac248f7ccc1c (diff)
backout the tree break. ok pb@, art@
-rw-r--r--sys/kern/uipc_socket.c74
-rw-r--r--sys/kern/uipc_socket2.c230
-rw-r--r--sys/kern/vnode_if.c2
-rw-r--r--sys/netccitt/if_x25subr.c10
-rw-r--r--sys/netccitt/pk_output.c5
-rw-r--r--sys/netccitt/pk_usrreq.c3
-rw-r--r--sys/netinet/tcp_input.c8
-rw-r--r--sys/netinet/tcp_usrreq.c6
8 files changed, 78 insertions, 260 deletions
diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c
index dc42737aae0..e9c783579a8 100644
--- a/sys/kern/uipc_socket.c
+++ b/sys/kern/uipc_socket.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uipc_socket.c,v 1.44 2002/08/08 17:07:32 provos Exp $ */
+/* $OpenBSD: uipc_socket.c,v 1.45 2002/08/08 18:26:37 todd Exp $ */
/* $NetBSD: uipc_socket.c,v 1.21 1996/02/04 02:17:52 christos Exp $ */
/*
@@ -666,8 +666,6 @@ restart:
error = EWOULDBLOCK;
goto release;
}
- SBLASTRECORDCHK(&so->so_rcv, "soreceive sbwait 1");
- SBLASTMBUFCHK(&so->so_rcv, "soreceive sbwait 1");
sbunlock(&so->so_rcv);
error = sbwait(&so->so_rcv);
splx(s);
@@ -676,18 +674,10 @@ restart:
goto restart;
}
dontblock:
- /*
- * On entry here, m points to the first record of the socket buffer.
- * While we process the initial mbufs containing address and control
- * info, we save a copy of m->m_nextpkt into nextrecord.
- */
#ifdef notyet /* XXXX */
if (uio->uio_procp)
uio->uio_procp->p_stats->p_ru.ru_msgrcv++;
#endif
- KASSERT(m == so->so_rcv.sb_mb);
- SBLASTRECORDCHK(&so->so_rcv, "soreceive 1");
- SBLASTMBUFCHK(&so->so_rcv, "soreceive 1");
nextrecord = m->m_nextpkt;
if (pr->pr_flags & PR_ADDR) {
#ifdef DIAGNOSTIC
@@ -738,26 +728,9 @@ dontblock:
controlp = &(*controlp)->m_next;
}
}
-
- /*
- * If m is non-NULL, we have some data to read. From now on,
- * make sure to keep sb_lastrecord consistent when working on
- * the last packet on the chain (nextrecord == NULL) and we
- * change m->m_nextpkt.
- */
if (m) {
- if ((flags & MSG_PEEK) == 0) {
+ if ((flags & MSG_PEEK) == 0)
m->m_nextpkt = nextrecord;
- /*
- * If nextrecord == NULL (this is a single chain),
- * then sb_lastrecord may not be valid here if m
- * was changed earlier.
- */
- if (nextrecord == NULL) {
- KASSERT(so->so_rcv.sb_mb == m);
- so->so_rcv.sb_lastrecord = m;
- }
- }
type = m->m_type;
if (type == MT_OOBDATA)
flags |= MSG_OOB;
@@ -765,16 +738,7 @@ dontblock:
flags |= MSG_BCAST;
if (m->m_flags & M_MCAST)
flags |= MSG_MCAST;
- } else {
- if ((flags & MSG_PEEK) == 0) {
- KASSERT(so->so_rcv.sb_mb == m);
- so->so_rcv.sb_mb = nextrecord;
- SB_EMPTY_FIXUP(&so->so_rcv);
- }
}
- SBLASTRECORDCHK(&so->so_rcv, "soreceive 2");
- SBLASTMBUFCHK(&so->so_rcv, "soreceive 2");
-
moff = 0;
offset = 0;
while (m && uio->uio_resid > 0 && error == 0) {
@@ -802,8 +766,6 @@ dontblock:
* block interrupts again.
*/
if (mp == 0 && uio_error == 0) {
- SBLASTRECORDCHK(&so->so_rcv, "soreceive uiomove");
- SBLASTMBUFCHK(&so->so_rcv, "soreceive uiomove");
resid = uio->uio_resid;
splx(s);
uio_error =
@@ -832,21 +794,8 @@ dontblock:
MFREE(m, so->so_rcv.sb_mb);
m = so->so_rcv.sb_mb;
}
- /*
- * If m != NULL, we also know that
- * so->so_rcv.sb_mb != NULL.
- */
- KASSERT(so->so_rcv.sb_mb == m);
- if (m) {
+ if (m)
m->m_nextpkt = nextrecord;
- if (nextrecord == NULL)
- so->so_rcv.sb_lastrecord = m;
- } else {
- so->so_rcv.sb_mb = nextrecord;
- SB_EMPTY_FIXUP(&so->so_rcv);
- }
- SBLASTRECORDCHK(&so->so_rcv, "soreceive 3");
- SBLASTMBUFCHK(&so->so_rcv, "soreceive 3");
}
} else {
if (flags & MSG_PEEK)
@@ -885,8 +834,6 @@ dontblock:
!sosendallatonce(so) && !nextrecord) {
if (so->so_error || so->so_state & SS_CANTRCVMORE)
break;
- SBLASTRECORDCHK(&so->so_rcv, "soreceive sbwait 2");
- SBLASTMBUFCHK(&so->so_rcv, "soreceive sbwait 2");
error = sbwait(&so->so_rcv);
if (error) {
sbunlock(&so->so_rcv);
@@ -904,21 +851,8 @@ dontblock:
(void) sbdroprecord(&so->so_rcv);
}
if ((flags & MSG_PEEK) == 0) {
- if (m == 0) {
- /*
- * First part is an inline SB_EMPTY_FIXUP(). Second
- * part makes sure sb_lastrecord is up-to-date if
- * there is still data in the socket buffer.
- */
+ if (m == 0)
so->so_rcv.sb_mb = nextrecord;
- if (so->so_rcv.sb_mb == NULL) {
- so->so_rcv.sb_mbtail = NULL;
- so->so_rcv.sb_lastrecord = NULL;
- } else if (nextrecord->m_nextpkt == NULL)
- so->so_rcv.sb_lastrecord = nextrecord;
- }
- SBLASTRECORDCHK(&so->so_rcv, "soreceive 4");
- SBLASTMBUFCHK(&so->so_rcv, "soreceive 4");
if (pr->pr_flags & PR_WANTRCVD && so->so_pcb)
(*pr->pr_usrreq)(so, PRU_RCVD, NULL,
(struct mbuf *)(long)flags, NULL);
diff --git a/sys/kern/uipc_socket2.c b/sys/kern/uipc_socket2.c
index 02543bc3144..0371b65b037 100644
--- a/sys/kern/uipc_socket2.c
+++ b/sys/kern/uipc_socket2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uipc_socket2.c,v 1.28 2002/08/08 17:07:32 provos Exp $ */
+/* $OpenBSD: uipc_socket2.c,v 1.29 2002/08/08 18:26:37 todd Exp $ */
/* $NetBSD: uipc_socket2.c,v 1.11 1996/02/04 02:17:55 christos Exp $ */
/*
@@ -435,61 +435,6 @@ sbrelease(sb)
* or sbdroprecord() when the data is acknowledged by the peer.
*/
-#ifdef SOCKBUF_DEBUG
-void
-sblastrecordchk(struct sockbuf *sb, const char *where)
-{
- struct mbuf *m = sb->sb_mb;
-
- while (m && m->m_nextpkt)
- m = m->m_nextpkt;
-
- if (m != sb->sb_lastrecord) {
- printf("sblastrecordchk: sb_mb %p sb_lastrecord %p last %p\n",
- sb->sb_mb, sb->sb_lastrecord, m);
- printf("packet chain:\n");
- for (m = sb->sb_mb; m != NULL; m = m->m_nextpkt)
- printf("\t%p\n", m);
- panic("sblastrecordchk from %s\n", where);
- }
-}
-
-void
-sblastmbufchk(struct sockbuf *sb, const char *where)
-{
- struct mbuf *m = sb->sb_mb;
- struct mbuf *n;
-
- while (m && m->m_nextpkt)
- m = m->m_nextpkt;
-
- while (m && m->m_next)
- m = m->m_next;
-
- if (m != sb->sb_mbtail) {
- printf("sblastmbufchk: sb_mb %p sb_mbtail %p last %p\n",
- sb->sb_mb, sb->sb_mbtail, m);
- printf("packet tree:\n");
- for (m = sb->sb_mb; m != NULL; m = m->m_nextpkt) {
- printf("\t");
- for (n = m; n != NULL; n = n->m_next)
- printf("%p ", n);
- printf("\n");
- }
- panic("sblastmbufchk from %s", where);
- }
-}
-#endif /* SOCKBUF_DEBUG */
-
-#define SBLINKRECORD(sb, m0) \
-do { \
- if ((sb)->sb_lastrecord != NULL) \
- (sb)->sb_lastrecord->m_nextpkt = (m0); \
- else \
- (sb)->sb_mb = (m0); \
- (sb)->sb_lastrecord = (m0); \
-} while (/*CONSTCOND*/0)
-
/*
* Append mbuf chain m to the last record in the
* socket buffer sb. The additional space associated
@@ -505,58 +450,26 @@ sbappend(sb, m)
if (m == 0)
return;
-
- SBLASTRECORDCHK(sb, "sbappend 1");
-
- if ((n = sb->sb_lastrecord) != NULL) {
- /*
- * XXX Would like to simply use sb_mbtail here, but
- * XXX I need to verify that I won't miss an EOR that
- * XXX way.
- */
+ if ((n = sb->sb_mb) != NULL) {
+ while (n->m_nextpkt)
+ n = n->m_nextpkt;
do {
if (n->m_flags & M_EOR) {
sbappendrecord(sb, m); /* XXXXXX!!!! */
return;
}
} while (n->m_next && (n = n->m_next));
- } else {
- /*
- * If this is the first record in the socket buffer, it's
- * also the last record.
- */
- sb->sb_lastrecord = m;
}
sbcompress(sb, m, n);
- SBLASTRECORDCHK(sb, "sbappend 2");
-}
-
-/*
- * This version of sbappend() should only be used when the caller
- * absolutely knows that there will never be more than one record
- * in the socket buffer, that is, a stream protocol (such as TCP).
- */
-void
-sbappendstream(struct sockbuf *sb, struct mbuf *m)
-{
-
- KDASSERT(m->m_nextpkt == NULL);
- KASSERT(sb->sb_mb == sb->sb_lastrecord);
-
- SBLASTMBUFCHK(sb, __func__);
-
- sbcompress(sb, m, sb->sb_mbtail);
-
- sb->sb_lastrecord = sb->sb_mb;
- SBLASTRECORDCHK(sb, __func__);
}
#ifdef SOCKBUF_DEBUG
void
-sbcheck(struct sockbuf *sb)
+sbcheck(sb)
+ register struct sockbuf *sb;
{
- struct mbuf *m;
- u_long len = 0, mbcnt = 0;
+ register struct mbuf *m;
+ register int len = 0, mbcnt = 0;
for (m = sb->sb_mb; m; m = m->m_next) {
len += m->m_len;
@@ -567,7 +480,7 @@ sbcheck(struct sockbuf *sb)
panic("sbcheck nextpkt");
}
if (len != sb->sb_cc || mbcnt != sb->sb_mbcnt) {
- printf("cc %lu != %lu || mbcnt %lu != %lu\n", len, sb->sb_cc,
+ printf("cc %d != %d || mbcnt %d != %d\n", len, sb->sb_cc,
mbcnt, sb->sb_mbcnt);
panic("sbcheck");
}
@@ -579,20 +492,26 @@ sbcheck(struct sockbuf *sb)
* begins a new record.
*/
void
-sbappendrecord(struct sockbuf *sb, struct mbuf *m0)
+sbappendrecord(sb, m0)
+ register struct sockbuf *sb;
+ register struct mbuf *m0;
{
- struct mbuf *m;
+ register struct mbuf *m;
if (m0 == 0)
return;
-
+ if ((m = sb->sb_mb) != NULL)
+ while (m->m_nextpkt)
+ m = m->m_nextpkt;
/*
* Put the first mbuf on the queue.
* Note this permits zero length records.
*/
sballoc(sb, m0);
- SBLASTRECORDCHK(sb, "sbappendrecord 1");
- SBLINKRECORD(sb, m0);
+ if (m)
+ m->m_nextpkt = m0;
+ else
+ sb->sb_mb = m0;
m = m0->m_next;
m0->m_next = 0;
if (m && (m0->m_flags & M_EOR)) {
@@ -600,7 +519,6 @@ sbappendrecord(struct sockbuf *sb, struct mbuf *m0)
m->m_flags |= M_EOR;
}
sbcompress(sb, m, m0);
- SBLASTRECORDCHK(sb, "sbappendrecord 2");
}
/*
@@ -609,15 +527,15 @@ sbappendrecord(struct sockbuf *sb, struct mbuf *m0)
* but after any other OOB data.
*/
void
-sbinsertoob(struct sockbuf *sb, struct mbuf *m0)
+sbinsertoob(sb, m0)
+ register struct sockbuf *sb;
+ register struct mbuf *m0;
{
- struct mbuf *m, **mp;
+ register struct mbuf *m;
+ register struct mbuf **mp;
if (m0 == 0)
return;
-
- SBLASTRECORDCHK(sb, "sbinsertoob 1");
-
for (mp = &sb->sb_mb; (m = *mp) != NULL; mp = &((*mp)->m_nextpkt)) {
again:
switch (m->m_type) {
@@ -637,10 +555,6 @@ sbinsertoob(struct sockbuf *sb, struct mbuf *m0)
*/
sballoc(sb, m0);
m0->m_nextpkt = *mp;
- if (*mp == NULL) {
- /* m0 is actually the new tail */
- sb->sb_lastrecord = m0;
- }
*mp = m0;
m = m0->m_next;
m0->m_next = 0;
@@ -649,7 +563,6 @@ sbinsertoob(struct sockbuf *sb, struct mbuf *m0)
m->m_flags |= M_EOR;
}
sbcompress(sb, m, m0);
- SBLASTRECORDCHK(sb, "sbinsertoob 2");
}
/*
@@ -659,10 +572,12 @@ sbinsertoob(struct sockbuf *sb, struct mbuf *m0)
* Returns 0 if no space in sockbuf or insufficient mbufs.
*/
int
-sbappendaddr(struct sockbuf *sb, struct sockaddr *asa, struct mbuf *m0,
- struct mbuf *control)
+sbappendaddr(sb, asa, m0, control)
+ register struct sockbuf *sb;
+ struct sockaddr *asa;
+ struct mbuf *m0, *control;
{
- struct mbuf *m, *n, *nlast;
+ register struct mbuf *m, *n;
int space = asa->sa_len;
if (m0 && (m0->m_flags & M_PKTHDR) == 0)
@@ -688,27 +603,23 @@ sbappendaddr(struct sockbuf *sb, struct sockaddr *asa, struct mbuf *m0,
else
control = m0;
m->m_next = control;
-
- SBLASTRECORDCHK(sb, "sbappendaddr 1");
-
- for (n = m; n->m_next != NULL; n = n->m_next)
+ for (n = m; n; n = n->m_next)
sballoc(sb, n);
- sballoc(sb, n);
- nlast = n;
- SBLINKRECORD(sb, m);
-
- sb->sb_mbtail = nlast;
- SBLASTMBUFCHK(sb, "sbappendaddr");
-
- SBLASTRECORDCHK(sb, "sbappendaddr 2");
-
+ if ((n = sb->sb_mb) != NULL) {
+ while (n->m_nextpkt)
+ n = n->m_nextpkt;
+ n->m_nextpkt = m;
+ } else
+ sb->sb_mb = m;
return (1);
}
int
-sbappendcontrol(struct sockbuf *sb, struct mbuf *m0, struct mbuf *control)
+sbappendcontrol(sb, m0, control)
+ struct sockbuf *sb;
+ struct mbuf *m0, *control;
{
- struct mbuf *m, *mlast, *n;
+ register struct mbuf *m, *n;
int space = 0;
if (control == 0)
@@ -724,20 +635,14 @@ sbappendcontrol(struct sockbuf *sb, struct mbuf *m0, struct mbuf *control)
if (space > sbspace(sb))
return (0);
n->m_next = m0; /* concatenate data to control */
-
- SBLASTRECORDCHK(sb, "sbappendcontrol 1");
-
- for (m = control; m->m_next != NULL; m = m->m_next)
+ for (m = control; m; m = m->m_next)
sballoc(sb, m);
- sballoc(sb, m);
- mlast = m;
- SBLINKRECORD(sb, control);
-
- sb->sb_mbtail = mlast;
- SBLASTMBUFCHK(sb, "sbappendcontrol");
-
- SBLASTRECORDCHK(sb, "sbappendcontrol 2");
-
+ if ((n = sb->sb_mb) != NULL) {
+ while (n->m_nextpkt)
+ n = n->m_nextpkt;
+ n->m_nextpkt = control;
+ } else
+ sb->sb_mb = control;
return (1);
}
@@ -777,7 +682,6 @@ sbcompress(struct sockbuf *sb, struct mbuf *m, struct mbuf *n)
n->m_next = m;
else
sb->sb_mb = m;
- sb->sb_mbtail = m;
sballoc(sb, m);
n = m;
m->m_flags &= ~M_EOR;
@@ -790,7 +694,6 @@ sbcompress(struct sockbuf *sb, struct mbuf *m, struct mbuf *n)
else
printf("semi-panic: sbcompress\n");
}
- SBLASTMBUFCHK(sb, __func__);
}
/*
@@ -798,27 +701,27 @@ sbcompress(struct sockbuf *sb, struct mbuf *m, struct mbuf *n)
* Check that all resources are reclaimed.
*/
void
-sbflush(struct sockbuf *sb)
+sbflush(sb)
+ register struct sockbuf *sb;
{
- KASSERT((sb->sb_flags & SB_LOCK) == 0);
-
+ if (sb->sb_flags & SB_LOCK)
+ panic("sbflush");
while (sb->sb_mbcnt)
sbdrop(sb, (int)sb->sb_cc);
-
- KASSERT(sb->sb_cc == 0);
- KASSERT(sb->sb_mb == NULL);
- KASSERT(sb->sb_mbtail == NULL);
- KASSERT(sb->sb_lastrecord == NULL);
+ if (sb->sb_cc || sb->sb_mb)
+ panic("sbflush 2");
}
/*
* Drop data from (the front of) a sockbuf.
*/
void
-sbdrop(struct sockbuf *sb, int len)
+sbdrop(sb, len)
+ register struct sockbuf *sb;
+ register int len;
{
- struct mbuf *m, *mn;
+ register struct mbuf *m, *mn;
struct mbuf *next;
next = (m = sb->sb_mb) ? m->m_nextpkt : 0;
@@ -851,17 +754,6 @@ sbdrop(struct sockbuf *sb, int len)
m->m_nextpkt = next;
} else
sb->sb_mb = next;
- /*
- * First part is an inline SB_EMPTY_FIXUP(). Second part
- * makes sure sb_lastrecord is up-to-date if we dropped
- * part of the last record.
- */
- m = sb->sb_mb;
- if (m == NULL) {
- sb->sb_mbtail = NULL;
- sb->sb_lastrecord = NULL;
- } else if (m->m_nextpkt == NULL)
- sb->sb_lastrecord = m;
}
/*
@@ -869,9 +761,10 @@ sbdrop(struct sockbuf *sb, int len)
* and move the next record to the front.
*/
void
-sbdroprecord(struct sockbuf *sb)
+sbdroprecord(sb)
+ register struct sockbuf *sb;
{
- struct mbuf *m, *mn;
+ register struct mbuf *m, *mn;
m = sb->sb_mb;
if (m) {
@@ -881,7 +774,6 @@ sbdroprecord(struct sockbuf *sb)
MFREE(m, mn);
} while ((m = mn) != NULL);
}
- SB_EMPTY_FIXUP(sb);
}
/*
diff --git a/sys/kern/vnode_if.c b/sys/kern/vnode_if.c
index f21f2334f5d..1c762730f66 100644
--- a/sys/kern/vnode_if.c
+++ b/sys/kern/vnode_if.c
@@ -5,7 +5,7 @@
* Created from the file:
* OpenBSD: vnode_if.src,v 1.19 2002/02/22 20:37:45 drahn Exp
* by the script:
- * OpenBSD: vnode_if.sh,v 1.10 2002/03/14 23:47:05 millert Exp
+ * OpenBSD: vnode_if.sh,v 1.8 2001/02/26 17:34:18 art Exp
*/
/*
diff --git a/sys/netccitt/if_x25subr.c b/sys/netccitt/if_x25subr.c
index ad7e23c6f9a..65b6be4838d 100644
--- a/sys/netccitt/if_x25subr.c
+++ b/sys/netccitt/if_x25subr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_x25subr.c,v 1.11 2002/08/08 17:07:32 provos Exp $ */
+/* $OpenBSD: if_x25subr.c,v 1.12 2002/08/08 18:26:37 todd Exp $ */
/* $NetBSD: if_x25subr.c,v 1.13 1996/05/09 22:29:25 scottr Exp $ */
/*
@@ -771,13 +771,7 @@ pk_rtattach(so, m0)
((a) > 0 ? (1 + (((a) - 1) | (sizeof(long) - 1))) : sizeof(long))
#define transfer_sockbuf(s, f, l) \
while ((m = (s)->sb_mb) != NULL) \
- { \
- (s)->sb_mb = m->m_nextpkt; \
- SB_EMPTY_FIXUP((s)); \
- m->m_nextpkt = 0; \
- sbfree((s), m); \
- f; \
- }
+ {(s)->sb_mb = m->m_act; m->m_act = 0; sbfree((s), m); f;}
if (rt)
rt->rt_refcnt--;
diff --git a/sys/netccitt/pk_output.c b/sys/netccitt/pk_output.c
index 36eed07cf5b..1329fe10c3c 100644
--- a/sys/netccitt/pk_output.c
+++ b/sys/netccitt/pk_output.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pk_output.c,v 1.3 2002/08/08 17:07:32 provos Exp $ */
+/* $OpenBSD: pk_output.c,v 1.4 2002/08/08 18:26:37 todd Exp $ */
/* $NetBSD: pk_output.c,v 1.7 1996/02/13 22:05:30 christos Exp $ */
/*
@@ -212,8 +212,7 @@ nextpk(lcp)
return (NULL);
sb->sb_mb = m->m_nextpkt;
- SB_EMPTY_FIXUP(sb);
- m->m_nextpkt = 0;
+ m->m_act = 0;
for (n = m; n; n = n->m_next)
sbfree(sb, n);
}
diff --git a/sys/netccitt/pk_usrreq.c b/sys/netccitt/pk_usrreq.c
index f60c239a9cc..bf93ffa2116 100644
--- a/sys/netccitt/pk_usrreq.c
+++ b/sys/netccitt/pk_usrreq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pk_usrreq.c,v 1.5 2002/08/08 17:07:32 provos Exp $ */
+/* $OpenBSD: pk_usrreq.c,v 1.6 2002/08/08 18:26:37 todd Exp $ */
/* $NetBSD: pk_usrreq.c,v 1.10 1996/02/13 22:05:43 christos Exp $ */
/*
@@ -277,7 +277,6 @@ pk_usrreq(so, req, m, nam, control)
if (n && n->m_type == MT_OOBDATA) {
unsigned len = n->m_pkthdr.len;
so->so_rcv.sb_mb = n->m_nextpkt;
- SB_EMPTY_FIXUP(&so->so_rcv);
if (len != n->m_len &&
(n = m_pullup(n, len)) == 0)
break;
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c
index 6bdc83992d0..f9edcefbb44 100644
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcp_input.c,v 1.118 2002/08/08 17:07:32 provos Exp $ */
+/* $OpenBSD: tcp_input.c,v 1.119 2002/08/08 18:26:37 todd Exp $ */
/* $NetBSD: tcp_input.c,v 1.23 1996/02/13 23:43:44 christos Exp $ */
/*
@@ -300,7 +300,7 @@ present:
if (so->so_state & SS_CANTRCVMORE)
m_freem(q->ipqe_m);
else
- sbappendstream(&so->so_rcv, q->ipqe_m);
+ sbappend(&so->so_rcv, q->ipqe_m);
pool_put(&ipqent_pool, q);
q = nq;
} while (q != NULL && q->ipqe_tcp->th_seq == tp->rcv_nxt);
@@ -1036,7 +1036,7 @@ findpcb:
* to socket buffer.
*/
m_adj(m, iphlen + off);
- sbappendstream(&so->so_rcv, m);
+ sbappend(&so->so_rcv, m);
sorwakeup(so);
TCP_SETUP_ACK(tp, tiflags);
if (tp->t_flags & TF_ACKNOW)
@@ -2115,7 +2115,7 @@ dodata: /* XXX */
tcpstat.tcps_rcvbyte += tlen;
ND6_HINT(tp);
m_adj(m, hdroptlen);
- sbappendstream(&so->so_rcv, m);
+ sbappend(&so->so_rcv, m);
sorwakeup(so);
} else {
m_adj(m, hdroptlen);
diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c
index c18409f60bf..998e17f1b3a 100644
--- a/sys/netinet/tcp_usrreq.c
+++ b/sys/netinet/tcp_usrreq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcp_usrreq.c,v 1.64 2002/08/08 17:07:32 provos Exp $ */
+/* $OpenBSD: tcp_usrreq.c,v 1.65 2002/08/08 18:26:37 todd Exp $ */
/* $NetBSD: tcp_usrreq.c,v 1.20 1996/02/13 23:44:16 christos Exp $ */
/*
@@ -409,7 +409,7 @@ tcp_usrreq(so, req, m, nam, control)
* marker if URG set. Possibly send more data.
*/
case PRU_SEND:
- sbappendstream(&so->so_snd, m);
+ sbappend(&so->so_snd, m);
error = tcp_output(tp);
break;
@@ -457,7 +457,7 @@ tcp_usrreq(so, req, m, nam, control)
* of data past the urgent section.
* Otherwise, snd_up should be one lower.
*/
- sbappendstream(&so->so_snd, m);
+ sbappend(&so->so_snd, m);
tp->snd_up = tp->snd_una + so->so_snd.sb_cc;
tp->t_force = 1;
error = tcp_output(tp);