# HG changeset patch # Parent 4f19784a0da47611560d6c834168ee157f0bc2cd Heed SO_NO_OFFLOAD. diff -r 4f19784a0da4 -r 3ae39659d1ea sys/netinet/tcp_usrreq.c --- a/sys/netinet/tcp_usrreq.c Fri Aug 17 16:40:01 2012 -0700 +++ b/sys/netinet/tcp_usrreq.c Fri Aug 17 16:40:41 2012 -0700 @@ -370,7 +370,8 @@ 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 @@ 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 @@ 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