diff options
author | silby <silby@FreeBSD.org> | 2001-06-23 03:21:46 +0000 |
---|---|---|
committer | silby <silby@FreeBSD.org> | 2001-06-23 03:21:46 +0000 |
commit | f41767543e91978acb89276274f32fe6566ef613 (patch) | |
tree | 8d364d91b3427e5e39be4b2952a487aee0ba2a8c /sys/netinet/tcp_output.c | |
parent | cb05fc6c2a8bdf494106b7b9b73e2a36ef37f0df (diff) | |
download | FreeBSD-src-f41767543e91978acb89276274f32fe6566ef613.zip FreeBSD-src-f41767543e91978acb89276274f32fe6566ef613.tar.gz |
Eliminate the allocation of a tcp template structure for each
connection. The information contained in a tcptemp can be
reconstructed from a tcpcb when needed.
Previously, tcp templates required the allocation of one
mbuf per connection. On large systems, this change should
free up a large number of mbufs.
Reviewed by: bmilekic, jlemon, ru
MFC after: 2 weeks
Diffstat (limited to 'sys/netinet/tcp_output.c')
-rw-r--r-- | sys/netinet/tcp_output.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index a2a2cf3..2740c72 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -632,16 +632,11 @@ send: m->m_len = hdrlen; } m->m_pkthdr.rcvif = (struct ifnet *)0; - if (tp->t_template == 0) - panic("tcp_output"); #ifdef INET6 if (isipv6) { ip6 = mtod(m, struct ip6_hdr *); th = (struct tcphdr *)(ip6 + 1); - bcopy((caddr_t)tp->t_template->tt_ipgen, (caddr_t)ip6, - sizeof(struct ip6_hdr)); - bcopy((caddr_t)&tp->t_template->tt_t, (caddr_t)th, - sizeof(struct tcphdr)); + tcp_fillheaders(tp, ip6, th); } else #endif /* INET6 */ { @@ -649,10 +644,7 @@ send: ipov = (struct ipovly *)ip; th = (struct tcphdr *)(ip + 1); /* this picks up the pseudo header (w/o the length) */ - bcopy((caddr_t)tp->t_template->tt_ipgen, (caddr_t)ip, - sizeof(struct ip)); - bcopy((caddr_t)&tp->t_template->tt_t, (caddr_t)th, - sizeof(struct tcphdr)); + tcp_fillheaders(tp, ip, th); } /* |