diff options
author | Kip Macy <kmacy@FreeBSD.org> | 2008-07-21 02:11:06 +0000 |
---|---|---|
committer | Kip Macy <kmacy@FreeBSD.org> | 2008-07-21 02:11:06 +0000 |
commit | 409d8ba5c7a04a583b39087da0d386313b746925 (patch) | |
tree | 495f2607336bb59043854f52d523a6353a456c78 | |
parent | e331636d14cb9713aad69582130eb37fa96f12a7 (diff) | |
download | src-409d8ba5c7a04a583b39087da0d386313b746925.tar.gz src-409d8ba5c7a04a583b39087da0d386313b746925.zip |
add interface for external consumers to syncache_expand - rename syncache_add in a manner consistent with other bits intended for offload
Notes
Notes:
svn path=/head/; revision=180645
-rw-r--r-- | sys/netinet/tcp_syncache.c | 15 | ||||
-rw-r--r-- | sys/netinet/tcp_syncache.h | 5 |
2 files changed, 18 insertions, 2 deletions
diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c index 97df5d4e15ae..3b5ae20f24e0 100644 --- a/sys/netinet/tcp_syncache.c +++ b/sys/netinet/tcp_syncache.c @@ -959,6 +959,19 @@ failed: return (0); } +int +tcp_offload_syncache_expand(struct in_conninfo *inc, struct tcpopt *to, + struct tcphdr *th, struct socket **lsop, struct mbuf *m) +{ + int rc; + + INP_INFO_WLOCK(&tcbinfo); + rc = syncache_expand(inc, to, th, lsop, m); + INP_INFO_WUNLOCK(&tcbinfo); + + return (rc); +} + /* * Given a LISTEN socket and an inbound SYN request, add * this to the syn cache, and send back a segment: @@ -1426,7 +1439,7 @@ syncache_add(struct in_conninfo *inc, struct tcpopt *to, struct tcphdr *th, } void -syncache_offload_add(struct in_conninfo *inc, struct tcpopt *to, +tcp_offload_syncache_add(struct in_conninfo *inc, struct tcpopt *to, struct tcphdr *th, struct inpcb *inp, struct socket **lsop, struct toe_usrreqs *tu, void *toepcb) { diff --git a/sys/netinet/tcp_syncache.h b/sys/netinet/tcp_syncache.h index 0323aa4d66eb..d733cf9e10cf 100644 --- a/sys/netinet/tcp_syncache.h +++ b/sys/netinet/tcp_syncache.h @@ -38,11 +38,14 @@ void syncache_init(void); void syncache_unreach(struct in_conninfo *, struct tcphdr *); int syncache_expand(struct in_conninfo *, struct tcpopt *, struct tcphdr *, struct socket **, struct mbuf *); +int tcp_offload_syncache_expand(struct in_conninfo *inc, struct tcpopt *to, + struct tcphdr *th, struct socket **lsop, struct mbuf *m); void syncache_add(struct in_conninfo *, struct tcpopt *, struct tcphdr *, struct inpcb *, struct socket **, struct mbuf *); -void syncache_offload_add(struct in_conninfo *, struct tcpopt *, +void tcp_offload_syncache_add(struct in_conninfo *, struct tcpopt *, struct tcphdr *, struct inpcb *, struct socket **, struct toe_usrreqs *tu, void *toepcb); + void syncache_chkrst(struct in_conninfo *, struct tcphdr *); void syncache_badack(struct in_conninfo *); int syncache_pcbcount(void); |