From owner-p4-projects@FreeBSD.ORG Thu Sep 6 03:42:42 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2561616A41B; Thu, 6 Sep 2007 03:42:42 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CDB1016A419 for ; Thu, 6 Sep 2007 03:42:41 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id BDACC13C457 for ; Thu, 6 Sep 2007 03:42:41 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l863gffx049553 for ; Thu, 6 Sep 2007 03:42:41 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l863gfKf049550 for perforce@freebsd.org; Thu, 6 Sep 2007 03:42:41 GMT (envelope-from kmacy@freebsd.org) Date: Thu, 6 Sep 2007 03:42:41 GMT Message-Id: <200709060342.l863gfKf049550@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 126121 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Sep 2007 03:42:42 -0000 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 #include #include +#include #ifdef INET6 #include #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 #endif +#include /* * 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)