aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet/tcp_offload.c
diff options
context:
space:
mode:
authorNavdeep Parhar <np@FreeBSD.org>2018-04-03 01:08:54 +0000
committerNavdeep Parhar <np@FreeBSD.org>2018-04-03 01:08:54 +0000
commita64564109a6944c2ab1719b740f680c80de0f598 (patch)
tree6b6d5cab4d410ae51274f79a436a87cfc34a9849 /sys/netinet/tcp_offload.c
parent9f5b999acafbe8936206ecdc10be2f0e4dd0a536 (diff)
downloadsrc-a64564109a6944c2ab1719b740f680c80de0f598.tar.gz
src-a64564109a6944c2ab1719b740f680c80de0f598.zip
Add a hook to allow the toedev handling an offloaded connection to
provide accurate TCP_INFO. Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D14816
Notes
Notes: svn path=/head/; revision=331901
Diffstat (limited to 'sys/netinet/tcp_offload.c')
-rw-r--r--sys/netinet/tcp_offload.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/sys/netinet/tcp_offload.c b/sys/netinet/tcp_offload.c
index e458a99f79dc..f7814769bdfb 100644
--- a/sys/netinet/tcp_offload.c
+++ b/sys/netinet/tcp_offload.c
@@ -168,6 +168,17 @@ tcp_offload_ctloutput(struct tcpcb *tp, int sopt_dir, int sopt_name)
}
void
+tcp_offload_tcp_info(struct tcpcb *tp, struct tcp_info *ti)
+{
+ struct toedev *tod = tp->tod;
+
+ KASSERT(tod != NULL, ("%s: tp->tod is NULL, tp %p", __func__, tp));
+ INP_WLOCK_ASSERT(tp->t_inpcb);
+
+ tod->tod_tcp_info(tod, tp, ti);
+}
+
+void
tcp_offload_detach(struct tcpcb *tp)
{
struct toedev *tod = tp->tod;