summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_offload.h
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_offload.h
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_offload.h')
-rw-r--r--sys/netinet/tcp_offload.h22
1 files changed, 12 insertions, 10 deletions
diff --git a/sys/netinet/tcp_offload.h b/sys/netinet/tcp_offload.h
index 33d73ee..21ecba4 100644
--- a/sys/netinet/tcp_offload.h
+++ b/sys/netinet/tcp_offload.h
@@ -216,8 +216,10 @@ EVENTHANDLER_DECLARE(tcp_offload_listen_stop, tcp_offload_listen_stop_fn);
int tcp_offload_connect(struct socket *so, struct sockaddr *nam);
/*
- * The tcp_gen_* routines are wrappers around the toe_usrreqs calls,
- * in the non-offloaded case they translate to tcp_output.
+ * The tcp_output_* routines are wrappers around the toe_usrreqs calls
+ * which trigger packet transmission. In the non-offloaded case they
+ * translate to tcp_output. The tcp_offload_* routines notify TOE
+ * of specific events. I the non-offloaded case they are no-ops.
*
* Listen is a special case because it is a 1 to many relationship
* and there can be more than one offload driver in the system.
@@ -233,7 +235,7 @@ int tcp_offload_connect(struct socket *so, struct sockaddr *nam);
#define SO_OFFLOADABLE(so) ((so->so_options & SO_NO_OFFLOAD) == 0)
static __inline int
-tcp_gen_connect(struct socket *so, struct sockaddr *nam)
+tcp_output_connect(struct socket *so, struct sockaddr *nam)
{
struct tcpcb *tp = sototcpcb(so);
int error;
@@ -251,7 +253,7 @@ tcp_gen_connect(struct socket *so, struct sockaddr *nam)
}
static __inline int
-tcp_gen_send(struct tcpcb *tp)
+tcp_output_send(struct tcpcb *tp)
{
#ifndef TCP_OFFLOAD_DISABLE
@@ -262,7 +264,7 @@ tcp_gen_send(struct tcpcb *tp)
}
static __inline int
-tcp_gen_rcvd(struct tcpcb *tp)
+tcp_output_rcvd(struct tcpcb *tp)
{
#ifndef TCP_OFFLOAD_DISABLE
@@ -273,7 +275,7 @@ tcp_gen_rcvd(struct tcpcb *tp)
}
static __inline int
-tcp_gen_disconnect(struct tcpcb *tp)
+tcp_output_disconnect(struct tcpcb *tp)
{
#ifndef TCP_OFFLOAD_DISABLE
@@ -284,7 +286,7 @@ tcp_gen_disconnect(struct tcpcb *tp)
}
static __inline int
-tcp_gen_reset(struct tcpcb *tp)
+tcp_output_reset(struct tcpcb *tp)
{
#ifndef TCP_OFFLOAD_DISABLE
@@ -295,7 +297,7 @@ tcp_gen_reset(struct tcpcb *tp)
}
static __inline void
-tcp_gen_detach(struct tcpcb *tp)
+tcp_offload_detach(struct tcpcb *tp)
{
#ifndef TCP_OFFLOAD_DISABLE
@@ -305,7 +307,7 @@ tcp_gen_detach(struct tcpcb *tp)
}
static __inline void
-tcp_gen_listen_open(struct tcpcb *tp)
+tcp_offload_listen_open(struct tcpcb *tp)
{
#ifndef TCP_OFFLOAD_DISABLE
@@ -315,7 +317,7 @@ tcp_gen_listen_open(struct tcpcb *tp)
}
static __inline void
-tcp_gen_listen_close(struct tcpcb *tp)
+tcp_offload_listen_close(struct tcpcb *tp)
{
#ifndef TCP_OFFLOAD_DISABLE
OpenPOWER on IntegriCloud