Deleted Added
full compact
tcp_offload.c (180648) tcp_offload.c (180674)
1/*-
2 * Copyright (c) 2007, Chelsio Inc.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright notice,

--- 12 unchanged lines hidden (view full) ---

21 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25 * POSSIBILITY OF SUCH DAMAGE.
26 */
27
28#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2007, Chelsio Inc.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright notice,

--- 12 unchanged lines hidden (view full) ---

21 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25 * POSSIBILITY OF SUCH DAMAGE.
26 */
27
28#include <sys/cdefs.h>
29__FBSDID("$FreeBSD: head/sys/netinet/tcp_offload.c 180648 2008-07-21 02:23:02Z kmacy $");
29__FBSDID("$FreeBSD: head/sys/netinet/tcp_offload.c 180674 2008-07-21 21:22:56Z kmacy $");
30
31#include <sys/param.h>
32#include <sys/systm.h>
33#include <sys/types.h>
34#include <sys/malloc.h>
35#include <sys/kernel.h>
36#include <sys/sysctl.h>
37#include <sys/mbuf.h>

--- 60 unchanged lines hidden (view full) ---

98 * to sys/netinet/tcp_offload.c
99 */
100
101void
102tcp_offload_twstart(struct tcpcb *tp)
103{
104
105 INP_INFO_WLOCK(&tcbinfo);
30
31#include <sys/param.h>
32#include <sys/systm.h>
33#include <sys/types.h>
34#include <sys/malloc.h>
35#include <sys/kernel.h>
36#include <sys/sysctl.h>
37#include <sys/mbuf.h>

--- 60 unchanged lines hidden (view full) ---

98 * to sys/netinet/tcp_offload.c
99 */
100
101void
102tcp_offload_twstart(struct tcpcb *tp)
103{
104
105 INP_INFO_WLOCK(&tcbinfo);
106 inp_wlock(tp->t_inpcb);
106 INP_WLOCK(tp->t_inpcb);
107 tcp_twstart(tp);
108 INP_INFO_WUNLOCK(&tcbinfo);
109}
110
107 tcp_twstart(tp);
108 INP_INFO_WUNLOCK(&tcbinfo);
109}
110
111void
112tcp_offload_twstart_disconnect(struct tcpcb *tp)
113{
114 struct socket *so;
115
116 INP_INFO_WLOCK(&tcbinfo);
117 inp_wlock(tp->t_inpcb);
118 so = tp->t_inpcb->inp_socket;
119 tcp_twstart(tp);
120 if (so)
121 soisdisconnected(so);
122 INP_INFO_WUNLOCK(&tcbinfo);
123}
124
125struct tcpcb *
126tcp_offload_close(struct tcpcb *tp)
127{
128
129 INP_INFO_WLOCK(&tcbinfo);
130 INP_WLOCK(tp->t_inpcb);
131 tp = tcp_close(tp);
132 INP_INFO_WUNLOCK(&tcbinfo);

--- 20 unchanged lines hidden ---
111struct tcpcb *
112tcp_offload_close(struct tcpcb *tp)
113{
114
115 INP_INFO_WLOCK(&tcbinfo);
116 INP_WLOCK(tp->t_inpcb);
117 tp = tcp_close(tp);
118 INP_INFO_WUNLOCK(&tcbinfo);

--- 20 unchanged lines hidden ---