Date: Thu, 6 Sep 2007 03:42:41 GMT From: Kip Macy <kmacy@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 126121 for review Message-ID: <200709060342.l863gfKf049550@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=126121 Change 126121 by kmacy@kmacy:storage:toestack on 2007/09/06 03:42:13 direct operations to TOE usrreqs if TOE is enabled on a tcpcb Affected files ... .. //depot/projects/toestack/sys/conf/files#2 edit .. //depot/projects/toestack/sys/netinet/tcp_ofld.c#1 add .. //depot/projects/toestack/sys/netinet/tcp_ofld.h#1 add .. //depot/projects/toestack/sys/netinet/tcp_subr.c#2 edit .. //depot/projects/toestack/sys/netinet/tcp_usrreq.c#2 edit .. //depot/projects/toestack/sys/netinet/tcp_var.h#2 edit Differences ... ==== //depot/projects/toestack/sys/conf/files#2 (text+ko) ==== @@ -1887,6 +1887,7 @@ netinet/tcp_timer.c optional inet netinet/tcp_timewait.c optional inet netinet/tcp_usrreq.c optional inet +netinet/tcp_ofld.c optional inet netinet/udp_usrreq.c optional inet netinet/libalias/alias.c optional libalias | netgraph_nat netinet/libalias/alias_db.c optional libalias | netgraph_nat ==== //depot/projects/toestack/sys/netinet/tcp_subr.c#2 (text+ko) ==== @@ -83,6 +83,7 @@ #include <netinet/tcp_timer.h> #include <netinet/tcp_var.h> #include <netinet/tcp_syncache.h> +#include <netinet/tcp_ofld.h> #ifdef INET6 #include <netinet6/tcp6_var.h> #endif @@ -646,7 +647,7 @@ if (TCPS_HAVERCVDSYN(tp->t_state)) { tp->t_state = TCPS_CLOSED; - (void) tcp_output(tp); + (void) tcp_gen_abort(tp); tcpstat.tcps_drops++; } else tcpstat.tcps_conndrops++; @@ -1560,7 +1561,7 @@ tp->snd_recover = tp->snd_max; if (tp->t_flags & TF_SACK_PERMIT) EXIT_FASTRECOVERY(tp); - tcp_output(tp); + tcp_gen_send(tp); return (inp); } ==== //depot/projects/toestack/sys/netinet/tcp_usrreq.c#2 (text+ko) ==== @@ -83,6 +83,7 @@ #ifdef TCPDEBUG #include <netinet/tcp_debug.h> #endif +#include <netinet/tcp_ofld.h> /* * TCP protocol interface to socket abstraction. @@ -383,6 +384,7 @@ if (error == 0) { tp->t_state = TCPS_LISTEN; solisten_proto(so, backlog); + tcp_gen_listen(tp); } SOCK_UNLOCK(so); @@ -474,7 +476,7 @@ TCPDEBUG1(); if ((error = tcp_connect(tp, nam, td)) != 0) goto out; - error = tcp_output(tp); + error = tcp_gen_connect(tp, nam); out: TCPDEBUG2(PRU_CONNECT); INP_UNLOCK(inp); @@ -526,7 +528,7 @@ inp->inp_vflag &= ~INP_IPV6; if ((error = tcp_connect(tp, (struct sockaddr *)&sin, td)) != 0) goto out; - error = tcp_output(tp); + error = tcp_gen_connect(tp, nam); goto out; } inp->inp_vflag &= ~INP_IPV4; @@ -534,7 +536,7 @@ inp->inp_inc.inc_isipv6 = 1; if ((error = tcp6_connect(tp, nam, td)) != 0) goto out; - error = tcp_output(tp); + error = tcp_gen_connect(tp, nam); out: TCPDEBUG2(PRU_CONNECT); @@ -701,7 +703,7 @@ TCPDEBUG1(); socantsendmore(so); tcp_usrclosed(tp); - error = tcp_output(tp); + error = tcp_gen_disconnect(tp); out: TCPDEBUG2(PRU_SHUTDOWN); @@ -731,7 +733,7 @@ } tp = intotcpcb(inp); TCPDEBUG1(); - tcp_output(tp); + tcp_gen_rcvd(tp); out: TCPDEBUG2(PRU_RCVD); @@ -836,7 +838,7 @@ if (tp != NULL) { if (flags & PRUS_MORETOCOME) tp->t_flags |= TF_MORETOCOME; - error = tcp_output(tp); + error = tcp_gen_send(tp); if (flags & PRUS_MORETOCOME) tp->t_flags &= ~TF_MORETOCOME; } @@ -887,7 +889,7 @@ } tp->snd_up = tp->snd_una + so->so_snd.sb_cc; tp->t_flags |= TF_FORCEDATA; - error = tcp_output(tp); + error = tcp_gen_send(tp); tp->t_flags &= ~TF_FORCEDATA; } out: @@ -1488,7 +1490,7 @@ sbflush(&so->so_rcv); tcp_usrclosed(tp); if (!(inp->inp_vflag & INP_DROPPED)) - tcp_output(tp); + tcp_gen_disconnect(tp); } } ==== //depot/projects/toestack/sys/netinet/tcp_var.h#2 (text+ko) ==== @@ -123,6 +123,7 @@ #define TF_SIGNATURE 0x400000 /* require MD5 digests (RFC2385) */ #define TF_FORCEDATA 0x800000 /* force out a byte */ #define TF_TSO 0x1000000 /* TSO enabled on this connection */ +#define TF_TOE 0x2000000 /* TOE enabled on this connection */ tcp_seq snd_una; /* send unacknowledged */ tcp_seq snd_max; /* highest sequence number sent; @@ -206,6 +207,8 @@ int t_rttlow; /* smallest observerved RTT */ u_int32_t rfbuf_ts; /* recv buffer autoscaling timestamp */ int rfbuf_cnt; /* recv buffer autoscaling byte count */ + struct toe_usrreqs *t_tu; /* offload operations vector */ + void *t_toe_priv; }; #define IN_FASTRECOVERY(tp) (tp->t_flags & TF_FASTRECOVERY)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200709060342.l863gfKf049550>