Heed SO_NO_OFFLOAD.
MFC after: 1 week
This commit is contained in:
parent
5cd3dcaa25
commit
37cc0ecb1b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=245915
@ -370,7 +370,8 @@ tcp_usr_listen(struct socket *so, int backlog, struct thread *td)
|
||||
tp->t_state = TCPS_LISTEN;
|
||||
solisten_proto(so, backlog);
|
||||
#ifdef TCP_OFFLOAD
|
||||
tcp_offload_listen_start(tp);
|
||||
if ((so->so_options & SO_NO_OFFLOAD) == 0)
|
||||
tcp_offload_listen_start(tp);
|
||||
#endif
|
||||
}
|
||||
SOCK_UNLOCK(so);
|
||||
@ -414,7 +415,8 @@ tcp6_usr_listen(struct socket *so, int backlog, struct thread *td)
|
||||
tp->t_state = TCPS_LISTEN;
|
||||
solisten_proto(so, backlog);
|
||||
#ifdef TCP_OFFLOAD
|
||||
tcp_offload_listen_start(tp);
|
||||
if ((so->so_options & SO_NO_OFFLOAD) == 0)
|
||||
tcp_offload_listen_start(tp);
|
||||
#endif
|
||||
}
|
||||
SOCK_UNLOCK(so);
|
||||
@ -468,6 +470,7 @@ tcp_usr_connect(struct socket *so, struct sockaddr *nam, struct thread *td)
|
||||
goto out;
|
||||
#ifdef TCP_OFFLOAD
|
||||
if (registered_toedevs > 0 &&
|
||||
(so->so_options & SO_NO_OFFLOAD) == 0 &&
|
||||
(error = tcp_offload_connect(so, nam)) == 0)
|
||||
goto out;
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user