From: Tom Tucker Subject: Re: [RFC,PATCH 11/35] svc: Add xpo_accept transport function Date: Tue, 02 Oct 2007 11:41:45 -0500 Message-ID: <1191343305.1565.24.camel@trinity.ogc.int> References: <20071001191426.3250.15371.stgit@dell3.ogc.int> <20071001192753.3250.94322.stgit@dell3.ogc.int> Reply-To: tom@opengridcomputing.com Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Cc: neilb@suse.de, bfields@fieldses.org, nfs@lists.sourceforge.net, gnb@sgi.com To: Chuck Lever Return-path: Received: from sc8-sf-mx1-b.sourceforge.net ([10.3.1.91] helo=mail.sourceforge.net) by sc8-sf-list2-new.sourceforge.net with esmtp (Exim 4.43) id 1IckzY-0006uM-NH for nfs@lists.sourceforge.net; Tue, 02 Oct 2007 09:53:05 -0700 Received: from 209-198-142-2-host.prismnet.net ([209.198.142.2] helo=smtp.opengridcomputing.com) by mail.sourceforge.net with esmtp (Exim 4.44) id 1Ickps-0008Jq-Ex for nfs@lists.sourceforge.net; Tue, 02 Oct 2007 09:43:04 -0700 In-Reply-To: List-Id: "Discussion of NFS under Linux development, interoperability, and testing." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: nfs-bounces@lists.sourceforge.net Errors-To: nfs-bounces@lists.sourceforge.net On Tue, 2007-10-02 at 11:33 -0400, Chuck Lever wrote: > On Oct 1, 2007, at 3:27 PM, Tom Tucker wrote: [...snip...] > > + if (newxpt) > > + svc_check_conn_limits(svsk->sk_server); > > + svc_sock_received(svsk); > > } else { > > dprintk("svc: server %p, pool %u, socket %p, inuse=%d\n", > > rqstp, pool->sp_id, svsk, atomic_read(&svsk->sk_inuse)); > > Instead of adding a test_bit() and conditional branch here, why not > always call xpo_accept? For UDP, the method simply returns. > That's what I thought at first too, but UDP needs to call receive here. Doing nothing stalls the service and lockd never gets set up. > > @@ -1859,6 +1873,8 @@ static int svc_create_socket(struct svc_ > > } > > > > if ((svsk = svc_setup_socket(serv, sock, &error, flags)) != NULL) { > > + if (protocol == IPPROTO_TCP) > > + set_bit(SK_LISTENER, &svsk->sk_flags); > > svc_sock_received(svsk); > > return ntohs(inet_sk(svsk->sk_sk)->sport); > > } > > If you really need to set SK_LISTENER for TCP, shouldn't that be done > in svc_tcp_init() ? Yes, it could since svc_tcp_init looks at the socket state. > > Chuck Lever > chuck.lever@oracle.com > > ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ NFS maillist - NFS@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nfs