From owner-p4-projects@FreeBSD.ORG Tue Feb 19 15:44:29 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B751816A468; Tue, 19 Feb 2008 15:44:29 +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 7B53816A41A for ; Tue, 19 Feb 2008 15:44:29 +0000 (UTC) (envelope-from swise@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 657F113C45B for ; Tue, 19 Feb 2008 15:44:29 +0000 (UTC) (envelope-from swise@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 m1JFiTDm062093 for ; Tue, 19 Feb 2008 15:44:29 GMT (envelope-from swise@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1JFiTSt062090 for perforce@freebsd.org; Tue, 19 Feb 2008 15:44:29 GMT (envelope-from swise@FreeBSD.org) Date: Tue, 19 Feb 2008 15:44:29 GMT Message-Id: <200802191544.m1JFiTSt062090@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to swise@FreeBSD.org using -f From: Steve Wise To: Perforce Change Reviews Cc: Subject: PERFORCE change 135724 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: Tue, 19 Feb 2008 15:44:30 -0000 http://perforce.freebsd.org/chv.cgi?CH=135724 Change 135724 by swise@swise:vic10:iwarp on 2008/02/19 15:44:09 Set SO_NO_DDP for rdma sockets. Affected files ... .. //depot/projects/iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.c#4 edit .. //depot/projects/iwarp/sys/kern/uipc_socket.c#4 edit Differences ... ==== //depot/projects/iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.c#4 (text+ko) ==== @@ -647,6 +647,11 @@ goto err; } + if (ep->com.so->so_rcv.sb_mb) { + printf("%s data after soreceive called! so %p sb_mb %p top %p\n", + __FUNCTION__, ep->com.so, ep->com.so->so_rcv.sb_mb, top); + } + m = top; do { /* @@ -1282,6 +1287,9 @@ static int create_sock(struct iwch_ep_common *epc) { int err; + struct sockopt sopt; + int on=1; + err = socreate(AF_INET, &epc->so, SOCK_STREAM, IPPROTO_TCP, epc->thread->td_ucred, epc->thread); if (err) @@ -1290,6 +1298,19 @@ epc->so->so_upcallarg = epc; epc->so->so_rcv.sb_flags |= SB_UPCALL; epc->so->so_state |= SS_NBIO; + + PDBG("%s ep %p so %p state %s\n", __FUNCTION__, ep, ep->com.so, states[ep->com.state]); + + sopt.sopt_dir = SOPT_SET; + sopt.sopt_level = SOL_SOCKET; + sopt.sopt_name = SO_NO_DDP; + sopt.sopt_val = (caddr_t)&on; + sopt.sopt_valsize = sizeof on; + sopt.sopt_td = NULL; + err = sosetopt(epc->so, &sopt); + if (err) + printf("%s can't set SO_NO_DDP err %d\n", __FUNCTION__, err); + return 0; } @@ -1526,8 +1547,9 @@ default: if (ep->com.so->so_rcv.sb_cc) printf("%s Unexpected streaming data." - " ep %p state %d so %p\n", - __FUNCTION__, ep, state_read(&ep->com), ep->com.so); + " ep %p state %d so %p so_state %x so_rcv.sb_cc %u so_rcv.sb_mb %p\n", + __FUNCTION__, ep, state_read(&ep->com), ep->com.so, ep->com.so->so_state, + ep->com.so->so_rcv.sb_cc, ep->com.so->so_rcv.sb_mb); break; } return; ==== //depot/projects/iwarp/sys/kern/uipc_socket.c#4 (text+ko) ==== @@ -2015,6 +2015,8 @@ case SO_TIMESTAMP: case SO_BINTIME: case SO_NOSIGPIPE: + case SO_NO_DDP: + case SO_NO_OFFLOAD: error = sooptcopyin(sopt, &optval, sizeof optval, sizeof optval); if (error)