PERFORCE change 131387 for review

Kip Macy kmacy at FreeBSD.org
Fri Dec 21 12:52:42 PST 2007


http://perforce.freebsd.org/chv.cgi?CH=131387

Change 131387 by kmacy at 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);


More information about the p4-projects mailing list