summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_subr.c
diff options
context:
space:
mode:
authorkmacy <kmacy@FreeBSD.org>2007-12-18 22:59:07 +0000
committerkmacy <kmacy@FreeBSD.org>2007-12-18 22:59:07 +0000
commit7a03620a3b8d5378521bc95997c1b60485cbeaac (patch)
tree39dc8c7b7fba1fe70eea9b304504e23c0a65135a /sys/netinet/tcp_subr.c
parentee337f2c349391c3e318ede0c5cff21592e02677 (diff)
downloadFreeBSD-src-7a03620a3b8d5378521bc95997c1b60485cbeaac.zip
FreeBSD-src-7a03620a3b8d5378521bc95997c1b60485cbeaac.tar.gz
Incorporate TCP offload hooks in to core TCP code.
- Rename output routines tcp_gen_* -> tcp_output_*. - Rename notification routines that turn in to no-ops in the absence of TOE from tcp_gen_* -> tcp_offload_*. - Fix some minor comment nits. - Add a /* FALLTHROUGH */ Reviewed by: Sam Leffler, Robert Watson, and Mike Silbersack
Diffstat (limited to 'sys/netinet/tcp_subr.c')
-rw-r--r--sys/netinet/tcp_subr.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c
index 7d2a677..214dc3e 100644
--- a/sys/netinet/tcp_subr.c
+++ b/sys/netinet/tcp_subr.c
@@ -85,6 +85,7 @@ __FBSDID("$FreeBSD$");
#include <netinet/tcp_timer.h>
#include <netinet/tcp_var.h>
#include <netinet/tcp_syncache.h>
+#include <netinet/tcp_offload.h>
#ifdef INET6
#include <netinet6/tcp6_var.h>
#endif
@@ -651,7 +652,7 @@ tcp_drop(struct tcpcb *tp, int errno)
if (TCPS_HAVERCVDSYN(tp->t_state)) {
tp->t_state = TCPS_CLOSED;
- (void) tcp_output(tp);
+ (void) tcp_output_reset(tp);
tcpstat.tcps_drops++;
} else
tcpstat.tcps_conndrops++;
@@ -749,6 +750,9 @@ tcp_discardcb(struct tcpcb *tp)
tp->t_segqlen--;
tcp_reass_qsize--;
}
+ /* Disconnect offload device, if any. */
+ tcp_offload_detach(tp);
+
tcp_free_sackholes(tp);
inp->inp_ppcb = NULL;
tp->t_inpcb = NULL;
@@ -768,6 +772,9 @@ tcp_close(struct tcpcb *tp)
INP_INFO_WLOCK_ASSERT(&tcbinfo);
INP_LOCK_ASSERT(inp);
+ /* Notify any offload devices of listener close */
+ if (tp->t_state == TCPS_LISTEN)
+ tcp_offload_listen_close(tp);
in_pcbdrop(inp);
tcpstat.tcps_closed++;
KASSERT(inp->inp_socket != NULL, ("tcp_close: inp_socket NULL"));
@@ -1562,7 +1569,7 @@ tcp_mtudisc(struct inpcb *inp, int errno)
tp->snd_recover = tp->snd_max;
if (tp->t_flags & TF_SACK_PERMIT)
EXIT_FASTRECOVERY(tp);
- tcp_output(tp);
+ tcp_output_send(tp);
return (inp);
}
OpenPOWER on IntegriCloud