Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 Jan 2008 07:16:55 GMT
From:      Kip Macy <kmacy@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 134185 for review
Message-ID:  <200801270716.m0R7Gtdp031863@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=134185

Change 134185 by kmacy@kmacy:storage:toehead on 2008/01/27 07:16:32

	remove superfluous use of timeo in t3_soreceive
	disable MBUF_IOVEC on receive

Affected files ...

.. //depot/projects/toehead/sys/dev/cxgb/ulp/tom/cxgb_cpl_socket.c#8 edit
.. //depot/projects/toehead/sys/modules/cxgb/cxgb/Makefile#4 edit

Differences ...

==== //depot/projects/toehead/sys/dev/cxgb/ulp/tom/cxgb_cpl_socket.c#8 (text+ko) ====

@@ -517,7 +517,6 @@
 	uint32_t offset;
 	int err, flags, avail, len, buffers_freed = 0, copied = 0;
 	int target;		/* Read at least this many bytes */
-	long timeo;
 	int user_ddp_ok, user_ddp_pending = 0;
 	struct ddp_state *p;
 	struct inpcb *inp = sotoinpcb(so);
@@ -532,19 +531,18 @@
 	len = uio->uio_resid;
 	m = so->so_rcv.sb_mb;
 	target = (flags & MSG_WAITALL) ? min(len, so->so_rcv.sb_hiwat) : so->so_rcv.sb_lowat;
-	timeo = so->so_rcv.sb_timeo;
 	p = &toep->tp_ddp_state;
 	user_ddp_ok = p->ubuf_ddp_ready;
 	p->cancel_ubuf = 0;
 
 	/*
-	 * XXX check timeo/signal/urgent
+	 * XXX check urgent
 	 */
 	if (m) 
 		goto got_mbuf;
 
 	/* empty receive queue */
-	if (copied >= target && /* !sk->sk_backlog.tail && */
+	if (copied >= target && (so->so_rcv.sb_mb == NULL) &&
 	    !user_ddp_pending)
 		goto done;
 
@@ -628,21 +626,21 @@
 	 * data.  Either stop short of urgent data or skip it if it's
 	 * first and we are not delivering urgent data inline.
 	 */
-	if (unlikely(tp->urg_data)) {
-		u32 urg_offset = tp->urg_seq - tp->copied_seq;
+	if (__predict_false(toep->tp_urg_data)) {
+		uint32_t urg_offset = tp->rcv_up - tp->copied_seq;
 		
 		if (urg_offset < avail) {
 			if (urg_offset) {
 				/* stop short of the urgent data */
 				avail = urg_offset;
-			} else if (!sock_flag(sk, SOCK_URGINLINE)) {
+			} else if ((so->so_options & SO_OOBINLINE) == 0) {
 				/* First byte is urgent, skip */
-				tp->copied_seq++;
+				toep->tp_copied_seq++;
 				offset++;
 				avail--;
 				if (!avail)
 					goto skip_copy;
-				}	
+			}	
 		}	
 	}	
 #endif
@@ -657,9 +655,7 @@
 	    /*
 	     * XXX
 	     */
-#ifdef notyet	    
-	    uio->uio_iovlen > p->kbuf[0]->length &&
-#endif	    
+	    uio->uio_iov->iov_len > p->kbuf[0]->dgl_length &&
 	    p->ubuf_ddp_ready) {
 		user_ddp_pending = 
 		    !t3_overlay_ubuf(so, uio, (so->so_state & SS_NBIO), flags, 1, 1);
@@ -795,6 +791,8 @@
 		if ((uio->uio_resid > zcopy_thres) &&
 		    (uio->uio_iovcnt == 1) &&  ((so->so_state & SS_NBIO) == 0)
 		    && zcopy_enabled) {
+			printf("uio_resid=%d zcopy_thres=%d\n",
+			    uio->uio_resid, zcopy_thres);
 			rv = t3_soreceive(so, flagsp, uio);
 			if (rv != EAGAIN)
 				return (rv);

==== //depot/projects/toehead/sys/modules/cxgb/cxgb/Makefile#4 (text+ko) ====

@@ -12,7 +12,7 @@
 SRCS+=	cxgb_multiq.c 
 
 CFLAGS+= -DCONFIG_CHELSIO_T3_CORE -g -DCONFIG_DEFINED -DDEFAULT_JUMBO -I${CXGB} -DSMP
-#CFLAGS+= -DDISABLE_MBUF_IOVEC
+CFLAGS+= -DDISABLE_MBUF_IOVEC
 #CFLAGS+= -DIFNET_MULTIQUEUE
 #CFLAGS+= -DINVARIANT_SUPPORT -DINVARIANTS 
 #CFLAGS+= -DWITNESS



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200801270716.m0R7Gtdp031863>