From owner-p4-projects@FreeBSD.ORG Fri Dec 21 20:52:42 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 32DFD16A421; Fri, 21 Dec 2007 20:52: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 AAA2516A417 for ; Fri, 21 Dec 2007 20:52: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 85C9A13C442 for ; Fri, 21 Dec 2007 20:52: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 lBLKqf3X004922 for ; Fri, 21 Dec 2007 20:52:41 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id lBLKqf9w004918 for perforce@freebsd.org; Fri, 21 Dec 2007 20:52:41 GMT (envelope-from kmacy@freebsd.org) Date: Fri, 21 Dec 2007 20:52:41 GMT Message-Id: <200712212052.lBLKqf9w004918@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 131387 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: Fri, 21 Dec 2007 20:52:42 -0000 http://perforce.freebsd.org/chv.cgi?CH=131387 Change 131387 by kmacy@kmacy:entropy:iwarp on 2007/12/21 20:52:01 call m_freem instead of m_free in case the mbuf is null fix style issues set SB_NO_COALESCE on send buffer for passive sockets as well Affected files ... .. //depot/projects/iwarp/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c#4 edit Differences ... ==== //depot/projects/iwarp/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c#4 (text+ko) ==== @@ -968,7 +968,8 @@ if (tcp_do_rfc1323) for (; space > 65535 && wscale < 14; space >>= 1, ++wscale) ; - return wscale; + + return (wscale); } /* @@ -999,7 +1000,7 @@ (uint32_t)d->rx_page_size * 23 : MAX_RCV_WND); - return min(wnd, max_rcv_wnd); + return (min(wnd, max_rcv_wnd)); } /* @@ -1038,6 +1039,7 @@ * */ tp->rcv_wnd = select_rcv_wnd(so); + toep->tp_ulp_mode = TOM_TUNABLE(dev, ddp) && !(so->so_options & SO_NO_DDP) && tp->rcv_wnd >= MIN_DDP_RCV_WIN ? ULP_MODE_TCPDDP : 0; toep->tp_qset_idx = 0; @@ -1080,8 +1082,8 @@ flv_valid = (TOM_TUNABLE(dev, cong_alg) != -1); - return V_FLAVORS_VALID(flv_valid) | - V_CONG_CONTROL_FLAVOR(flv_valid ? TOM_TUNABLE(dev, cong_alg) : 0); + return (V_FLAVORS_VALID(flv_valid) | + V_CONG_CONTROL_FLAVOR(flv_valid ? TOM_TUNABLE(dev, cong_alg) : 0)); } #if 0 (((*(struct tom_data **)&(dev)->l4opt)->conf.cong_alg) != -1) @@ -1469,7 +1471,7 @@ if (err != EOPNOTSUPP) return (err); - return tcp_ctloutput(so, sopt); + return (tcp_ctloutput(so, sopt)); } /* @@ -1974,7 +1976,7 @@ if (tp) INP_UNLOCK(tp->t_inpcb); out: - m_free(m); + m_freem(m); } /* @@ -2952,16 +2954,14 @@ tp = sototcpcb(so); INP_LOCK(tp->t_inpcb); -#ifdef notyet - so->so_snd.sb_flags |= SB_TOE; - so->so_rcv.sb_flags |= SB_TOE; -#endif + + so->so_snd.sb_flags |= SB_NOCOALESCE; + toep->tp_tp = tp; toep->tp_flags = 0; tp->t_toe = toep; reset_wr_list(toep); tp->rcv_wnd = select_rcv_wnd(so); - DPRINTF("rcv_wnd=%ld\n", tp->rcv_wnd); install_offload_ops(so); toep->tp_wr_max = toep->tp_wr_avail = TOM_TUNABLE(tdev, max_wrs);