diff options
author | kmacy <kmacy@FreeBSD.org> | 2008-07-21 02:11:06 +0000 |
---|---|---|
committer | kmacy <kmacy@FreeBSD.org> | 2008-07-21 02:11:06 +0000 |
commit | fd0203e8815fb7fa34adf77baedda187e8652fcf (patch) | |
tree | 495f2607336bb59043854f52d523a6353a456c78 /sys/netinet | |
parent | a6eb23b528a0042a3dd002387d0648df218935a0 (diff) | |
download | FreeBSD-src-fd0203e8815fb7fa34adf77baedda187e8652fcf.zip FreeBSD-src-fd0203e8815fb7fa34adf77baedda187e8652fcf.tar.gz |
add interface for external consumers to syncache_expand - rename syncache_add in a manner consistent with other bits intended for offload
Diffstat (limited to 'sys/netinet')
-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 97df5d4..3b5ae20 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 0323aa4..d733cf9 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); |